質問編集履歴
7
書式の改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -168,7 +168,7 @@
|
|
168
168
|
|
169
169
|
npm ERR! errno 1
|
170
170
|
|
171
|
-
npm ERR! sample@1.0.0 build:js: `
|
171
|
+
npm ERR! sample@1.0.0 build:js: `browserify -t babelify src/**/*.js | uglifyjs -c -m > dist/**/*.js`
|
172
172
|
|
173
173
|
npm ERR! Exit status 1
|
174
174
|
|
@@ -178,13 +178,17 @@
|
|
178
178
|
|
179
179
|
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
|
180
180
|
|
181
|
-
|
181
|
+
⠋ Minifying images
|
182
182
|
|
183
183
|
npm ERR! A complete log of this run can be found in:
|
184
184
|
|
185
|
-
npm ERR! /Users/*/.npm/_logs/2018-05-22T07_
|
185
|
+
npm ERR! /Users/*/.npm/_logs/2018-05-22T09_17_27_184Z-debug.log
|
186
|
+
|
186
|
-
|
187
|
+
(node:24881) ExperimentalWarning: The fs.promises API is experimental
|
188
|
+
|
189
|
+
0 images minified
|
190
|
+
|
187
|
-
|
191
|
+
ERROR: "build:js" exited with 1.
|
188
192
|
|
189
193
|
npm ERR! code ELIFECYCLE
|
190
194
|
|
@@ -204,11 +208,11 @@
|
|
204
208
|
|
205
209
|
npm ERR! A complete log of this run can be found in:
|
206
210
|
|
207
|
-
npm ERR! /Users/*/.npm/_logs/2018-05-22T07_
|
211
|
+
npm ERR! /Users/*/.npm/_logs/2018-05-22T09_17_27_302Z-debug.log
|
208
|
-
|
209
|
-
|
210
|
-
|
212
|
+
|
213
|
+
|
214
|
+
|
211
|
-
【2018-05-22T07_
|
215
|
+
【2018-05-22T09_17_27_184Z-debug.log】
|
212
216
|
|
213
217
|
0 info it worked if it ends with ok
|
214
218
|
|
@@ -236,13 +240,15 @@
|
|
236
240
|
|
237
241
|
9 verbose lifecycle sample@1.0.0~build:js: CWD: /npm-scripts/trial01
|
238
242
|
|
243
|
+
10 silly lifecycle sample@1.0.0~build:js: Args: [ '-c',
|
244
|
+
|
239
|
-
10 silly lifecycle s
|
245
|
+
10 silly lifecycle 'browserify -t babelify src/**/*.js | uglifyjs -c -m > dist/**/*.js' ]
|
240
246
|
|
241
247
|
11 silly lifecycle sample@1.0.0~build:js: Returned: code: 1 signal: null
|
242
248
|
|
243
249
|
12 info lifecycle sample@1.0.0~build:js: Failed to exec build:js script
|
244
250
|
|
245
|
-
13 verbose stack Error: sample@1.0.0 build:js: `
|
251
|
+
13 verbose stack Error: sample@1.0.0 build:js: `browserify -t babelify src/**/*.js | uglifyjs -c -m > dist/**/*.js`
|
246
252
|
|
247
253
|
13 verbose stack Exit status 1
|
248
254
|
|
@@ -274,7 +280,7 @@
|
|
274
280
|
|
275
281
|
21 error errno 1
|
276
282
|
|
277
|
-
22 error sample@1.0.0 build:js: `
|
283
|
+
22 error sample@1.0.0 build:js: `browserify -t babelify src/**/*.js | uglifyjs -c -m > dist/**/*.js`
|
278
284
|
|
279
285
|
22 error Exit status 1
|
280
286
|
|
@@ -286,7 +292,7 @@
|
|
286
292
|
|
287
293
|
|
288
294
|
|
289
|
-
【2018-05-22T07_
|
295
|
+
【2018-05-22T09_17_27_302Z-debug.log】
|
290
296
|
|
291
297
|
0 info it worked if it ends with ok
|
292
298
|
|
@@ -304,9 +310,9 @@
|
|
304
310
|
|
305
311
|
7 verbose lifecycle sample@1.0.0~build: unsafe-perm in lifecycle true
|
306
312
|
|
307
|
-
8 verbose lifecycle sample@1.0.0~build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/
|
308
|
-
|
309
|
-
9 verbose lifecycle sample@1.0.0~build: CWD: /
|
313
|
+
8 verbose lifecycle sample@1.0.0~build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/npm-scripts/trial01/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/*/shellscript/
|
314
|
+
|
315
|
+
9 verbose lifecycle sample@1.0.0~build: CWD: /npm-scripts/trial01
|
310
316
|
|
311
317
|
10 silly lifecycle sample@1.0.0~build: Args: [ '-c', 'npm run clean & npm-run-all -p build:*' ]
|
312
318
|
|
@@ -378,7 +384,7 @@
|
|
378
384
|
|
379
385
|
"build:css": "postcss src/**/*.pcss -o dist/**/*.css --no-map",
|
380
386
|
|
381
|
-
"build:js": "
|
387
|
+
"build:js": "browserify -t babelify src/**/*.js | uglifyjs -c -m > dist/**/*.js",
|
382
388
|
|
383
389
|
"build:images": "imagemin src/images/* -o dist/images",
|
384
390
|
|
@@ -386,19 +392,19 @@
|
|
386
392
|
|
387
393
|
"build": "npm run clean & npm-run-all -p build:*",
|
388
394
|
|
389
|
-
"watch:css": "postcss src/css/
|
395
|
+
"watch:css": "postcss src/css/**.pcss -o dist/css/**.css -w",
|
390
|
-
|
396
|
+
|
391
|
-
"watch:js": "watchify -t babelify src/
|
397
|
+
"watch:js": "watchify -t babelify src/**/*.js -o 'uglifyjs -c -m > dist/**/*.js' -v",
|
392
|
-
|
398
|
+
|
393
|
-
"watch:images": "onchange 'src/images' -e '**/*.DS_Store' -- npm run build:images",
|
399
|
+
"watch:images": "onchange 'src/**/images' -e '**/*.DS_Store' -- npm run build:images",
|
394
400
|
|
395
401
|
"watch:server": "browser-sync start -s -f 'dist, **/*.html, !node_modules/**/*'",
|
396
402
|
|
397
403
|
"watch": "npm-run-all -p watch:*",
|
398
404
|
|
399
|
-
"lint:css": "stylelint src/
|
405
|
+
"lint:css": "stylelint src/**/*.pcss",
|
400
|
-
|
406
|
+
|
401
|
-
"lint:js": "eslint src/
|
407
|
+
"lint:js": "eslint src/**/*.js",
|
402
408
|
|
403
409
|
"postinstall": "npm run build && npm run watch"
|
404
410
|
|
6
書式の改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -154,6 +154,10 @@
|
|
154
154
|
|
155
155
|
### 発生している問題・エラーメッセージ
|
156
156
|
|
157
|
+
|
158
|
+
|
159
|
+
```
|
160
|
+
|
157
161
|
実行すると下記のエラーが出ます。
|
158
162
|
|
159
163
|
|
@@ -354,110 +358,106 @@
|
|
354
358
|
|
355
359
|
```
|
356
360
|
|
357
|
-
|
361
|
+
### 該当のソースコード
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
```package.json
|
366
|
+
|
367
|
+
{
|
368
|
+
|
369
|
+
"name": "sample",
|
370
|
+
|
371
|
+
"version": "1.0.0",
|
372
|
+
|
373
|
+
"scripts": {
|
374
|
+
|
375
|
+
"clean": "rimraf dist/{css/*,js/*,images/*}",
|
376
|
+
|
377
|
+
"build:ejs": "ejs-cli --base-dir src/ \"**/*.ejs\" -o dist/",
|
378
|
+
|
379
|
+
"build:css": "postcss src/**/*.pcss -o dist/**/*.css --no-map",
|
380
|
+
|
381
|
+
"build:js": "cpx \"src/**/*.js\" ./dist -w -t babelify -t uglifyify",
|
382
|
+
|
383
|
+
"build:images": "imagemin src/images/* -o dist/images",
|
384
|
+
|
385
|
+
"build:copy": "cpx \"src/assets/**/(*.js|*.css)\" ./dist",
|
386
|
+
|
387
|
+
"build": "npm run clean & npm-run-all -p build:*",
|
388
|
+
|
389
|
+
"watch:css": "postcss src/css/main.pcss -o dist/css/main.css -w",
|
390
|
+
|
391
|
+
"watch:js": "watchify -t babelify src/js/main.js -o 'uglifyjs -c -m > dist/js/main.js' -v",
|
392
|
+
|
393
|
+
"watch:images": "onchange 'src/images' -e '**/*.DS_Store' -- npm run build:images",
|
394
|
+
|
395
|
+
"watch:server": "browser-sync start -s -f 'dist, **/*.html, !node_modules/**/*'",
|
396
|
+
|
397
|
+
"watch": "npm-run-all -p watch:*",
|
398
|
+
|
399
|
+
"lint:css": "stylelint src/css/**/*.pcss",
|
400
|
+
|
401
|
+
"lint:js": "eslint src/js/**/*.js",
|
402
|
+
|
403
|
+
"postinstall": "npm run build && npm run watch"
|
404
|
+
|
405
|
+
},
|
406
|
+
|
407
|
+
"devDependencies": {
|
408
|
+
|
409
|
+
"babelify": "^7.3.0",
|
410
|
+
|
411
|
+
"browser-sync": "^2.18.13",
|
412
|
+
|
413
|
+
"browserify": "^14.4.0",
|
414
|
+
|
415
|
+
"cpx": "^1.5.0",
|
416
|
+
|
417
|
+
"cssnano": "^3.10.0",
|
418
|
+
|
419
|
+
"ejs-cli": "^2.0.1",
|
420
|
+
|
421
|
+
"eslint": "^4.3.0",
|
422
|
+
|
423
|
+
"eslint-config-standard": "^10.2.1",
|
424
|
+
|
425
|
+
"eslint-plugin-import": "^2.7.0",
|
426
|
+
|
427
|
+
"eslint-plugin-node": "^5.1.1",
|
428
|
+
|
429
|
+
"eslint-plugin-promise": "^3.5.0",
|
430
|
+
|
431
|
+
"eslint-plugin-standard": "^3.0.1",
|
432
|
+
|
433
|
+
"imagemin-cli": "^3.0.0",
|
434
|
+
|
435
|
+
"mkdirp": "^0.5.1",
|
436
|
+
|
437
|
+
"npm-run-all": "^4.0.2",
|
438
|
+
|
439
|
+
"onchange": "^3.2.1",
|
440
|
+
|
441
|
+
"postcss-cli": "^4.1.0",
|
442
|
+
|
443
|
+
"postcss-cssnext": "^3.0.2",
|
444
|
+
|
445
|
+
"postcss-import": "^10.0.0",
|
446
|
+
|
447
|
+
"rimraf": "^2.6.1",
|
448
|
+
|
449
|
+
"stylelint": "^8.0.0",
|
450
|
+
|
451
|
+
"uglify-es": "^3.0.26",
|
452
|
+
|
453
|
+
"watchify": "^3.9.0"
|
454
|
+
|
455
|
+
}
|
456
|
+
|
457
|
+
}
|
358
458
|
|
359
459
|
```
|
360
460
|
|
361
|
-
### 該当のソースコード
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
```package.json
|
366
|
-
|
367
|
-
{
|
368
|
-
|
369
|
-
"name": "sample",
|
370
|
-
|
371
|
-
"version": "1.0.0",
|
372
|
-
|
373
|
-
"scripts": {
|
374
|
-
|
375
|
-
"clean": "rimraf dist/{css/*,js/*,images/*}",
|
376
|
-
|
377
|
-
"build:ejs": "ejs-cli --base-dir src/ \"**/*.ejs\" -o dist/",
|
378
|
-
|
379
|
-
"build:css": "postcss src/**/*.pcss -o dist/**/*.css --no-map",
|
380
|
-
|
381
|
-
"build:js": "cpx \"src/**/*.js\" ./dist -w -t babelify -t uglifyify",
|
382
|
-
|
383
|
-
"build:images": "imagemin src/images/* -o dist/images",
|
384
|
-
|
385
|
-
"build:copy": "cpx \"src/assets/**/(*.js|*.css)\" ./dist",
|
386
|
-
|
387
|
-
"build": "npm run clean & npm-run-all -p build:*",
|
388
|
-
|
389
|
-
"watch:css": "postcss src/css/main.pcss -o dist/css/main.css -w",
|
390
|
-
|
391
|
-
"watch:js": "watchify -t babelify src/js/main.js -o 'uglifyjs -c -m > dist/js/main.js' -v",
|
392
|
-
|
393
|
-
"watch:images": "onchange 'src/images' -e '**/*.DS_Store' -- npm run build:images",
|
394
|
-
|
395
|
-
"watch:server": "browser-sync start -s -f 'dist, **/*.html, !node_modules/**/*'",
|
396
|
-
|
397
|
-
"watch": "npm-run-all -p watch:*",
|
398
|
-
|
399
|
-
"lint:css": "stylelint src/css/**/*.pcss",
|
400
|
-
|
401
|
-
"lint:js": "eslint src/js/**/*.js",
|
402
|
-
|
403
|
-
"postinstall": "npm run build && npm run watch"
|
404
|
-
|
405
|
-
},
|
406
|
-
|
407
|
-
"devDependencies": {
|
408
|
-
|
409
|
-
"babelify": "^7.3.0",
|
410
|
-
|
411
|
-
"browser-sync": "^2.18.13",
|
412
|
-
|
413
|
-
"browserify": "^14.4.0",
|
414
|
-
|
415
|
-
"cpx": "^1.5.0",
|
416
|
-
|
417
|
-
"cssnano": "^3.10.0",
|
418
|
-
|
419
|
-
"ejs-cli": "^2.0.1",
|
420
|
-
|
421
|
-
"eslint": "^4.3.0",
|
422
|
-
|
423
|
-
"eslint-config-standard": "^10.2.1",
|
424
|
-
|
425
|
-
"eslint-plugin-import": "^2.7.0",
|
426
|
-
|
427
|
-
"eslint-plugin-node": "^5.1.1",
|
428
|
-
|
429
|
-
"eslint-plugin-promise": "^3.5.0",
|
430
|
-
|
431
|
-
"eslint-plugin-standard": "^3.0.1",
|
432
|
-
|
433
|
-
"imagemin-cli": "^3.0.0",
|
434
|
-
|
435
|
-
"mkdirp": "^0.5.1",
|
436
|
-
|
437
|
-
"npm-run-all": "^4.0.2",
|
438
|
-
|
439
|
-
"onchange": "^3.2.1",
|
440
|
-
|
441
|
-
"postcss-cli": "^4.1.0",
|
442
|
-
|
443
|
-
"postcss-cssnext": "^3.0.2",
|
444
|
-
|
445
|
-
"postcss-import": "^10.0.0",
|
446
|
-
|
447
|
-
"rimraf": "^2.6.1",
|
448
|
-
|
449
|
-
"stylelint": "^8.0.0",
|
450
|
-
|
451
|
-
"uglify-es": "^3.0.26",
|
452
|
-
|
453
|
-
"watchify": "^3.9.0"
|
454
|
-
|
455
|
-
}
|
456
|
-
|
457
|
-
}
|
458
|
-
|
459
|
-
```
|
460
|
-
|
461
461
|
|
462
462
|
|
463
463
|
### 試したこと
|
5
書式の改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -154,33 +154,203 @@
|
|
154
154
|
|
155
155
|
### 発生している問題・エラーメッセージ
|
156
156
|
|
157
|
-
下記の
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
157
|
+
実行すると下記のエラーが出ます。
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
【コンソール】
|
162
|
+
|
163
|
+
npm ERR! code ELIFECYCLE
|
164
|
+
|
165
|
+
npm ERR! errno 1
|
166
|
+
|
167
|
+
npm ERR! sample@1.0.0 build:js: `cpx "src/**/*.js" ./dist -w -t babelify -t uglifyify`
|
168
|
+
|
169
|
+
npm ERR! Exit status 1
|
170
|
+
|
171
|
+
npm ERR!
|
172
|
+
|
173
|
+
npm ERR! Failed at the sample@1.0.0 build:js script.
|
174
|
+
|
175
|
+
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
npm ERR! A complete log of this run can be found in:
|
180
|
+
|
181
|
+
npm ERR! /Users/*/.npm/_logs/2018-05-22T07_07_53_469Z-debug.log
|
182
|
+
|
183
|
+
⠙ Processing src/css/style.pcssERROR: "build:js" exited with 1.
|
184
|
+
|
185
|
+
npm ERR! code ELIFECYCLE
|
186
|
+
|
187
|
+
npm ERR! errno 1
|
188
|
+
|
189
|
+
npm ERR! sample@1.0.0 build: `npm run clean & npm-run-all -p build:*`
|
190
|
+
|
191
|
+
npm ERR! Exit status 1
|
192
|
+
|
193
|
+
npm ERR!
|
194
|
+
|
195
|
+
npm ERR! Failed at the sample@1.0.0 build script.
|
196
|
+
|
197
|
+
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
npm ERR! A complete log of this run can be found in:
|
202
|
+
|
203
|
+
npm ERR! /Users/*/.npm/_logs/2018-05-22T07_07_54_623Z-debug.log
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
【2018-05-22T07_07_53_469Z-debug.log】
|
208
|
+
|
209
|
+
0 info it worked if it ends with ok
|
210
|
+
|
211
|
+
1 verbose cli [ '/usr/local/bin/node',
|
212
|
+
|
213
|
+
1 verbose cli '/usr/local/lib/node_modules/npm/bin/npm-cli.js',
|
214
|
+
|
215
|
+
1 verbose cli 'run',
|
216
|
+
|
217
|
+
1 verbose cli 'build:js' ]
|
218
|
+
|
219
|
+
2 info using npm@5.6.0
|
220
|
+
|
221
|
+
3 info using node@v10.1.0
|
222
|
+
|
223
|
+
4 verbose run-script [ 'prebuild:js', 'build:js', 'postbuild:js' ]
|
224
|
+
|
225
|
+
5 info lifecycle sample@1.0.0~prebuild:js: sample@1.0.0
|
226
|
+
|
227
|
+
6 info lifecycle sample@1.0.0~build:js: sample@1.0.0
|
228
|
+
|
229
|
+
7 verbose lifecycle sample@1.0.0~build:js: unsafe-perm in lifecycle true
|
230
|
+
|
231
|
+
8 verbose lifecycle sample@1.0.0~build:js: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/npm-scripts/trial01/node_modules/.bin:/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/npm-scripts/trial01/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/*/shellscript/
|
232
|
+
|
233
|
+
9 verbose lifecycle sample@1.0.0~build:js: CWD: /npm-scripts/trial01
|
234
|
+
|
235
|
+
10 silly lifecycle sample@1.0.0~build:js: Args: [ '-c', 'cpx "src/**/*.js" ./dist -w -t babelify -t uglifyify' ]
|
236
|
+
|
237
|
+
11 silly lifecycle sample@1.0.0~build:js: Returned: code: 1 signal: null
|
238
|
+
|
239
|
+
12 info lifecycle sample@1.0.0~build:js: Failed to exec build:js script
|
240
|
+
|
241
|
+
13 verbose stack Error: sample@1.0.0 build:js: `cpx "src/**/*.js" ./dist -w -t babelify -t uglifyify`
|
242
|
+
|
243
|
+
13 verbose stack Exit status 1
|
244
|
+
|
245
|
+
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
|
246
|
+
|
247
|
+
13 verbose stack at EventEmitter.emit (events.js:182:13)
|
248
|
+
|
249
|
+
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
|
250
|
+
|
251
|
+
13 verbose stack at ChildProcess.emit (events.js:182:13)
|
252
|
+
|
253
|
+
13 verbose stack at maybeClose (internal/child_process.js:957:16)
|
254
|
+
|
255
|
+
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:246:5)
|
256
|
+
|
257
|
+
14 verbose pkgid sample@1.0.0
|
258
|
+
|
259
|
+
15 verbose cwd /npm-scripts/trial01
|
260
|
+
|
261
|
+
16 verbose Darwin 16.6.0
|
262
|
+
|
263
|
+
17 verbose argv "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/bin/npm-cli.js" "run" "build:js"
|
264
|
+
|
265
|
+
18 verbose node v10.1.0
|
266
|
+
|
267
|
+
19 verbose npm v5.6.0
|
268
|
+
|
269
|
+
20 error code ELIFECYCLE
|
270
|
+
|
271
|
+
21 error errno 1
|
272
|
+
|
273
|
+
22 error sample@1.0.0 build:js: `cpx "src/**/*.js" ./dist -w -t babelify -t uglifyify`
|
274
|
+
|
275
|
+
22 error Exit status 1
|
276
|
+
|
277
|
+
23 error Failed at the sample@1.0.0 build:js script.
|
278
|
+
|
279
|
+
23 error This is probably not a problem with npm. There is likely additional logging output above.
|
280
|
+
|
281
|
+
24 verbose exit [ 1, true ]
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
【2018-05-22T07_07_54_623Z-debug.log】
|
286
|
+
|
287
|
+
0 info it worked if it ends with ok
|
288
|
+
|
289
|
+
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ]
|
290
|
+
|
291
|
+
2 info using npm@5.6.0
|
292
|
+
|
293
|
+
3 info using node@v10.1.0
|
294
|
+
|
295
|
+
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
|
296
|
+
|
297
|
+
5 info lifecycle sample@1.0.0~prebuild: sample@1.0.0
|
298
|
+
|
299
|
+
6 info lifecycle sample@1.0.0~build: sample@1.0.0
|
300
|
+
|
301
|
+
7 verbose lifecycle sample@1.0.0~build: unsafe-perm in lifecycle true
|
302
|
+
|
303
|
+
8 verbose lifecycle sample@1.0.0~build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Working Copy/mci/npm-scripts/trial01/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/*/shellscript/
|
304
|
+
|
305
|
+
9 verbose lifecycle sample@1.0.0~build: CWD: /Working Copy/mci/npm-scripts/trial01
|
306
|
+
|
307
|
+
10 silly lifecycle sample@1.0.0~build: Args: [ '-c', 'npm run clean & npm-run-all -p build:*' ]
|
308
|
+
|
309
|
+
11 silly lifecycle sample@1.0.0~build: Returned: code: 1 signal: null
|
310
|
+
|
311
|
+
12 info lifecycle sample@1.0.0~build: Failed to exec build script
|
312
|
+
|
313
|
+
13 verbose stack Error: sample@1.0.0 build: `npm run clean & npm-run-all -p build:*`
|
314
|
+
|
315
|
+
13 verbose stack Exit status 1
|
316
|
+
|
317
|
+
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
|
318
|
+
|
319
|
+
13 verbose stack at EventEmitter.emit (events.js:182:13)
|
320
|
+
|
321
|
+
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
|
322
|
+
|
323
|
+
13 verbose stack at ChildProcess.emit (events.js:182:13)
|
324
|
+
|
325
|
+
13 verbose stack at maybeClose (internal/child_process.js:957:16)
|
326
|
+
|
327
|
+
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:246:5)
|
328
|
+
|
329
|
+
14 verbose pkgid sample@1.0.0
|
330
|
+
|
331
|
+
15 verbose cwd /npm-scripts/trial01
|
332
|
+
|
333
|
+
16 verbose Darwin 16.6.0
|
334
|
+
|
335
|
+
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
|
336
|
+
|
337
|
+
18 verbose node v10.1.0
|
338
|
+
|
339
|
+
19 verbose npm v5.6.0
|
340
|
+
|
341
|
+
20 error code ELIFECYCLE
|
342
|
+
|
343
|
+
21 error errno 1
|
344
|
+
|
345
|
+
22 error sample@1.0.0 build: `npm run clean & npm-run-all -p build:*`
|
346
|
+
|
347
|
+
22 error Exit status 1
|
348
|
+
|
349
|
+
23 error Failed at the sample@1.0.0 build script.
|
350
|
+
|
351
|
+
23 error This is probably not a problem with npm. There is likely additional logging output above.
|
352
|
+
|
353
|
+
24 verbose exit [ 1, true ]
|
184
354
|
|
185
355
|
```
|
186
356
|
|
@@ -208,7 +378,7 @@
|
|
208
378
|
|
209
379
|
"build:css": "postcss src/**/*.pcss -o dist/**/*.css --no-map",
|
210
380
|
|
211
|
-
"build:js": "
|
381
|
+
"build:js": "cpx \"src/**/*.js\" ./dist -w -t babelify -t uglifyify",
|
212
382
|
|
213
383
|
"build:images": "imagemin src/images/* -o dist/images",
|
214
384
|
|
4
書式の改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -132,9 +132,11 @@
|
|
132
132
|
|
133
133
|
│ ├── include
|
134
134
|
|
135
|
-
│ │ ├── _header.ejs
|
135
|
+
│ │ ├── _header.ejs
|
136
|
-
|
136
|
+
|
137
|
-
│ │
|
137
|
+
│ │ ├── _footer.ejs
|
138
|
+
|
139
|
+
│ │ └── _modules.ejs
|
138
140
|
|
139
141
|
│ │
|
140
142
|
|
3
書式の改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -152,41 +152,37 @@
|
|
152
152
|
|
153
153
|
### 発生している問題・エラーメッセージ
|
154
154
|
|
155
|
+
下記のように出力されてしまう
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
site
|
160
|
+
|
161
|
+
├── dist
|
162
|
+
|
163
|
+
│ │
|
164
|
+
|
165
|
+
│ ├── **
|
166
|
+
|
167
|
+
│ │ └── *.css
|
168
|
+
|
169
|
+
│ ├── include
|
170
|
+
|
171
|
+
│ │ ├── _header.html
|
172
|
+
|
173
|
+
│ │ └── _footer.html
|
174
|
+
|
175
|
+
│ └── js
|
176
|
+
|
177
|
+
│ │ └── main.js
|
178
|
+
|
179
|
+
|
180
|
+
|
155
181
|
|
156
182
|
|
157
183
|
```
|
158
184
|
|
159
|
-
|
185
|
+
|
160
|
-
|
161
|
-
npm ERR! code ELIFECYCLE
|
162
|
-
|
163
|
-
npm ERR! errno 1
|
164
|
-
|
165
|
-
npm ERR! sample@1.0.0 build:css: `postcss src/**/*.pcss -o dist/**/*.css --no-map`
|
166
|
-
|
167
|
-
npm ERR! Exit status 1
|
168
|
-
|
169
|
-
npm ERR!
|
170
|
-
|
171
|
-
npm ERR! Failed at the sample@1.0.0 build:css script.
|
172
|
-
|
173
|
-
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
|
174
|
-
|
175
|
-
ERROR: "build:css" exited with 1.
|
176
|
-
|
177
|
-
npm ERR! code ELIFECYCLE
|
178
|
-
|
179
|
-
npm ERR! errno 1
|
180
|
-
|
181
|
-
npm ERR! sample@1.0.0 build: `npm run clean & npm-run-all -p build:*`
|
182
|
-
|
183
|
-
npm ERR! Exit status 1
|
184
|
-
|
185
|
-
npm ERR!
|
186
|
-
|
187
|
-
npm ERR! Failed at the sample@1.0.0 build script.
|
188
|
-
|
189
|
-
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
|
190
186
|
|
191
187
|
```
|
192
188
|
|
2
書式の変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -44,6 +44,10 @@
|
|
44
44
|
|
45
45
|
│ │ └── js
|
46
46
|
|
47
|
+
│ │ ├── vendor
|
48
|
+
|
49
|
+
│ │ │ └── *
|
50
|
+
|
47
51
|
│ │ └── main.js
|
48
52
|
|
49
53
|
│ │
|
@@ -64,6 +68,58 @@
|
|
64
68
|
|
65
69
|
│ │ └── images
|
66
70
|
|
71
|
+
│ │ └── .svg, .png, .jpg, .gif
|
72
|
+
|
73
|
+
│ │
|
74
|
+
|
75
|
+
│ ├── images
|
76
|
+
|
77
|
+
│ │ └── .svg, .png, .jpg, .gif
|
78
|
+
|
79
|
+
│ │
|
80
|
+
|
81
|
+
│ └── index.html
|
82
|
+
|
83
|
+
│
|
84
|
+
|
85
|
+
├── src
|
86
|
+
|
87
|
+
│ ├── assets
|
88
|
+
|
89
|
+
│ │ ├── css
|
90
|
+
|
91
|
+
│ │ │ └── main.pcss
|
92
|
+
|
93
|
+
│ │ ├── images
|
94
|
+
|
95
|
+
│ │ │ └── .svg, .png, .jpg, .gif
|
96
|
+
|
97
|
+
│ │ └── js
|
98
|
+
|
99
|
+
│ │ ├── vendor
|
100
|
+
|
101
|
+
│ │ │ └── *
|
102
|
+
|
103
|
+
│ │ └── main.js
|
104
|
+
|
105
|
+
│ │
|
106
|
+
|
107
|
+
│ ├── css
|
108
|
+
|
109
|
+
│ │ └── style.pcss
|
110
|
+
|
111
|
+
│ │
|
112
|
+
|
113
|
+
│ ├── dir01
|
114
|
+
|
115
|
+
│ │ ├── index.ejs
|
116
|
+
|
117
|
+
│ │ ├── css
|
118
|
+
|
119
|
+
│ │ │ └── style.pcss
|
120
|
+
|
121
|
+
│ │ └── images
|
122
|
+
|
67
123
|
│ │ └── .svg,.png,.jpg,.gif
|
68
124
|
|
69
125
|
│ │
|
@@ -72,72 +128,24 @@
|
|
72
128
|
|
73
129
|
│ │ └── .svg,.png,.jpg,.gif
|
74
130
|
|
131
|
+
│ │
|
132
|
+
|
133
|
+
│ ├── include
|
134
|
+
|
135
|
+
│ │ ├── _header.ejs
|
136
|
+
|
137
|
+
│ │ └── _footer.ejs
|
138
|
+
|
75
139
|
│ │
|
76
140
|
|
77
|
-
│ └── index.
|
141
|
+
│ └── index.ejs
|
78
142
|
|
79
143
|
│
|
80
144
|
|
81
|
-
├── src
|
82
|
-
|
83
|
-
|
145
|
+
├── package.json
|
84
|
-
|
85
|
-
│ │ ├── css
|
86
|
-
|
87
|
-
│ │ │ └── main.pcss
|
88
|
-
|
89
|
-
│ │ ├── images
|
90
|
-
|
91
|
-
│ │ │ └── .svg, .png, .jpg, .gif
|
92
|
-
|
93
|
-
│ │ └── js
|
94
|
-
|
95
|
-
│ │ └── main.js
|
96
|
-
|
97
|
-
│ │
|
98
|
-
|
99
|
-
│ ├── css
|
100
|
-
|
101
|
-
│ │ └── style.pcss
|
102
|
-
|
103
|
-
│ │
|
104
|
-
|
105
|
-
│ ├── dir01
|
106
|
-
|
107
|
-
│ │ ├── index.ejs
|
108
|
-
|
109
|
-
│ │ ├── css
|
110
|
-
|
111
|
-
│ │ │ └── style.pcss
|
112
|
-
|
113
|
-
│ │ └── images
|
114
|
-
|
115
|
-
│ │ └── .svg,.png,.jpg,.gif
|
116
|
-
|
117
|
-
│ │
|
118
|
-
|
119
|
-
│ ├── images
|
120
|
-
|
121
|
-
│ │ └── .svg,.png,.jpg,.gif
|
122
|
-
|
123
|
-
│ │
|
124
|
-
|
125
|
-
│ ├── include
|
126
|
-
|
127
|
-
│ │ ├── _header.ejs
|
128
|
-
|
129
|
-
│ │ └── _footer.ejs
|
130
|
-
|
131
|
-
│ │
|
132
|
-
|
133
|
-
│ └── index.ejs
|
134
146
|
|
135
147
|
│
|
136
148
|
|
137
|
-
├── package.json
|
138
|
-
|
139
|
-
│
|
140
|
-
|
141
149
|
└── postcss.config.js
|
142
150
|
|
143
151
|
|
@@ -198,29 +206,31 @@
|
|
198
206
|
|
199
207
|
"clean": "rimraf dist/{css/*,js/*,images/*}",
|
200
208
|
|
209
|
+
"build:ejs": "ejs-cli --base-dir src/ \"**/*.ejs\" -o dist/",
|
210
|
+
|
201
|
-
"build:css": "postcss
|
211
|
+
"build:css": "postcss src/**/*.pcss -o dist/**/*.css --no-map",
|
202
|
-
|
212
|
+
|
203
|
-
"build:js": "mkdirp dist/js && browserify -t babelify src/
|
213
|
+
"build:js": "mkdirp dist/js && browserify -t babelify src/js/main.js | uglifyjs -c -m > dist/js/main.js",
|
204
|
-
|
214
|
+
|
205
|
-
"build:images": "imagemin
|
215
|
+
"build:images": "imagemin src/images/* -o dist/images",
|
206
|
-
|
216
|
+
|
207
|
-
"build:
|
217
|
+
"build:copy": "cpx \"src/assets/**/(*.js|*.css)\" ./dist",
|
208
218
|
|
209
219
|
"build": "npm run clean & npm-run-all -p build:*",
|
210
220
|
|
211
|
-
"watch:css": "postcss
|
221
|
+
"watch:css": "postcss src/css/main.pcss -o dist/css/main.css -w",
|
212
|
-
|
222
|
+
|
213
|
-
"watch:js": "watchify -t babelify
|
223
|
+
"watch:js": "watchify -t babelify src/js/main.js -o 'uglifyjs -c -m > dist/js/main.js' -v",
|
214
|
-
|
224
|
+
|
215
|
-
"watch:images": "onchange 'src/
|
225
|
+
"watch:images": "onchange 'src/images' -e '**/*.DS_Store' -- npm run build:images",
|
216
226
|
|
217
227
|
"watch:server": "browser-sync start -s -f 'dist, **/*.html, !node_modules/**/*'",
|
218
228
|
|
219
229
|
"watch": "npm-run-all -p watch:*",
|
220
230
|
|
221
|
-
"lint:css": "stylelint src/**/*.pcss",
|
231
|
+
"lint:css": "stylelint src/css/**/*.pcss",
|
222
|
-
|
232
|
+
|
223
|
-
"lint:js": "eslint src/**/*.js",
|
233
|
+
"lint:js": "eslint src/js/**/*.js",
|
224
234
|
|
225
235
|
"postinstall": "npm run build && npm run watch"
|
226
236
|
|
@@ -234,6 +244,8 @@
|
|
234
244
|
|
235
245
|
"browserify": "^14.4.0",
|
236
246
|
|
247
|
+
"cpx": "^1.5.0",
|
248
|
+
|
237
249
|
"cssnano": "^3.10.0",
|
238
250
|
|
239
251
|
"ejs-cli": "^2.0.1",
|
@@ -258,22 +270,16 @@
|
|
258
270
|
|
259
271
|
"onchange": "^3.2.1",
|
260
272
|
|
261
|
-
"postcss-assets": "^5.0.0",
|
262
|
-
|
263
273
|
"postcss-cli": "^4.1.0",
|
264
274
|
|
265
275
|
"postcss-cssnext": "^3.0.2",
|
266
276
|
|
267
277
|
"postcss-import": "^10.0.0",
|
268
278
|
|
269
|
-
"postcss-nested": "^3.0.0",
|
270
|
-
|
271
279
|
"rimraf": "^2.6.1",
|
272
280
|
|
273
281
|
"stylelint": "^8.0.0",
|
274
282
|
|
275
|
-
"stylelint-config-standard": "^18.2.0",
|
276
|
-
|
277
283
|
"uglify-es": "^3.0.26",
|
278
284
|
|
279
285
|
"watchify": "^3.9.0"
|
@@ -292,6 +298,4 @@
|
|
292
298
|
|
293
299
|
・cpxを使用したりしたのですが、srcの構造通りに出力できませんでした。
|
294
300
|
|
295
|
-
・出力できても**/*cssという形でアスタリスクがそのまま出力されてしまいました。
|
296
|
-
|
297
301
|
・それぞれのオプションを調べて記述してみましたが、上手くいきませんでした。
|
1
タグ追加
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|