Skip to content

Commit 9ae93d8

Browse files
committed
build: drop multiple dist targets, always use es2017
1 parent 0e72ab9 commit 9ae93d8

File tree

95 files changed

+222
-318
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+222
-318
lines changed

.gitignore

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ coverage
66
.nyc_output
77
api-docs
88
**/*.tgz
9-
packages/*/dist*
10-
examples/*/dist*
11-
benchmark/dist*
9+
packages/*/dist
10+
examples/*/dist
11+
benchmark/dist
1212
**/package
1313
.sandbox
1414
packages/cli/generators/datasource/connectors.json

.nycrc

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"include": [
3-
"packages/*/dist*/",
3+
"packages/*/dist",
44
"packages/cli/",
5-
"examples/*/dist*/"
5+
"examples/*/dist"
66
],
77
"exclude": [
8-
"packages/*/dist*/test/",
8+
"packages/*/dist/test/",
99
"packages/cli/test/",
10-
"examples/*/dist*/test/",
10+
"examples/*/dist/test/",
1111
"**/.sandbox/"
1212
],
1313
"extension": [

.prettierignore

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
**/*/api-docs
33
packages/cli/generators/*/templates
44
**/.sandbox
5-
packages/*/dist*
6-
examples/*/dist*
7-
benchmark/dist*
5+
packages/*/dist
6+
examples/*/dist
7+
benchmark/dist
88
sandbox/**/*
99
*.json
1010
CHANGELOG.md

.vscode/launch.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"args": [
1414
"--opts",
1515
"${workspaceRoot}/test/mocha.opts",
16-
"packages/*/dist*/test/**/*.js",
16+
"packages/*/dist/test/**/*.js",
1717
"-t",
1818
"0"
1919
]

.vscode/settings.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
"**/CVS": true,
1616
".nyc_output": true,
1717
"coverage": true,
18-
"benchmark/dist*": true,
19-
"packages/*/dist*": true,
18+
"benchmark/dist": true,
19+
"packages/*/dist": true,
2020
"packages/*/api-docs": true,
21-
"examples/*/dist*": true,
21+
"examples/*/dist": true,
2222
"**/.sandbox": true
2323
},
2424
"files.insertFinalNewline": true,

benchmark/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// This file is licensed under the MIT License.
44
// License text available at https://opensource.org/licenses/MIT
55

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

88
module.exports = bench;
99

benchmark/package.json

+5-9
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,10 @@
1313
"node": ">=8.9"
1414
},
1515
"scripts": {
16-
"build:all-dist": "npm run build:dist8 && npm run build:dist10",
17-
"build": "lb-tsc",
18-
"build:dist8": "lb-tsc es2017",
19-
"build:dist10": "lb-tsc es2018",
20-
"clean": "lb-clean dist*",
16+
"build": "lb-tsc es2017 --outDir dist",
17+
"clean": "lb-clean dist",
2118
"pretest": "npm run clean && npm run build",
22-
"test": "lb-mocha \"DIST/test\"",
19+
"test": "lb-mocha \"dist/test\"",
2320
"prestart": "npm run build",
2421
"start": "node ."
2522
},
@@ -32,12 +29,11 @@
3229
"README.md",
3330
"index.js",
3431
"index.d.ts",
35-
"dist*/src",
36-
"dist*/index*",
32+
"dist/src",
33+
"dist/index*",
3734
"src"
3835
],
3936
"dependencies": {
40-
"@loopback/dist-util": "^0.3.7",
4137
"@loopback/example-todo": "^0.21.0",
4238
"@types/byline": "^4.2.31",
4339
"@types/debug": "0.0.30",

examples/hello-world/.prettierignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
dist*
1+
dist
22
*.json

examples/hello-world/.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"**/.hg": true,
1212
"**/.svn": true,
1313
"**/CVS": true,
14-
"dist*": true,
14+
"dist": true,
1515
},
1616
"files.insertFinalNewline": true,
1717
"files.trimTrailingWhitespace": true,

examples/hello-world/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
// This file is licensed under the MIT License.
44
// License text available at https://opensource.org/licenses/MIT
55

6-
export * from './dist8';
6+
export * from './dist';

examples/hello-world/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// This file is licensed under the MIT License.
44
// License text available at https://opensource.org/licenses/MIT
55

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

88
module.exports = application;
99

examples/hello-world/package.json

+6-10
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,11 @@
77
"node": ">=8.9"
88
},
99
"scripts": {
10-
"acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"",
11-
"build:all-dist": "npm run build:dist8 && npm run build:dist10",
10+
"acceptance": "lb-mocha \"dist/test/acceptance/**/*.js\"",
1211
"build:apidocs": "lb-apidocs",
13-
"build": "lb-tsc",
14-
"build:dist8": "lb-tsc es2017",
15-
"build:dist10": "lb-tsc es2018",
16-
"build:watch": "lb-tsc --watch",
17-
"clean": "lb-clean *example-hello-world*.tgz dist* package api-docs",
12+
"build": "lb-tsc es2017 --outDir dist",
13+
"build:watch": "lb-tsc es2017 --outDir dist --watch",
14+
"clean": "lb-clean *example-hello-world*.tgz dist package api-docs",
1815
"verify": "npm pack && tar xf *example-hello-world*.tgz && tree package && npm run clean",
1916
"lint": "npm run prettier:check && npm run tslint",
2017
"lint:fix": "npm run tslint:fix && npm run prettier:fix",
@@ -24,9 +21,9 @@
2421
"tslint": "lb-tslint",
2522
"tslint:fix": "npm run tslint -- --fix",
2623
"pretest": "npm run clean && npm run build",
27-
"test": "lb-mocha --allow-console-logs \"DIST/test\"",
24+
"test": "lb-mocha --allow-console-logs \"dist/test\"",
2825
"posttest": "npm run lint",
29-
"test:dev": "lb-mocha --allow-console-logs DIST/test/**/*.js && npm run posttest",
26+
"test:dev": "lb-mocha --allow-console-logs dist/test/**/*.js && npm run posttest",
3027
"prestart": "npm run build",
3128
"start": "node ."
3229
},
@@ -40,7 +37,6 @@
4037
"license": "MIT",
4138
"dependencies": {
4239
"@loopback/core": "^0.11.15",
43-
"@loopback/dist-util": "^0.3.7",
4440
"@loopback/rest": "^0.25.3"
4541
},
4642
"devDependencies": {
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
dist*
1+
dist
22
*.json

examples/log-extension/.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"**/.hg": true,
1212
"**/.svn": true,
1313
"**/CVS": true,
14-
"dist*": true,
14+
"dist": true,
1515
},
1616
"files.insertFinalNewline": true,
1717
"files.trimTrailingWhitespace": true,

examples/log-extension/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
// This file is licensed under the MIT License.
44
// License text available at https://opensource.org/licenses/MIT
55

6-
export * from './dist8';
6+
export * from './dist';

examples/log-extension/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
// This file is licensed under the MIT License.
44
// License text available at https://opensource.org/licenses/MIT
55

6-
module.exports = require('@loopback/dist-util').loadDist(__dirname);
6+
module.exports = require('./dist');

examples/log-extension/package.json

+5-9
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@
77
"node": ">=8.9"
88
},
99
"scripts": {
10-
"build:all-dist": "npm run build:dist8 && npm run build:dist10",
1110
"build:apidocs": "lb-apidocs",
12-
"build": "lb-tsc",
13-
"build:dist8": "lb-tsc es2017",
14-
"build:dist10": "lb-tsc es2018",
15-
"build:watch": "lb-tsc --watch",
16-
"clean": "lb-clean *example-log-extension-*.tgz dist* package api-docs",
11+
"build": "lb-tsc es2017 --outDir dist",
12+
"build:watch": "lb-tsc es2017 --outDir dist --watch",
13+
"clean": "lb-clean *example-log-extension-*.tgz dist package api-docs",
1714
"lint": "npm run prettier:check && npm run tslint",
1815
"lint:fix": "npm run tslint:fix && npm run prettier:fix",
1916
"prettier:cli": "lb-prettier \"**/*.ts\" \"**/*.js\"",
@@ -22,9 +19,9 @@
2219
"tslint": "lb-tslint",
2320
"tslint:fix": "npm run tslint -- --fix",
2421
"pretest": "npm run clean && npm run build",
25-
"test": "lb-mocha \"DIST/test/unit/**/*.js\" \"DIST/test/acceptance/**/*.js\"",
22+
"test": "lb-mocha \"dist/test/unit/**/*.js\" \"dist/test/acceptance/**/*.js\"",
2623
"posttest": "npm run lint",
27-
"test:dev": "lb-mocha --allow-console-logs DIST/test/**/*.js && npm run posttest",
24+
"test:dev": "lb-mocha --allow-console-logs dist/test/**/*.js && npm run posttest",
2825
"verify": "npm pack && tar xf *example-log-extension*.tgz && tree package && npm run clean"
2926
},
3027
"repository": {
@@ -52,7 +49,6 @@
5249
"dependencies": {
5350
"@loopback/context": "^0.13.0",
5451
"@loopback/core": "^0.11.15",
55-
"@loopback/dist-util": "^0.3.7",
5652
"@loopback/openapi-v3": "^0.15.3",
5753
"@loopback/rest": "^0.25.3",
5854
"chalk": "^2.3.2",

examples/rpc-server/.prettierignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
dist*
1+
dist
22
*.json

examples/rpc-server/.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"**/.hg": true,
1212
"**/.svn": true,
1313
"**/CVS": true,
14-
"dist*": true,
14+
"dist": true,
1515
},
1616
"files.insertFinalNewline": true,
1717
"files.trimTrailingWhitespace": true,

examples/rpc-server/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
// This file is licensed under the MIT License.
44
// License text available at https://opensource.org/licenses/MIT
55

6-
export * from './dist8';
6+
export * from './dist';

examples/rpc-server/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// This file is licensed under the MIT License.
44
// License text available at https://opensource.org/licenses/MIT
55

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

88
module.exports = application;
99

examples/rpc-server/package.json

+5-9
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,10 @@
1010
"node": ">=8.9"
1111
},
1212
"scripts": {
13-
"build:all-dist": "npm run build:dist8 && npm run build:dist10",
1413
"build:apidocs": "lb-apidocs",
15-
"build": "lb-tsc",
16-
"build:dist8": "lb-tsc es2017",
17-
"build:dist10": "lb-tsc es2018",
18-
"build:watch": "lb-tsc --watch",
19-
"clean": "lb-clean dist*",
14+
"build": "lb-tsc es2017 --outDir dist",
15+
"build:watch": "lb-tsc es2017 --outDir dist --watch",
16+
"clean": "lb-clean dist",
2017
"lint": "npm run prettier:check && npm run tslint",
2118
"lint:fix": "npm run tslint:fix && npm run prettier:fix",
2219
"prettier:cli": "lb-prettier \"**/*.ts\"",
@@ -25,9 +22,9 @@
2522
"tslint": "lb-tslint",
2623
"tslint:fix": "npm run tslint -- --fix",
2724
"pretest": "npm run clean && npm run build",
28-
"test": "lb-mocha DIST/test",
25+
"test": "lb-mocha dist/test",
2926
"posttest": "npm run lint",
30-
"test:dev": "lb-mocha --allow-console-logs DIST/test/**/*.js && npm run posttest",
27+
"test:dev": "lb-mocha --allow-console-logs dist/test/**/*.js && npm run posttest",
3128
"prestart": "npm run build",
3229
"start": "node ."
3330
},
@@ -43,7 +40,6 @@
4340
"dependencies": {
4441
"@loopback/context": "^0.13.0",
4542
"@loopback/core": "^0.11.15",
46-
"@loopback/dist-util": "^0.3.7",
4743
"express": "^4.16.3",
4844
"p-event": "^2.1.0"
4945
},
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
dist*
1+
dist
22
*.json

examples/soap-calculator/.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"**/.hg": true,
1212
"**/.svn": true,
1313
"**/CVS": true,
14-
"dist*": true,
14+
"dist": true,
1515
},
1616
"files.insertFinalNewline": true,
1717
"files.trimTrailingWhitespace": true,

examples/soap-calculator/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
// Node module: @loopback/example-soap-calculator
33
// This file is licensed under the MIT License.
44
// License text available at https://opensource.org/licenses/MIT
5-
export * from './dist8';
5+
export * from './dist';

examples/soap-calculator/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const application = require('@loopback/dist-util').loadDist(__dirname);
1+
const application = require('./dist');
22

33
module.exports = application;
44

examples/soap-calculator/package.json

+5-9
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,10 @@
1414
"node": ">=8"
1515
},
1616
"scripts": {
17-
"build:all-dist": "npm run build:dist8 && npm run build:dist10",
1817
"build:apidocs": "lb-apidocs",
19-
"build": "lb-tsc",
20-
"build:dist8": "lb-tsc es2017",
21-
"build:dist10": "lb-tsc es2018",
22-
"build:watch": "lb-tsc --watch",
23-
"clean": "lb-clean *example-soap*.tgz dist* package api-docs dist*",
18+
"build": "lb-tsc es2017 --outDir dist",
19+
"build:watch": "lb-tsc es2017 --outDir dist --watch",
20+
"clean": "lb-clean *example-soap*.tgz dist package api-docs dist",
2421
"lint": "npm run prettier:check && npm run tslint",
2522
"lint:fix": "npm run tslint:fix && npm run prettier:fix",
2623
"prettier:cli": "lb-prettier \"**/*.ts\" \"**/*.js\"",
@@ -29,9 +26,9 @@
2926
"tslint": "lb-tslint",
3027
"tslint:fix": "npm run tslint -- --fix",
3128
"pretest": "npm run clean && npm run build",
32-
"test": "lb-mocha \"DIST/test\"",
29+
"test": "lb-mocha \"dist/test\"",
3330
"posttest": "npm run lint",
34-
"test:dev": "lb-mocha --allow-console-logs DIST/test/**/*.js && npm run posttest",
31+
"test:dev": "lb-mocha --allow-console-logs dist/test/**/*.js && npm run posttest",
3532
"prestart": "npm run build",
3633
"start": "node ."
3734
},
@@ -46,7 +43,6 @@
4643
"@loopback/boot": "^0.14.4",
4744
"@loopback/context": "^0.13.0",
4845
"@loopback/core": "^0.11.15",
49-
"@loopback/dist-util": "^0.3.7",
5046
"@loopback/openapi-v3": "^0.15.3",
5147
"@loopback/repository": "^0.20.0",
5248
"@loopback/rest": "^0.25.3",

examples/todo-list/.prettierignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
dist*
1+
dist
22
*.json

examples/todo-list/.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"**/.hg": true,
1212
"**/.svn": true,
1313
"**/CVS": true,
14-
"dist*": true,
14+
"dist": true,
1515
},
1616
"files.insertFinalNewline": true,
1717
"files.trimTrailingWhitespace": true,

examples/todo-list/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
// This file is licensed under the MIT License.
44
// License text available at https://opensource.org/licenses/MIT
55

6-
export * from './dist8';
6+
export * from './dist';

examples/todo-list/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// This file is licensed under the MIT License.
44
// License text available at https://opensource.org/licenses/MIT
55

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

88
module.exports = application;
99

0 commit comments

Comments
 (0)