generator-reshow 0.17.23 → 0.17.26
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.
|
@@ -6,7 +6,7 @@ DIR=$(
|
|
|
6
6
|
)
|
|
7
7
|
cd $DIR
|
|
8
8
|
SWJS=${DIR}/service-worker.js
|
|
9
|
-
webpackEnabled=$(awk -F "=" '/^webpackEnabled/ {print $2}' $DIR/.yo)
|
|
9
|
+
webpackEnabled=$([ -e "$DIR/.yo" ] && awk -F "=" '/^webpackEnabled/ {print $2}' $DIR/.yo)
|
|
10
10
|
|
|
11
11
|
conf='{'
|
|
12
12
|
conf+='"assetsRoot":"./assets/",'
|
|
@@ -37,7 +37,7 @@ stop() {
|
|
|
37
37
|
cat webpack.pid | xargs -I{} kill -9 {}
|
|
38
38
|
npm run clean:webpack
|
|
39
39
|
fi
|
|
40
|
-
rm $SWJS
|
|
40
|
+
[ -e "$SWJS" ] && rm $SWJS
|
|
41
41
|
echo "Stop done"
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -94,7 +94,7 @@ watch() {
|
|
|
94
94
|
|
|
95
95
|
hot() {
|
|
96
96
|
stop
|
|
97
|
-
rm $SWJS
|
|
97
|
+
[ -e "$SWJS" ] && rm $SWJS
|
|
98
98
|
echo "Hot Mode"
|
|
99
99
|
npm run build:es:ui -- --watch &
|
|
100
100
|
npm run build:es:src -- --watch &
|
|
@@ -125,7 +125,7 @@ case "$1" in
|
|
|
125
125
|
;;
|
|
126
126
|
*)
|
|
127
127
|
develop
|
|
128
|
-
exit
|
|
128
|
+
exit 0
|
|
129
129
|
;;
|
|
130
130
|
esac
|
|
131
131
|
|
package/generators/npm/index.js
CHANGED
|
@@ -85,6 +85,10 @@ module.exports = class extends YoGenerator {
|
|
|
85
85
|
data.files = data.files.filter((f) => f !== "build");
|
|
86
86
|
data.files.push("src");
|
|
87
87
|
}
|
|
88
|
+
if (!this.payload.isUseWebpack) {
|
|
89
|
+
delete data.scripts["webpack"];
|
|
90
|
+
delete data.scripts["clean:webpack"];
|
|
91
|
+
}
|
|
88
92
|
return data;
|
|
89
93
|
});
|
|
90
94
|
}
|
|
@@ -14,21 +14,29 @@
|
|
|
14
14
|
"@babel/cli": "^7.x",
|
|
15
15
|
"reshow-unit-dom": "*"
|
|
16
16
|
},
|
|
17
|
+
"exports": {
|
|
18
|
+
"require": "./build/cjs/src/index.js",
|
|
19
|
+
"import": "./build/es/src/index.mjs"
|
|
20
|
+
},
|
|
17
21
|
"main": "./build/cjs/src/index.js",
|
|
18
|
-
"module": "./build/es/src/index.
|
|
22
|
+
"module": "./build/es/src/index.mjs",
|
|
19
23
|
"bin": {
|
|
20
24
|
"<%= mainName %>": "./build/cjs/src/index.js"
|
|
21
25
|
},
|
|
22
26
|
"scripts": {
|
|
27
|
+
"update-compile-sh": "yo reshow:compile-sh",
|
|
28
|
+
"webpack": "webpack",
|
|
29
|
+
"start": "ws",
|
|
30
|
+
"format": "prettier-eslint --write 'src/**/*.js' 'ui/**/*.js*'",
|
|
31
|
+
"clean:webpack": "find ./assets -name '*.*' | xargs rm -rf && rm -rf workbox-*.js",
|
|
23
32
|
"clean": "find ./build -name '*.*' | xargs rm -rf",
|
|
24
33
|
"build:cjs": "BABEL_ENV=cjs babel src -d build/cjs/src<%= babelRootMode %>",
|
|
25
34
|
"build:es": "BABEL_ENV=es babel src -d build/es/src<%= babelRootMode %>",
|
|
26
35
|
"build": "npm run clean && npm run build:cjs && npm run build:es",
|
|
27
|
-
"mochaFor": "mocha -r jsdom
|
|
36
|
+
"mochaFor": "mocha -r global-jsdom/register",
|
|
28
37
|
"mocha": "npm run mochaFor -- 'build/cjs/**/__tests__/*.js'",
|
|
29
38
|
"test": "npm run build && npm run mocha",
|
|
30
39
|
"prepublishOnly": "npm run test"
|
|
31
40
|
},
|
|
32
|
-
"files": ["build", "package.json", "README.md"]
|
|
33
|
-
"engines": { "node": ">=14" }
|
|
41
|
+
"files": ["build", "package.json", "README.md"]
|
|
34
42
|
}
|
package/package.json
CHANGED
|
@@ -1,37 +1,35 @@
|
|
|
1
1
|
{
|
|
2
|
+
"version": "0.17.26",
|
|
2
3
|
"name": "generator-reshow",
|
|
3
|
-
"version": "0.17.23",
|
|
4
|
-
"description": "Yeoman generator for reshow. (app, generator, ...etc)",
|
|
5
|
-
"author": "Hill <hill@kimo.com>",
|
|
6
4
|
"repository": {
|
|
7
5
|
"type": "git",
|
|
8
6
|
"url": "https://github.com/react-atomic/reshow",
|
|
9
7
|
"directory": "packages/generator-reshow"
|
|
10
8
|
},
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
],
|
|
9
|
+
"homepage": "https://github.com/react-atomic/reshow/tree/main/packages/generator-reshow",
|
|
10
|
+
"description": "Yeoman generator for reshow. (app, generator, ...etc)",
|
|
11
|
+
"keywords": ["yeoman-generator"],
|
|
12
|
+
"author": "Hill <hill@kimo.com>",
|
|
14
13
|
"license": "ISC",
|
|
15
|
-
"main": "",
|
|
16
14
|
"dependencies": {
|
|
17
15
|
"yo-reshow": "*"
|
|
18
16
|
},
|
|
19
17
|
"devDependencies": {
|
|
20
18
|
"yo-unit": "*"
|
|
21
19
|
},
|
|
22
|
-
"files": [
|
|
23
|
-
"generators"
|
|
24
|
-
],
|
|
25
20
|
"scripts": {
|
|
26
21
|
"mochaFor": "mocha",
|
|
27
22
|
"mocha": "npm run mochaFor -- 'generators/**/__tests__/*.js'",
|
|
28
23
|
"test": "npm run mocha",
|
|
29
24
|
"prepublishOnly": "npm run test"
|
|
30
25
|
},
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/react-atomic/reshow/issues"
|
|
28
|
+
},
|
|
31
29
|
"engines": {
|
|
32
30
|
"node": ">=12"
|
|
33
31
|
},
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
|
|
32
|
+
"files": [
|
|
33
|
+
"generators"
|
|
34
|
+
]
|
|
37
35
|
}
|