Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): force a clean build in prestart npm script #6588

Merged
merged 2 commits into from
Oct 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions examples/access-control-migration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@
"prettier:fix": "npm run prettier:cli -- --write",
"eslint": "lb-eslint --report-unused-disable-directives .",
"eslint:fix": "npm run eslint -- --fix",
"pretest": "npm run build",
"pretest": "npm run rebuild",
"test": "lb-mocha \"dist/__tests__/**/*.js\"",
"test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js",
"verify": "npm pack && tar xf loopback-access-control-migration*.tgz && tree package && npm run clean",
"premigrate": "npm run build ",
"migrate": "node ./dist/migrate",
"preopenapi-spec": "npm run build",
"openapi-spec": "node ./dist/openapi-spec",
"prestart": "npm run build",
"rebuild": "npm run clean && npm run build",
"prestart": "npm run rebuild",
"start": "node ."
},
"repository": {
Expand Down
5 changes: 3 additions & 2 deletions examples/binding-resolution/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@
"scripts": {
"build": "lb-tsc",
"build:watch": "lb-tsc --watch",
"pretest": "npm run clean && npm run build",
"pretest": "npm run rebuild",
"test": "lb-mocha --allow-console-logs \"dist/__tests__\"",
"test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js",
"prestart": "npm run build",
"rebuild": "npm run clean && npm run build",
"prestart": "npm run rebuild",
"start": "node -r source-map-support/register .",
"clean": "lb-clean dist *.tsbuildinfo .eslintcache"
},
Expand Down
5 changes: 3 additions & 2 deletions examples/context/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@
"prettier:fix": "npm run prettier:cli -- --write",
"eslint": "lb-eslint --report-unused-disable-directives .",
"eslint:fix": "npm run eslint -- --fix",
"pretest": "npm run clean && npm run build",
"pretest": "npm run rebuild",
"test": "lb-mocha \"dist/__tests__/**/*.js\"",
"posttest": "npm run lint",
"test:dev": "lb-mocha dist/__tests__/**/*.js && npm run posttest",
"prestart": "npm run build",
"rebuild": "npm run clean && npm run build",
"prestart": "npm run rebuild",
"start": "node ."
},
"repository": {
Expand Down
5 changes: 3 additions & 2 deletions examples/express-composition/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@
"prettier:fix": "npm run prettier:cli -- --write",
"eslint": "lb-eslint --report-unused-disable-directives .",
"eslint:fix": "npm run eslint -- --fix",
"pretest": "npm run clean && npm run build",
"pretest": "npm run rebuild",
"test": "lb-mocha \"dist/__tests__/**/*.js\"",
"posttest": "npm run lint",
"test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js && npm run posttest",
"premigrate": "npm run build ",
"migrate": "node ./dist/migrate",
"prestart": "npm run build",
"rebuild": "npm run clean && npm run build",
"prestart": "npm run rebuild",
"start": "node ."
},
"repository": {
Expand Down
5 changes: 3 additions & 2 deletions examples/file-transfer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@
"prettier:fix": "npm run prettier:cli -- --write",
"eslint": "lb-eslint --report-unused-disable-directives .",
"eslint:fix": "npm run eslint -- --fix",
"pretest": "npm run clean && npm run build",
"pretest": "npm run rebuild",
"test": "lb-mocha \"dist/__tests__/**/*.js\"",
"test:dev": "lb-mocha dist/__tests__/**/*.js && npm run posttest",
"prestart": "npm run build",
"rebuild": "npm run clean && npm run build",
"prestart": "npm run rebuild",
"start": "node ."
},
"repository": {
Expand Down
5 changes: 3 additions & 2 deletions examples/graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@
"prettier:fix": "npm run prettier:cli -- --write",
"eslint": "lb-eslint --report-unused-disable-directives .",
"eslint:fix": "npm run eslint -- --fix",
"pretest": "npm run clean && npm run build",
"pretest": "npm run rebuild",
"test": "lb-mocha \"dist/__tests__/**/*.js\"",
"test:dev": "lb-mocha dist/__tests__/**/*.js && npm run posttest",
"prestart": "npm run build",
"rebuild": "npm run clean && npm run build",
"prestart": "npm run rebuild",
"start": "node ."
},
"repository": {
Expand Down
5 changes: 3 additions & 2 deletions examples/greeter-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
"prettier:fix": "npm run prettier:cli -- --write",
"eslint": "lb-eslint --report-unused-disable-directives .",
"eslint:fix": "npm run eslint -- --fix",
"pretest": "npm run clean && npm run build",
"pretest": "npm run rebuild",
"test": "lb-mocha \"dist/__tests__/**/*.js\"",
"posttest": "npm run lint",
"test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js && npm run posttest",
"prestart": "npm run build",
"rebuild": "npm run clean && npm run build",
"prestart": "npm run rebuild",
"start": "node .",
"verify": "npm pack && tar xf *example-greeter-extension*.tgz && tree package && npm run clean"
},
Expand Down
5 changes: 3 additions & 2 deletions examples/greeting-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
"prettier:fix": "npm run prettier:cli -- --write",
"eslint": "lb-eslint --report-unused-disable-directives .",
"eslint:fix": "npm run eslint -- --fix",
"pretest": "npm run clean && npm run build",
"pretest": "npm run rebuild",
"test": "lb-mocha \"dist/__tests__/**/*.js\"",
"posttest": "npm run lint",
"test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js && npm run posttest",
"openapi-spec": "node ./dist/openapi-spec",
"prestart": "npm run build",
"rebuild": "npm run clean && npm run build",
"prestart": "npm run rebuild",
"start": "node .",
"verify": "npm pack && tar xf *example-greeting-app*.tgz && tree package && npm run clean"
},
Expand Down
5 changes: 3 additions & 2 deletions examples/hello-world/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@
"prettier:fix": "npm run prettier:cli -- --write",
"eslint": "lb-eslint --report-unused-disable-directives .",
"eslint:fix": "npm run eslint -- --fix",
"pretest": "npm run clean && npm run build",
"pretest": "npm run rebuild",
"test": "lb-mocha --allow-console-logs \"dist/__tests__/**/*.js\"",
"posttest": "npm run lint",
"test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js && npm run posttest",
"prestart": "npm run build",
"rebuild": "npm run clean && npm run build",
"prestart": "npm run rebuild",
"start": "node ."
},
"repository": {
Expand Down
5 changes: 3 additions & 2 deletions examples/lb3-application/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@
"prettier:fix": "npm run prettier:cli -- --write",
"eslint": "lb-eslint --report-unused-disable-directives .",
"eslint:fix": "npm run eslint -- --fix",
"pretest": "npm run build",
"pretest": "npm run rebuild",
"test": "lb-mocha \"dist/__tests__/**/*.js\" \"lb3app/test/*.js\"",
"test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js && npm run posttest",
"verify": "npm pack && tar xf loopback-lb3-application*.tgz && tree package && npm run clean",
"premigrate": "npm run build ",
"migrate": "node ./dist/migrate",
"preopenapi-spec": "npm run build",
"openapi-spec": "node ./dist/openapi-spec",
"prestart": "npm run build",
"rebuild": "npm run clean && npm run build",
"prestart": "npm run rebuild",
"start": "node ."
},
"repository": {
Expand Down
3 changes: 2 additions & 1 deletion examples/log-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"prettier:fix": "npm run prettier:cli -- --write",
"eslint": "lb-eslint --report-unused-disable-directives .",
"eslint:fix": "npm run eslint -- --fix",
"pretest": "npm run clean && npm run build",
"pretest": "npm run rebuild",
"rebuild": "npm run clean && npm run build",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

start and prestart scripts are missing in this file

"test": "lb-mocha \"dist/__tests__/**/*.js\"",
"posttest": "npm run lint",
"test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js && npm run posttest",
Expand Down
5 changes: 3 additions & 2 deletions examples/metrics-prometheus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@
"prettier:fix": "npm run prettier:cli -- --write",
"eslint": "lb-eslint --report-unused-disable-directives .",
"eslint:fix": "npm run eslint -- --fix",
"pretest": "npm run clean && npm run build",
"pretest": "npm run rebuild",
"test": "lb-mocha \"dist/__tests__/**/*.js\"",
"posttest": "npm run lint",
"test:dev": "lb-mocha dist/__tests__/**/*.js && npm run posttest",
"prestart": "npm run build",
"rebuild": "npm run clean && npm run build",
"prestart": "npm run rebuild",
"start": "node .",
"demo": "./bin/demo.sh"
},
Expand Down
5 changes: 3 additions & 2 deletions examples/multi-tenancy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"prettier:fix": "npm run prettier:cli -- --write",
"eslint": "lb-eslint --report-unused-disable-directives .",
"eslint:fix": "npm run eslint -- --fix",
"pretest": "npm run clean && npm run build",
"pretest": "npm run rebuild",
"test": "lb-mocha --allow-console-logs \"dist/__tests__\"",
"test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js",
"docker:build": "docker build -t @loopback/example-multi-tenancy .",
Expand All @@ -31,7 +31,8 @@
"migrate": "node ./dist/migrate",
"preopenapi-spec": "npm run build",
"openapi-spec": "node ./dist/openapi-spec",
"prestart": "npm run build",
"rebuild": "npm run clean && npm run build",
"prestart": "npm run rebuild",
"start": "node -r source-map-support/register .",
"clean": "lb-clean dist *.tsbuildinfo .eslintcache"
},
Expand Down
5 changes: 3 additions & 2 deletions examples/passport-login/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
"prettier:fix": "npm run prettier:cli -- --write",
"eslint": "lb-eslint --report-unused-disable-directives .",
"eslint:fix": "npm run eslint -- --fix",
"pretest": "npm run clean && npm run build",
"pretest": "npm run rebuild",
"test": "lb-mocha \"dist/__tests__/**/*.js\"",
"test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js && npm run posttest",
"premigrate": "npm run build ",
"migrate": "node ./dist/migrate",
"prestart": "npm run build",
"rebuild": "npm run clean && npm run build",
"prestart": "npm run rebuild",
"start": "node ."
},
"repository": {
Expand Down
5 changes: 3 additions & 2 deletions examples/rest-crud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@
"prettier:fix": "npm run prettier:cli -- --write",
"eslint": "lb-eslint --report-unused-disable-directives .",
"eslint:fix": "npm run eslint -- --fix",
"pretest": "npm run build",
"pretest": "npm run rebuild",
"test": "lb-mocha \"dist/__tests__/**/*.js\"",
"test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js && npm run posttest",
"verify": "npm pack && tar xf loopback-rest-crud*.tgz && tree package && npm run clean",
"premigrate": "npm run build ",
"migrate": "node ./dist/migrate",
"preopenapi-spec": "npm run build",
"openapi-spec": "node ./dist/openapi-spec",
"prestart": "npm run build",
"rebuild": "npm run clean && npm run build",
"prestart": "npm run rebuild",
"start": "node ."
},
"repository": {
Expand Down
5 changes: 3 additions & 2 deletions examples/rpc-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@
"prettier:fix": "npm run prettier:cli -- --write",
"eslint": "lb-eslint --report-unused-disable-directives .",
"eslint:fix": "npm run eslint -- --fix",
"pretest": "npm run clean && npm run build",
"pretest": "npm run rebuild",
"test": "lb-mocha \"dist/__tests__/**/*.js\"",
"posttest": "npm run lint",
"test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js && npm run posttest",
"prestart": "npm run build",
"rebuild": "npm run clean && npm run build",
"prestart": "npm run rebuild",
"start": "node ."
},
"repository": {
Expand Down
5 changes: 3 additions & 2 deletions examples/soap-calculator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@
"prettier:fix": "npm run prettier:cli -- --write",
"eslint": "lb-eslint --report-unused-disable-directives .",
"eslint:fix": "npm run eslint -- --fix",
"pretest": "npm run clean && npm run build",
"pretest": "npm run rebuild",
"test": "lb-mocha \"dist/__tests__/**/*.js\"",
"posttest": "npm run lint",
"test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js && npm run posttest",
"prestart": "npm run build",
"rebuild": "npm run clean && npm run build",
"prestart": "npm run rebuild",
"start": "node ."
},
"repository": {
Expand Down
5 changes: 3 additions & 2 deletions examples/todo-jwt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,16 @@
"prettier:fix": "npm run prettier:cli -- --write",
"eslint": "lb-eslint --report-unused-disable-directives .",
"eslint:fix": "npm run eslint -- --fix",
"pretest": "npm run build",
"pretest": "npm run rebuild",
"test": "lb-mocha \"dist/__tests__/**/*.js\"",
"test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js && npm run posttest",
"verify": "npm pack && tar xf loopback-todo*.tgz && tree package && npm run clean",
"premigrate": "npm run build ",
"migrate": "node ./dist/migrate",
"preopenapi-spec": "npm run build",
"openapi-spec": "node ./dist/openapi-spec",
"prestart": "npm run build",
"rebuild": "npm run clean && npm run build",
"prestart": "npm run rebuild",
"start": "node ."
},
"dependencies": {
Expand Down
5 changes: 3 additions & 2 deletions examples/todo-list/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@
"prettier:fix": "npm run prettier:cli -- --write",
"eslint": "lb-eslint --report-unused-disable-directives .",
"eslint:fix": "npm run eslint -- --fix",
"pretest": "npm run build",
"pretest": "npm run rebuild",
"test": "lb-mocha \"dist/__tests__/**/*.js\"",
"test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js && npm run posttest",
"verify": "npm pack && tar xf loopback-todo-list*.tgz && tree package && npm run clean",
"premigrate": "npm run build ",
"migrate": "node ./dist/migrate",
"preopenapi-spec": "npm run build",
"openapi-spec": "node ./dist/openapi-spec",
"prestart": "npm run build",
"rebuild": "npm run clean && npm run build",
"prestart": "npm run rebuild",
"start": "node ."
},
"repository": {
Expand Down
5 changes: 3 additions & 2 deletions examples/todo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@
"prettier:fix": "npm run prettier:cli -- --write",
"eslint": "lb-eslint --report-unused-disable-directives .",
"eslint:fix": "npm run eslint -- --fix",
"pretest": "npm run build",
"pretest": "npm run rebuild",
"test": "lb-mocha \"dist/__tests__/**/*.js\"",
"test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js && npm run posttest",
"verify": "npm pack && tar xf loopback-todo*.tgz && tree package && npm run clean",
"premigrate": "npm run build ",
"migrate": "node ./dist/migrate",
"preopenapi-spec": "npm run build",
"openapi-spec": "node ./dist/openapi-spec",
"prestart": "npm run build",
"rebuild": "npm run clean && npm run build",
"prestart": "npm run rebuild",
"start": "node ."
},
"repository": {
Expand Down
5 changes: 3 additions & 2 deletions examples/validation-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"prettier:fix": "npm run prettier:cli -- --write",
"eslint": "lb-eslint --report-unused-disable-directives .",
"eslint:fix": "npm run eslint -- --fix",
"pretest": "npm run clean && npm run build",
"pretest": "npm run rebuild",
"test": "lb-mocha --allow-console-logs \"dist/__tests__\"",
"posttest": "npm run lint",
"test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js && npm run posttest",
Expand All @@ -34,7 +34,8 @@
"migrate": "node ./dist/migrate",
"preopenapi-spec": "npm run build",
"openapi-spec": "node ./dist/openapi-spec",
"prestart": "npm run build",
"rebuild": "npm run clean && npm run build",
"prestart": "npm run rebuild",
"start": "node -r source-map-support/register ."
},
"repository": {
Expand Down
5 changes: 3 additions & 2 deletions examples/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
"prepack": "npm run build:webpack-web",
"clean": "lb-clean *example-webpack*.tgz dist *.tsbuildinfo package",
"verify": "npm pack && tar xf *example-webpack*.tgz && tree package && npm run clean",
"pretest": "npm run clean && npm run build",
"pretest": "npm run rebuild",
"test": "lb-mocha \"dist/__tests__/**/*.js\"",
"prestart": "npm run build",
"rebuild": "npm run clean && npm run build",
"prestart": "npm run rebuild",
"start": "node ."
},
"repository": {
Expand Down
10 changes: 6 additions & 4 deletions packages/cli/generators/project/templates/package.json.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@
<% } -%>
<% } -%>
<% if (packageManager === 'yarn') { -%>
"pretest": "yarn run clean && yarn run build",
"pretest": "yarn run rebuild",
<% } else { -%>
"pretest": "npm run clean && npm run build",
"pretest": "npm run rebuild",
<% } -%>
<% if (project.mocha) { -%>
"test": "lb-mocha --allow-console-logs \"dist/__tests__\"",
Expand Down Expand Up @@ -94,9 +94,11 @@
"preopenapi-spec": "npm run build",
"openapi-spec": "node ./dist/openapi-spec",
<% if (packageManager === 'yarn') { -%>
"prestart": "yarn run build",
"rebuild": "yarn run clean && yarn run build",
"prestart": "yarn run rebuild",
<% } else { -%>
"prestart": "npm run build",
"rebuild": "npm run clean && npm run build",
"prestart": "npm run rebuild",
<% } -%>
"start": "node -r source-map-support/register .",
<% } -%>
Expand Down
Loading