generator-reshow 0.17.23 → 0.17.24

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
 
@@ -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
  }
@@ -20,6 +20,11 @@
20
20
  "<%= mainName %>": "./build/cjs/src/index.js"
21
21
  },
22
22
  "scripts": {
23
+ "update-compile-sh": "yo reshow:compile-sh",
24
+ "webpack": "webpack",
25
+ "start": "ws",
26
+ "format": "prettier-eslint --write 'src/**/*.js' 'ui/**/*.js*'",
27
+ "clean:webpack": "find ./assets -name '*.*' | xargs rm -rf && rm -rf workbox-*.js",
23
28
  "clean": "find ./build -name '*.*' | xargs rm -rf",
24
29
  "build:cjs": "BABEL_ENV=cjs babel src -d build/cjs/src<%= babelRootMode %>",
25
30
  "build:es": "BABEL_ENV=es babel src -d build/es/src<%= babelRootMode %>",
package/package.json CHANGED
@@ -1,37 +1,35 @@
1
1
  {
2
+ "version": "0.17.24",
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
- "keywords": [
12
- "yeoman-generator"
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
- "bugs": {
35
- "url": "https://github.com/react-atomic/reshow/issues"
36
- }
32
+ "files": [
33
+ "generators"
34
+ ]
37
35
  }