From f3f0a19388c86f8eff597fa7a5128710958e1c7a Mon Sep 17 00:00:00 2001 From: shimks Date: Fri, 25 May 2018 12:45:55 -0400 Subject: [PATCH] fix: change lint to posttest --- examples/hello-world/package.json | 3 ++- examples/log-extension/package.json | 2 +- examples/rpc-server/package.json | 2 +- examples/todo/package.json | 2 +- packages/cli/generators/project/templates/package.json.ejs | 4 ++-- .../cli/generators/project/templates/package.plain.json.ejs | 2 +- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/examples/hello-world/package.json b/examples/hello-world/package.json index 273a19f0b902..595d209f2cd8 100644 --- a/examples/hello-world/package.json +++ b/examples/hello-world/package.json @@ -13,6 +13,7 @@ "build:current": "lb-tsc", "build:dist8": "lb-tsc es2017", "build:dist10": "lb-tsc es2018", + "build:watch": "lb-tsc --watch", "clean": "lb-clean *example-hello-world*.tgz dist* package api-docs", "verify": "npm pack && tar xf *example-hello-world*.tgz && tree package && npm run clean", "lint": "npm run prettier:check && npm run tslint", @@ -25,7 +26,7 @@ "pretest": "npm run clean && npm run build:current", "test": "lb-mocha --allow-console-logs \"DIST/test\"", "posttest": "npm run lint", - "test:dev": "lb-mocha DIST/test/**/*.js && npm run lint", + "test:dev": "lb-mocha --allow-console-logs DIST/test/**/*.js && npm run posttest", "prestart": "npm run build:current", "start": "node .", "prepublishOnly": "npm run test" diff --git a/examples/log-extension/package.json b/examples/log-extension/package.json index 57560b1d3eda..5b754e5a20ed 100644 --- a/examples/log-extension/package.json +++ b/examples/log-extension/package.json @@ -24,7 +24,7 @@ "pretest": "npm run clean && npm run build:current", "test": "lb-mocha \"DIST/test/unit/**/*.js\" \"DIST/test/acceptance/**/*.js\"", "posttest": "npm run lint", - "test:dev": "lb-mocha DIST/test/**/*.js && npm run lint", + "test:dev": "lb-mocha --allow-console-logs DIST/test/**/*.js && npm run posttest", "verify": "npm pack && tar xf *example-log-extension*.tgz && tree package && npm run clean" }, "repository": { diff --git a/examples/rpc-server/package.json b/examples/rpc-server/package.json index 1eff1d5e2f3f..c0a86cc37384 100644 --- a/examples/rpc-server/package.json +++ b/examples/rpc-server/package.json @@ -27,7 +27,7 @@ "pretest": "npm run clean && npm run build:current", "test": "lb-mocha DIST/test", "posttest": "npm run lint", - "test:dev": "lb-mocha DIST/test/**/*.js && npm run lint", + "test:dev": "lb-mocha --allow-console-logs DIST/test/**/*.js && npm run posttest", "prestart": "npm run build:current", "start": "node ." }, diff --git a/examples/todo/package.json b/examples/todo/package.json index d995b3c122e4..0d7eb199a5ff 100644 --- a/examples/todo/package.json +++ b/examples/todo/package.json @@ -24,7 +24,7 @@ "tslint:fix": "npm run tslint -- --fix", "pretest": "npm run build:current", "test": "lb-mocha \"DIST/test/unit/**/*.js\" \"DIST/test/acceptance/**/*.js\"", - "test:dev": "lb-mocha DIST/test/**/*.js && npm run lint", + "test:dev": "lb-mocha --allow-console-logs DIST/test/**/*.js && npm run posttest", "unit": "lb-mocha \"DIST/test/unit/**/*.js\"", "verify": "npm pack && tar xf loopback-todo*.tgz && tree package && npm run clean", "prestart": "npm run build:current", diff --git a/packages/cli/generators/project/templates/package.json.ejs b/packages/cli/generators/project/templates/package.json.ejs index 5b165259391d..8c9ecacff675 100644 --- a/packages/cli/generators/project/templates/package.json.ejs +++ b/packages/cli/generators/project/templates/package.json.ejs @@ -45,9 +45,9 @@ "posttest": "npm run lint", <% } -%> <% if (project.mocha && (project.prettier || project.tslint)) { -%> - "test:dev": "lb-mocha DIST/test/**/*.js && npm run lint", + "test:dev": "lb-mocha --allow-console-logs DIST/test/**/*.js && npm run posttest", <% } else if (project.mocha) { -%> - "test:dev": "lb-mocha DIST/test/**/*.js", + "test:dev": "lb-mocha --allow-console-logs DIST/test/**/*.js", <% } -%> <% if (project.projectType === 'application') { -%> "prestart": "npm run build:current", diff --git a/packages/cli/generators/project/templates/package.plain.json.ejs b/packages/cli/generators/project/templates/package.plain.json.ejs index dd6f8737cb79..fd6ba0409404 100644 --- a/packages/cli/generators/project/templates/package.plain.json.ejs +++ b/packages/cli/generators/project/templates/package.plain.json.ejs @@ -41,7 +41,7 @@ "posttest": "npm run lint", <% } -%> <% if (project.mocha && (project.prettier || project.tslint)) { -%> - "test:dev": "mocha dist/test/**/*.js && npm run lint", + "test:dev": "mocha dist/test/**/*.js && npm run posttest", <% } else if (project.mocha) { -%> "test:dev": "mocha dist/test/**/*.js", <% } -%>