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

build: drop multiple dist targets, always use es2017 #1803

Merged
merged 2 commits into from
Oct 4, 2018
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
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ coverage
.nyc_output
api-docs
**/*.tgz
packages/*/dist*
examples/*/dist*
benchmark/dist*
packages/*/dist
examples/*/dist
benchmark/dist
**/package
.sandbox
packages/cli/generators/datasource/connectors.json
Expand Down
8 changes: 4 additions & 4 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"include": [
"packages/*/dist*/",
"packages/*/dist",
"packages/cli/",
"examples/*/dist*/"
"examples/*/dist"
],
"exclude": [
"packages/*/dist*/test/",
"packages/*/dist/test/",
"packages/cli/test/",
"examples/*/dist*/test/",
"examples/*/dist/test/",
"**/.sandbox/"
],
"extension": [
Expand Down
6 changes: 3 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
**/*/api-docs
packages/cli/generators/*/templates
**/.sandbox
packages/*/dist*
examples/*/dist*
benchmark/dist*
packages/*/dist
examples/*/dist
benchmark/dist
sandbox/**/*
*.json
CHANGELOG.md
Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"args": [
"--opts",
"${workspaceRoot}/test/mocha.opts",
"packages/*/dist*/test/**/*.js",
"packages/*/dist/test/**/*.js",
"-t",
"0"
]
Expand Down
6 changes: 3 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"**/CVS": true,
".nyc_output": true,
"coverage": true,
"benchmark/dist*": true,
"packages/*/dist*": true,
"benchmark/dist": true,
"packages/*/dist": true,
"packages/*/api-docs": true,
"examples/*/dist*": true,
"examples/*/dist": true,
"**/.sandbox": true
},
"files.insertFinalNewline": true,
Expand Down
2 changes: 1 addition & 1 deletion benchmark/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

const bench = require('@loopback/dist-util').loadDist(__dirname);
const bench = require('./dist');

module.exports = bench;

Expand Down
14 changes: 5 additions & 9 deletions benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@
"node": ">=8.9"
},
"scripts": {
"build:all-dist": "npm run build:dist8 && npm run build:dist10",
"build": "lb-tsc",
"build:dist8": "lb-tsc es2017",
"build:dist10": "lb-tsc es2018",
"clean": "lb-clean dist*",
"build": "lb-tsc es2017 --outDir dist",
"clean": "lb-clean dist",
"pretest": "npm run clean && npm run build",
"test": "lb-mocha \"DIST/test\"",
"test": "lb-mocha \"dist/test\"",
"prestart": "npm run build",
"start": "node ."
},
Expand All @@ -32,12 +29,11 @@
"README.md",
"index.js",
"index.d.ts",
"dist*/src",
"dist*/index*",
"dist/src",
"dist/index*",
"src"
],
"dependencies": {
"@loopback/dist-util": "^0.3.7",
"@loopback/example-todo": "^0.21.0",
"@types/byline": "^4.2.31",
"@types/debug": "0.0.30",
Expand Down
2 changes: 1 addition & 1 deletion examples/hello-world/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dist*
dist
*.json
2 changes: 1 addition & 1 deletion examples/hello-world/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"**/.hg": true,
"**/.svn": true,
"**/CVS": true,
"dist*": true,
"dist": true,
},
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
Expand Down
2 changes: 1 addition & 1 deletion examples/hello-world/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

export * from './dist8';
export * from './dist';
2 changes: 1 addition & 1 deletion examples/hello-world/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

const application = require('@loopback/dist-util').loadDist(__dirname);
const application = require('./dist');

module.exports = application;

Expand Down
16 changes: 6 additions & 10 deletions examples/hello-world/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@
"node": ">=8.9"
},
"scripts": {
"acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"",
"build:all-dist": "npm run build:dist8 && npm run build:dist10",
"acceptance": "lb-mocha \"dist/test/acceptance/**/*.js\"",
"build:apidocs": "lb-apidocs",
"build": "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",
"build": "lb-tsc es2017 --outDir dist",
"build:watch": "lb-tsc es2017 --outDir dist --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",
"lint:fix": "npm run tslint:fix && npm run prettier:fix",
Expand All @@ -24,9 +21,9 @@
"tslint": "lb-tslint",
"tslint:fix": "npm run tslint -- --fix",
"pretest": "npm run clean && npm run build",
"test": "lb-mocha --allow-console-logs \"DIST/test\"",
"test": "lb-mocha --allow-console-logs \"dist/test\"",
"posttest": "npm run lint",
"test:dev": "lb-mocha --allow-console-logs DIST/test/**/*.js && npm run posttest",
"test:dev": "lb-mocha --allow-console-logs dist/test/**/*.js && npm run posttest",
"prestart": "npm run build",
"start": "node ."
},
Expand All @@ -40,7 +37,6 @@
"license": "MIT",
"dependencies": {
"@loopback/core": "^0.11.15",
"@loopback/dist-util": "^0.3.7",
"@loopback/rest": "^0.25.3"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/log-extension/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dist*
dist
*.json
2 changes: 1 addition & 1 deletion examples/log-extension/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"**/.hg": true,
"**/.svn": true,
"**/CVS": true,
"dist*": true,
"dist": true,
},
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
Expand Down
2 changes: 1 addition & 1 deletion examples/log-extension/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

export * from './dist8';
export * from './dist';
2 changes: 1 addition & 1 deletion examples/log-extension/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

module.exports = require('@loopback/dist-util').loadDist(__dirname);
module.exports = require('./dist');
14 changes: 5 additions & 9 deletions examples/log-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@
"node": ">=8.9"
},
"scripts": {
"build:all-dist": "npm run build:dist8 && npm run build:dist10",
"build:apidocs": "lb-apidocs",
"build": "lb-tsc",
"build:dist8": "lb-tsc es2017",
"build:dist10": "lb-tsc es2018",
"build:watch": "lb-tsc --watch",
"clean": "lb-clean *example-log-extension-*.tgz dist* package api-docs",
"build": "lb-tsc es2017 --outDir dist",
"build:watch": "lb-tsc es2017 --outDir dist --watch",
"clean": "lb-clean *example-log-extension-*.tgz dist package api-docs",
"lint": "npm run prettier:check && npm run tslint",
"lint:fix": "npm run tslint:fix && npm run prettier:fix",
"prettier:cli": "lb-prettier \"**/*.ts\" \"**/*.js\"",
Expand All @@ -22,9 +19,9 @@
"tslint": "lb-tslint",
"tslint:fix": "npm run tslint -- --fix",
"pretest": "npm run clean && npm run build",
"test": "lb-mocha \"DIST/test/unit/**/*.js\" \"DIST/test/acceptance/**/*.js\"",
"test": "lb-mocha \"dist/test/unit/**/*.js\" \"dist/test/acceptance/**/*.js\"",
"posttest": "npm run lint",
"test:dev": "lb-mocha --allow-console-logs DIST/test/**/*.js && npm run posttest",
"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": {
Expand Down Expand Up @@ -52,7 +49,6 @@
"dependencies": {
"@loopback/context": "^0.13.0",
"@loopback/core": "^0.11.15",
"@loopback/dist-util": "^0.3.7",
"@loopback/openapi-v3": "^0.15.3",
"@loopback/rest": "^0.25.3",
"chalk": "^2.3.2",
Expand Down
2 changes: 1 addition & 1 deletion examples/rpc-server/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dist*
dist
*.json
2 changes: 1 addition & 1 deletion examples/rpc-server/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"**/.hg": true,
"**/.svn": true,
"**/CVS": true,
"dist*": true,
"dist": true,
},
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
Expand Down
2 changes: 1 addition & 1 deletion examples/rpc-server/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

export * from './dist8';
export * from './dist';
2 changes: 1 addition & 1 deletion examples/rpc-server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

const application = require('@loopback/dist-util').loadDist(__dirname);
const application = require('./dist');

module.exports = application;

Expand Down
14 changes: 5 additions & 9 deletions examples/rpc-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@
"node": ">=8.9"
},
"scripts": {
"build:all-dist": "npm run build:dist8 && npm run build:dist10",
"build:apidocs": "lb-apidocs",
"build": "lb-tsc",
"build:dist8": "lb-tsc es2017",
"build:dist10": "lb-tsc es2018",
"build:watch": "lb-tsc --watch",
"clean": "lb-clean dist*",
"build": "lb-tsc es2017 --outDir dist",
"build:watch": "lb-tsc es2017 --outDir dist --watch",
"clean": "lb-clean dist",
"lint": "npm run prettier:check && npm run tslint",
"lint:fix": "npm run tslint:fix && npm run prettier:fix",
"prettier:cli": "lb-prettier \"**/*.ts\"",
Expand All @@ -25,9 +22,9 @@
"tslint": "lb-tslint",
"tslint:fix": "npm run tslint -- --fix",
"pretest": "npm run clean && npm run build",
"test": "lb-mocha DIST/test",
"test": "lb-mocha dist/test",
"posttest": "npm run lint",
"test:dev": "lb-mocha --allow-console-logs DIST/test/**/*.js && npm run posttest",
"test:dev": "lb-mocha --allow-console-logs dist/test/**/*.js && npm run posttest",
"prestart": "npm run build",
"start": "node ."
},
Expand All @@ -43,7 +40,6 @@
"dependencies": {
"@loopback/context": "^0.13.0",
"@loopback/core": "^0.11.15",
"@loopback/dist-util": "^0.3.7",
"express": "^4.16.3",
"p-event": "^2.1.0"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/soap-calculator/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dist*
dist
*.json
2 changes: 1 addition & 1 deletion examples/soap-calculator/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"**/.hg": true,
"**/.svn": true,
"**/CVS": true,
"dist*": true,
"dist": true,
},
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
Expand Down
2 changes: 1 addition & 1 deletion examples/soap-calculator/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
// Node module: @loopback/example-soap-calculator
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT
export * from './dist8';
export * from './dist';
2 changes: 1 addition & 1 deletion examples/soap-calculator/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const application = require('@loopback/dist-util').loadDist(__dirname);
const application = require('./dist');

module.exports = application;

Expand Down
14 changes: 5 additions & 9 deletions examples/soap-calculator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,10 @@
"node": ">=8"
},
"scripts": {
"build:all-dist": "npm run build:dist8 && npm run build:dist10",
"build:apidocs": "lb-apidocs",
"build": "lb-tsc",
"build:dist8": "lb-tsc es2017",
"build:dist10": "lb-tsc es2018",
"build:watch": "lb-tsc --watch",
"clean": "lb-clean *example-soap*.tgz dist* package api-docs dist*",
"build": "lb-tsc es2017 --outDir dist",
"build:watch": "lb-tsc es2017 --outDir dist --watch",
"clean": "lb-clean *example-soap*.tgz dist package api-docs dist",
"lint": "npm run prettier:check && npm run tslint",
"lint:fix": "npm run tslint:fix && npm run prettier:fix",
"prettier:cli": "lb-prettier \"**/*.ts\" \"**/*.js\"",
Expand All @@ -29,9 +26,9 @@
"tslint": "lb-tslint",
"tslint:fix": "npm run tslint -- --fix",
"pretest": "npm run clean && npm run build",
"test": "lb-mocha \"DIST/test\"",
"test": "lb-mocha \"dist/test\"",
"posttest": "npm run lint",
"test:dev": "lb-mocha --allow-console-logs DIST/test/**/*.js && npm run posttest",
"test:dev": "lb-mocha --allow-console-logs dist/test/**/*.js && npm run posttest",
"prestart": "npm run build",
"start": "node ."
},
Expand All @@ -46,7 +43,6 @@
"@loopback/boot": "^0.14.4",
"@loopback/context": "^0.13.0",
"@loopback/core": "^0.11.15",
"@loopback/dist-util": "^0.3.7",
"@loopback/openapi-v3": "^0.15.3",
"@loopback/repository": "^0.20.0",
"@loopback/rest": "^0.25.3",
Expand Down
2 changes: 1 addition & 1 deletion examples/todo-list/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dist*
dist
*.json
2 changes: 1 addition & 1 deletion examples/todo-list/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"**/.hg": true,
"**/.svn": true,
"**/CVS": true,
"dist*": true,
"dist": true,
},
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
Expand Down
2 changes: 1 addition & 1 deletion examples/todo-list/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

export * from './dist8';
export * from './dist';
2 changes: 1 addition & 1 deletion examples/todo-list/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

const application = require('@loopback/dist-util').loadDist(__dirname);
const application = require('./dist');

module.exports = application;

Expand Down
Loading