Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.

Commit 54cd069

Browse files
GaoYYYangbytedance
authored andcommitted
fix: fix error occured when cli copy files and prettier excute error
1 parent 6aaf6a9 commit 54cd069

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"build": "cross-env NODE_ENV=production babel src -d dist --ignore \"src/**/*.test.js\" --copy-files",
2424
"clean": "del-cli dist",
2525
"commitlint": "commitlint --from=master",
26-
"lint:prettier": "prettier \"{**/*,*}.{js,json,md,yml,css}\" --list-different",
26+
"lint:prettier": "prettier \"{**/*,*}.{js,json,md,yml,css}\" --write --list-different",
2727
"lint:js": "eslint --cache src test",
2828
"lint": "npm-run-all -l -p \"lint:**\"",
2929
"prepare": "npm run build",
@@ -34,7 +34,8 @@
3434
"test:coverage": "cross-env NODE_ENV=test jest --collectCoverageFrom=\"src/**/*.js\" --coverage",
3535
"pretest": "npm run lint",
3636
"test": "cross-env NODE_ENV=test npm run test:coverage",
37-
"defaults": "npm run build && node bin/index.js"
37+
"defaults": "npm run build && node bin/index.js",
38+
"postinstall": "node lib/post_install.js"
3839
},
3940
"files": [
4041
"bin",

src/tasks/package.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ module.exports = () => {
9191
test: 'npm run test:coverage',
9292
prepare: 'npm run build',
9393
release: 'standard-version',
94-
defaults: existing.scripts.defaults || 'webpack-defaults',
94+
defaults:
95+
(existing.scripts && existing.scripts.defaults) || 'webpack-defaults',
9596
},
9697
files: existing.files || ['dist/', 'lib/', 'index.js'],
9798
peerDependencies: existing.peerDependencies || {

src/tasks/templates.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,20 @@ const files = [
2626

2727
const testFiles = [
2828
'test/loader.test.js',
29-
'test/options.test.js',
30-
'test/fixtures/fixture.js',
29+
'test/cjs.test.js',
30+
'test/name-option.test.js',
31+
'test/validate-options.test.js',
32+
'test/fixtures/simple.js',
3133
'test/fixtures/foo.js',
32-
'test/helpers/compiler.js',
34+
'test/helpers/compile.js',
35+
'test/helpers/execute.js',
36+
'test/helpers/getCompiler.js',
37+
'test/helpers/getErrors.js',
38+
'test/helpers/getWarnings.js',
39+
'test/helpers/index.js',
40+
'test/helpers/normalizeErrors.js',
41+
'test/helpers/readAsset.js',
42+
'test/helpers/readAssets.js',
3343
];
3444

3545
// These files will be created only once

0 commit comments

Comments
 (0)