@merkur/create-widget 0.27.2 → 0.27.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@merkur/create-widget",
|
|
3
|
-
"version": "0.27.
|
|
3
|
+
"version": "0.27.6",
|
|
4
4
|
"description": "CLI for creating merkur widget easily.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"merkur-create-widget": "./bin/createWidget.js"
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"inquirer": "^8.1.2",
|
|
45
45
|
"yargs": "^17.1.1"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "009ed11faf36f987d0237adedfaa167ecb054d4d"
|
|
48
48
|
}
|
package/template/package.json
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"dev:server": "cross-env NODE_CONFIG_DIR='./server/config' NODE_ENV=development nodemon server/server.js --config nodemon.json",
|
|
7
7
|
"test": "npm run test:all",
|
|
8
8
|
"test:unit": "cross-env TEST_GROUP='unit' jest -c ./jest.config.js",
|
|
9
|
-
"test:integration": "
|
|
10
|
-
"test:all": "npm run build
|
|
9
|
+
"test:integration": "cross-env TEST_GROUP='integration' NODE_CONFIG_DIR='./server/config' jest -c ./jest.config.js",
|
|
10
|
+
"test:all": "npm run build && cross-env TEST_GROUP='all' NODE_CONFIG_DIR='./server/config' jest -c ./jest.config.js",
|
|
11
11
|
"test:watch": "cross-env TEST_GROUP='unit' jest -c ./jest.config.js --watchAll",
|
|
12
12
|
"lint": "eslint -c ./.eslintrc.js --ignore-path ./.prettierignore './**/*.{js,jsx}'",
|
|
13
13
|
"dev": "cross-env NODE_ENV=development webpack --config ./webpack.config.js --watch",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"license": "ISC",
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@merkur/core": "0.27.1",
|
|
21
|
-
"@merkur/integration": "0.27.
|
|
21
|
+
"@merkur/integration": "0.27.5",
|
|
22
22
|
"@merkur/plugin-component": "0.27.1",
|
|
23
|
-
"@merkur/plugin-error": "0.27.
|
|
23
|
+
"@merkur/plugin-error": "0.27.6",
|
|
24
24
|
"@merkur/plugin-event-emitter": "0.27.1",
|
|
25
25
|
"compression": "^1.7.4",
|
|
26
26
|
"config": "^3.3.6",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@merkur/tools": "0.27.1",
|
|
38
|
-
"@merkur/tool-webpack": "0.27.
|
|
38
|
+
"@merkur/tool-webpack": "0.27.4",
|
|
39
39
|
"nodemon": "^2.0.12",
|
|
40
40
|
"webpack": "^5.51.1",
|
|
41
41
|
"webpack-cli": "^4.8.0"
|
|
@@ -16,9 +16,19 @@ process.on('unhandledRejection', (error) => {
|
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
if (!serverConfig.clusters || !cluster.isMaster) {
|
|
19
|
-
app.listen(config.get('server.port'), () => {
|
|
19
|
+
const server = app.listen(config.get('server.port'), () => {
|
|
20
20
|
console.log(`listen on localhost:${config.get('server.port')}`); // eslint-disable-line no-console
|
|
21
21
|
});
|
|
22
|
+
|
|
23
|
+
const handleExit = () => {
|
|
24
|
+
server.close(() => {
|
|
25
|
+
process.exit(0);
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
process.on('SIGINT', handleExit);
|
|
30
|
+
process.on('SIGQUIT', handleExit);
|
|
31
|
+
process.on('SIGTERM', handleExit);
|
|
22
32
|
} else {
|
|
23
33
|
let cpuCount = serverConfig.clusters || os.cpus().length;
|
|
24
34
|
|
|
@@ -12,7 +12,9 @@ const {
|
|
|
12
12
|
function applyBabelLoader(config, { isProduction, environment, cache }) {
|
|
13
13
|
config.module.rules.push({
|
|
14
14
|
test: /\.(js|ts|tsx|mjs|jsx)$/,
|
|
15
|
-
exclude:
|
|
15
|
+
exclude: (modulePath) =>
|
|
16
|
+
/node_modules/.test(modulePath) &&
|
|
17
|
+
!/node_modules\/(abort-controller|event-target-shim)/.test(modulePath),
|
|
16
18
|
use: {
|
|
17
19
|
loader: 'babel-loader',
|
|
18
20
|
options: {
|
|
@@ -61,3 +63,5 @@ module.exports = createLiveReloadServer().then(() =>
|
|
|
61
63
|
pipe(createNodeConfig, applyStyleLoaders, applyBabelLoader)(),
|
|
62
64
|
])
|
|
63
65
|
);
|
|
66
|
+
|
|
67
|
+
module.exports.applyBabelLoader = applyBabelLoader;
|
|
@@ -12,7 +12,9 @@ const {
|
|
|
12
12
|
function applyBabelLoader(config, { isProduction, environment, cache }) {
|
|
13
13
|
config.module.rules.push({
|
|
14
14
|
test: /\.(js|ts|tsx|mjs|jsx)$/,
|
|
15
|
-
exclude:
|
|
15
|
+
exclude: (modulePath) =>
|
|
16
|
+
/node_modules/.test(modulePath) &&
|
|
17
|
+
!/node_modules\/(abort-controller|event-target-shim)/.test(modulePath),
|
|
16
18
|
use: {
|
|
17
19
|
loader: 'babel-loader',
|
|
18
20
|
options: {
|
|
@@ -60,3 +62,5 @@ module.exports = createLiveReloadServer().then(() =>
|
|
|
60
62
|
pipe(createNodeConfig, applyStyleLoaders, applyBabelLoader)(),
|
|
61
63
|
])
|
|
62
64
|
);
|
|
65
|
+
|
|
66
|
+
module.exports.applyBabelLoader = applyBabelLoader;
|