diff --git a/package.json b/package.json index bedf37d3cb2d..57f3227192ce 100644 --- a/package.json +++ b/package.json @@ -35,9 +35,8 @@ "clean": "lerna run clean --loglevel=silent --parallel", "clean:lerna": "lerna clean --yes --parallel --loglevel=silent", "build": "lerna run build --parallel --loglevel=silent", - "build:current": "lerna run build:current --parallel --loglevel=silent", "build:full": "npm run clean:lerna && npm run bootstrap && npm run build && npm run mocha && npm run lint", - "pretest": "npm run clean && npm run build:current", + "pretest": "npm run clean && npm run build", "test": "node packages/build/bin/run-nyc npm run mocha", "mocha": "node packages/build/bin/run-mocha \"packages/*/DIST/test/**/*.js\" \"packages/cli/test/*.js\"", "posttest": "npm run lint" diff --git a/packages/authentication/index.js b/packages/authentication/index.js index c0b7a759d1ad..58a5b15c5d7c 100644 --- a/packages/authentication/index.js +++ b/packages/authentication/index.js @@ -3,5 +3,4 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -const nodeMajorVersion = +process.versions.node.split('.')[0]; -module.exports = nodeMajorVersion >= 7 ? require('./dist') : require('./dist6'); +module.exports = require('./dist'); diff --git a/packages/authentication/package.json b/packages/authentication/package.json index 6e1d638cfafd..e075b3c2b4cc 100644 --- a/packages/authentication/package.json +++ b/packages/authentication/package.json @@ -7,15 +7,12 @@ }, "scripts": { "acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"", - "build": "npm run build:dist && npm run build:dist6", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", - "build:dist6": "lb-tsc es2015", + "build": "lb-tsc es2017", "build:apidocs": "lb-apidocs", - "clean": "lb-clean loopback-authentication*.tgz dist dist6 package api-docs", + "clean": "lb-clean loopback-authentication*.tgz dist package api-docs", "integration": "lb-mocha \"DIST/test/integration/**/*.js\"", "prepublishOnly": "npm run build && npm run build:apidocs", - "pretest": "npm run build:current", + "pretest": "npm run build", "test": "lb-mocha \"DIST/test/unit/**/*.js\" \"DIST/test/integration/**/*.js\" \"DIST/test/acceptance/**/*.js\"", "unit": "lb-mocha \"DIST/test/unit/**/*.js\"", "verify": "npm pack && tar xf loopback-authentication*.tgz && tree package && npm run clean" @@ -48,7 +45,6 @@ "index.js", "index.d.ts", "dist/src", - "dist6/src", "api-docs", "src" ], diff --git a/packages/cli/generators/app/templates/index.js b/packages/cli/generators/app/templates/index.js index afdd32cb0a5b..e9e309f61490 100644 --- a/packages/cli/generators/app/templates/index.js +++ b/packages/cli/generators/app/templates/index.js @@ -3,10 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -const nodeMajorVersion = +process.versions.node.split('.')[0]; -const dist = nodeMajorVersion >= 7 ? './dist' : './dist6'; - -const application = (module.exports = require(dist)); +const application = (module.exports = require('./dist')); if (require.main === module) { // Run the application diff --git a/packages/cli/generators/project/templates/index.d.ts b/packages/cli/generators/extension/templates/index.d.ts similarity index 100% rename from packages/cli/generators/project/templates/index.d.ts rename to packages/cli/generators/extension/templates/index.d.ts diff --git a/packages/cli/generators/extension/templates/index.js b/packages/cli/generators/extension/templates/index.js index d45624350b9c..290f483a6e50 100644 --- a/packages/cli/generators/extension/templates/index.js +++ b/packages/cli/generators/extension/templates/index.js @@ -3,6 +3,4 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -const nodeMajorVersion = +process.versions.node.split('.')[0]; -const dist = nodeMajorVersion >= 7 ? './dist' : './dist6'; -module.exports = require(dist); +module.exports = require('./dist'); diff --git a/packages/cli/generators/project/templates/package.json b/packages/cli/generators/project/templates/package.json index 39d27328fb0c..475ac79042e3 100644 --- a/packages/cli/generators/project/templates/package.json +++ b/packages/cli/generators/project/templates/package.json @@ -11,8 +11,8 @@ "node": ">=8" }, "scripts": { - "build": "lb-tsc", - "build:watch": "lb-tsc --watch", + "build": "lb-tsc es2017", + "build:watch": "lb-tsc es2017 --watch", "clean": "lb-clean", <% if (project.prettier && project.tslint) { -%> "lint": "npm run prettier:check && npm run tslint", @@ -54,8 +54,7 @@ "README.md", "index.js", "index.d.ts", - "dist", - "dist6" + "dist" ], "dependencies": { "@loopback/context": ">=4.0.0-alpha.18", diff --git a/packages/context/index.js b/packages/context/index.js index e870396803d8..02b88d34ff0f 100644 --- a/packages/context/index.js +++ b/packages/context/index.js @@ -3,5 +3,4 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -const nodeMajorVersion = +process.versions.node.split('.')[0]; -module.exports = nodeMajorVersion >= 7 ? require('./dist') : require('./dist6'); +module.exports = require('./dist'); diff --git a/packages/context/package.json b/packages/context/package.json index 55dc98e8c7c3..a87af3f3829f 100644 --- a/packages/context/package.json +++ b/packages/context/package.json @@ -7,14 +7,11 @@ }, "scripts": { "acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"", - "build": "npm run build:dist && npm run build:dist6", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", - "build:dist6": "lb-tsc es2015", + "build": "lb-tsc es2017", "build:apidocs": "lb-apidocs", - "clean": "lb-clean loopback-context*.tgz dist dist6 package api-docs", + "clean": "lb-clean loopback-context*.tgz dist package api-docs", "prepublishOnly": "npm run build && npm run build:apidocs", - "pretest": "npm run build:current", + "pretest": "npm run build", "test": "lb-mocha \"DIST/test/unit/**/*.js\" \"DIST/test/acceptance/**/*.js\"", "unit": "lb-mocha \"DIST/test/unit/**/*.js\"", "verify": "npm pack && tar xf loopback-context*.tgz && tree package && npm run clean" @@ -47,7 +44,6 @@ "index.js", "index.d.ts", "dist/src", - "dist6/src", "api-docs", "src" ], diff --git a/packages/core/index.js b/packages/core/index.js index 966945af946c..5ffcc4e9d9a2 100644 --- a/packages/core/index.js +++ b/packages/core/index.js @@ -3,5 +3,4 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -const nodeMajorVersion = +process.versions.node.split('.')[0]; -module.exports = nodeMajorVersion >= 7 ? require('./dist') : require('./dist6'); +module.exports = require('./dist'); diff --git a/packages/core/package.json b/packages/core/package.json index 2eb66496f6b0..7466893498b8 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -7,14 +7,11 @@ }, "scripts": { "acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"", - "build": "npm run build:dist && npm run build:dist6", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", - "build:dist6": "lb-tsc es2015", + "build": "lb-tsc es2017", "build:apidocs": "lb-apidocs", - "clean": "lb-clean loopback-core*.tgz dist dist6 package api-docs", + "clean": "lb-clean loopback-core*.tgz dist package api-docs", "prepublishOnly": "npm run build && npm run build:apidocs", - "pretest": "npm run build:current", + "pretest": "npm run build", "integration": "lb-mocha \"DIST/test/integration/**/*.js\"", "test": "lb-mocha \"DIST/test/unit/**/*.js\" \"DIST/test/integration/**/*.js\" \"DIST/test/acceptance/**/*.js\"", "unit": "lb-mocha \"DIST/test/unit/**/*.js\"", @@ -36,8 +33,10 @@ "README.md", "index.js", "index.d.ts", + "dist/index.js", "dist/src", - "dist6/src", + "dist/index.d.ts", + "dist/index.js.map", "api-docs", "src" ], diff --git a/packages/example-getting-started/index.js b/packages/example-getting-started/index.js index 20cb263c2a1f..bf96713b9849 100644 --- a/packages/example-getting-started/index.js +++ b/packages/example-getting-started/index.js @@ -3,10 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -const nodeMajorVersion = +process.versions.node.split('.')[0]; -const dist = nodeMajorVersion >= 7 ? './dist' : './dist6'; - -const application = (module.exports = require(dist)); +const application = (module.exports = require('./dist')); if (require.main === module) { // Run the application diff --git a/packages/example-getting-started/package.json b/packages/example-getting-started/package.json index 97ac369c8d15..763a162fa215 100644 --- a/packages/example-getting-started/package.json +++ b/packages/example-getting-started/package.json @@ -9,14 +9,11 @@ }, "scripts": { "acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"", - "build": "npm run build:dist && npm run build:dist6", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", - "build:dist6": "lb-tsc es2015", + "build": "lb-tsc es2017", "build:apidocs": "lb-apidocs", - "clean": "lb-clean *example-getting-started*.tgz dist dist6 package api-docs", + "clean": "lb-clean *example-getting-started*.tgz dist package api-docs", "prepublishOnly": "npm run build && npm run build:apidocs", - "pretest": "npm run build:current", + "pretest": "npm run build", "test": "lb-mocha \"DIST/test/unit/**/*.js\" \"DIST/test/acceptance/**/*.js\"", "unit": "lb-mocha \"DIST/test/unit/**/*.js\"", "verify": "npm pack && tar xf loopback-getting-started*.tgz && tree package && npm run clean", diff --git a/packages/example-hello-world/index.js b/packages/example-hello-world/index.js index 7cef61480f34..257c1394315e 100644 --- a/packages/example-hello-world/index.js +++ b/packages/example-hello-world/index.js @@ -3,10 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -const nodeMajorVersion = +process.versions.node.split('.')[0]; -const dist = nodeMajorVersion >= 7 ? './dist' : './dist6'; - -const application = (module.exports = require(dist)); +const application = (module.exports = require('./dist')); if (require.main === module) { // Run the application diff --git a/packages/example-hello-world/package.json b/packages/example-hello-world/package.json index 2735648b1de2..83238aee333c 100644 --- a/packages/example-hello-world/package.json +++ b/packages/example-hello-world/package.json @@ -9,12 +9,9 @@ }, "scripts": { "acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"", - "build": "npm run build:dist && npm run build:dist6", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", - "build:dist6": "lb-tsc es2015", + "build": "lb-tsc es2017", "build:apidocs": "lb-apidocs", - "clean": "lb-clean *example-hello-world*.tgz dist dist6 package api-docs", + "clean": "lb-clean *example-hello-world*.tgz dist package api-docs", "prepublishOnly": "npm run build && npm run build:apidocs", "verify": "npm pack && tar xf *example-hello-world*.tgz && tree package && npm run clean", "start": "npm run build && node ." diff --git a/packages/example-log-extension/index.js b/packages/example-log-extension/index.js index 4df543b66fff..5a959bde84af 100644 --- a/packages/example-log-extension/index.js +++ b/packages/example-log-extension/index.js @@ -3,6 +3,4 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -const nodeMajorVersion = +process.versions.node.split('.')[0]; -const dist = nodeMajorVersion >= 7 ? './dist' : './dist6'; -module.exports = require(dist); +module.exports = require('./dist'); diff --git a/packages/example-log-extension/package.json b/packages/example-log-extension/package.json index 6559ac27bc8b..7f71b4bba2fa 100644 --- a/packages/example-log-extension/package.json +++ b/packages/example-log-extension/package.json @@ -8,13 +8,10 @@ "node": ">=8" }, "scripts": { - "build": "npm run build:dist && npm run build:dist6", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", - "build:dist6": "lb-tsc es2015", + "build": "lb-tsc es2017", "build:apidocs": "lb-apidocs", - "build:watch": "lb-tsc --watch", - "clean": "lb-clean *example-log-extension-*.tgz dist dist6 package api-docs", + "build:watch": "lb-tsc es2017 --watch", + "clean": "lb-clean *example-log-extension-*.tgz dist package api-docs", "lint": "npm run prettier:check && npm run tslint", "lint:fix": "npm run prettier:fix && npm run tslint", "prettier:cli": "lb-prettier \"**/*.ts\" \"**/*.js\"", @@ -23,7 +20,7 @@ "tslint": "lb-tslint", "tslint:fix": "npm run tslint -- --fix", "prepublishOnly": "npm run build", - "pretest": "npm run clean && npm run build:current", + "pretest": "npm run clean && npm run build", "test": "lb-mocha \"DIST/test/unit/**/*.js\" \"DIST/test/acceptance/**/*.js\"", "posttest": "npm run lint", "verify": "npm pack && tar xf *example-log-extension*.tgz && tree package && npm run clean" diff --git a/packages/example-rpc-server/index.js b/packages/example-rpc-server/index.js index 20cb263c2a1f..bf96713b9849 100644 --- a/packages/example-rpc-server/index.js +++ b/packages/example-rpc-server/index.js @@ -3,10 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -const nodeMajorVersion = +process.versions.node.split('.')[0]; -const dist = nodeMajorVersion >= 7 ? './dist' : './dist6'; - -const application = (module.exports = require(dist)); +const application = (module.exports = require('./dist')); if (require.main === module) { // Run the application diff --git a/packages/example-rpc-server/package.json b/packages/example-rpc-server/package.json index c65bb8cf26f7..a499f4433c9c 100644 --- a/packages/example-rpc-server/package.json +++ b/packages/example-rpc-server/package.json @@ -11,11 +11,8 @@ "node": ">=8" }, "scripts": { - "build": "npm run build:dist && npm run build:dist6", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", - "build:dist6": "lb-tsc es2015", - "build:watch": "lb-tsc --watch", + "build": "lb-tsc es2017", + "build:watch": "lb-tsc es2017 --watch", "clean": "lb-clean", "lint": "npm run prettier:check && npm run tslint", "lint:fix": "npm run prettier:fix && npm run tslint:fix", @@ -24,7 +21,7 @@ "prettier:fix": "npm run prettier:cli -- --write", "tslint": "lb-tslint", "tslint:fix": "npm run tslint -- --fix", - "pretest": "npm run clean && npm run build:current", + "pretest": "npm run clean && npm run build", "test": "lb-dist mocha --opts node_modules/@loopback/build/mocha.opts DIST/test", "posttest": "npm run lint", "start": "npm run build && node .", @@ -40,8 +37,7 @@ "README.md", "index.js", "index.d.ts", - "dist", - "dist6" + "dist" ], "dependencies": { "@loopback/context": "^4.0.0-alpha.30", diff --git a/packages/metadata/index.js b/packages/metadata/index.js index 2af66bfda9f6..abe1a945f2d7 100644 --- a/packages/metadata/index.js +++ b/packages/metadata/index.js @@ -3,5 +3,4 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -const nodeMajorVersion = +process.versions.node.split('.')[0]; -module.exports = nodeMajorVersion >= 7 ? require('./dist') : require('./dist6'); +module.exports = require('./dist'); diff --git a/packages/metadata/package.json b/packages/metadata/package.json index 6cd2480593e7..370244dc2fa5 100644 --- a/packages/metadata/package.json +++ b/packages/metadata/package.json @@ -7,14 +7,11 @@ }, "scripts": { "acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"", - "build": "npm run build:dist && npm run build:dist6", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", - "build:dist6": "lb-tsc es2015", + "build": "lb-tsc es2017", "build:apidocs": "lb-apidocs", - "clean": "lb-clean loopback-metadata*.tgz dist dist6 package api-docs", + "clean": "lb-clean loopback-metadata*.tgz dist package api-docs", "prepublishOnly": "npm run build && npm run build:apidocs", - "pretest": "npm run build:current", + "pretest": "npm run build", "test": "lb-mocha \"DIST/test/unit/**/*.js\" \"DIST/test/acceptance/**/*.js\"", "unit": "lb-mocha \"DIST/test/unit/**/*.js\"", "verify": "npm pack && tar xf loopback-metadata*.tgz && tree package && npm run clean" @@ -43,7 +40,6 @@ "index.js", "index.d.ts", "dist/src", - "dist6/src", "api-docs", "src" ], diff --git a/packages/openapi-spec-builder/index.js b/packages/openapi-spec-builder/index.js index dbf2ab88169c..787bb07128bd 100644 --- a/packages/openapi-spec-builder/index.js +++ b/packages/openapi-spec-builder/index.js @@ -3,5 +3,4 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -const nodeMajorVersion = +process.versions.node.split('.')[0]; -module.exports = nodeMajorVersion >= 7 ? require('./dist') : require('./dist6'); +module.exports = require('./dist'); diff --git a/packages/openapi-spec-builder/package.json b/packages/openapi-spec-builder/package.json index 3a36f9982f19..9816f1f0c442 100644 --- a/packages/openapi-spec-builder/package.json +++ b/packages/openapi-spec-builder/package.json @@ -6,12 +6,9 @@ "node": ">=8" }, "scripts": { - "build": "npm run build:dist && npm run build:dist6", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", - "build:dist6": "lb-tsc es2015", + "build": "lb-tsc es2017", "build:apidocs": "lb-apidocs", - "clean": "lb-clean loopback-openapi-spec*.tgz dist dist6 package api-docs", + "clean": "lb-clean loopback-openapi-spec*.tgz dist package api-docs", "prepublishOnly": "npm run build && npm run build:apidocs", "verify": "npm pack && tar xf loopback-openapi-spec*.tgz && tree package && npm run clean" }, @@ -36,7 +33,6 @@ "index.js", "index.d.ts", "dist/src", - "dist6/src", "api-docs", "src" ], diff --git a/packages/openapi-spec/index.js b/packages/openapi-spec/index.js index 64016c4e2abf..5326c63c1525 100644 --- a/packages/openapi-spec/index.js +++ b/packages/openapi-spec/index.js @@ -3,5 +3,4 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -const nodeMajorVersion = +process.versions.node.split('.')[0]; -module.exports = nodeMajorVersion >= 7 ? require('./dist') : require('./dist6'); +module.exports = require('./dist'); diff --git a/packages/openapi-spec/package.json b/packages/openapi-spec/package.json index c30b76a79540..42197db8ba20 100644 --- a/packages/openapi-spec/package.json +++ b/packages/openapi-spec/package.json @@ -9,12 +9,9 @@ "@loopback/build": "^4.0.0-alpha.13" }, "scripts": { - "build": "npm run build:dist && npm run build:dist6", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", - "build:dist6": "lb-tsc es2015", + "build": "lb-tsc es2017", "build:apidocs": "lb-apidocs", - "clean": "lb-clean loopback-openapi-spec*.tgz dist dist6 package api-docs", + "clean": "lb-clean loopback-openapi-spec*.tgz dist package api-docs", "prepublishOnly": "npm run build && npm run build:apidocs", "verify": "npm pack && tar xf loopback-openapi-spec*.tgz && tree package && npm run clean" }, @@ -32,7 +29,6 @@ "index.js", "index.d.ts", "dist/src", - "dist6/src", "api-docs", "src" ], diff --git a/packages/openapi-v2/index.js b/packages/openapi-v2/index.js index 4e9d47c5b3db..c849a637c3a7 100644 --- a/packages/openapi-v2/index.js +++ b/packages/openapi-v2/index.js @@ -3,5 +3,4 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -const nodeMajorVersion = +process.versions.node.split('.')[0]; -module.exports = nodeMajorVersion >= 7 ? require('./dist') : require('./dist6'); +module.exports = require('./dist'); diff --git a/packages/openapi-v2/package.json b/packages/openapi-v2/package.json index e04cf04f9fe4..5a3120ed2a1c 100644 --- a/packages/openapi-v2/package.json +++ b/packages/openapi-v2/package.json @@ -14,14 +14,11 @@ "@types/lodash": "^4.14.96" }, "scripts": { - "build": "npm run build:dist && npm run build:dist6", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", - "build:dist6": "lb-tsc es2015", + "build": "lb-tsc es2017", "build:apidocs": "lb-apidocs", "clean": "lb-clean loopback-openapi-v2*.tgz dist* package", "prepublishOnly": "npm run build && npm run build:apidocs", - "pretest": "npm run build:current", + "pretest": "npm run build", "test": "lb-mocha \"DIST/test/unit/**/*.js\"", "verify": "npm pack && tar xf loopback-openapi-v2*.tgz && tree package && npm run clean" }, @@ -38,7 +35,6 @@ "index.js", "index.d.ts", "dist/src", - "dist6/src", "api-docs", "src" ], diff --git a/packages/repository-json-schema/index.js b/packages/repository-json-schema/index.js index 625f8b13c397..63d928e335a0 100644 --- a/packages/repository-json-schema/index.js +++ b/packages/repository-json-schema/index.js @@ -3,5 +3,4 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -const nodeMajorVersion = +process.versions.node.split('.')[0]; -module.exports = nodeMajorVersion >= 7 ? require('./dist') : require('./dist6'); +module.exports = require('./dist'); diff --git a/packages/repository-json-schema/package.json b/packages/repository-json-schema/package.json index 537a8da1c23c..a0ed5f4d2665 100644 --- a/packages/repository-json-schema/package.json +++ b/packages/repository-json-schema/package.json @@ -6,14 +6,11 @@ "node": ">=8" }, "scripts": { - "build": "npm run build:dist && npm run build:dist6", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", - "build:dist6": "lb-tsc es2015", + "build": "lb-tsc es2017", "build:apidocs": "lb-apidocs", - "clean": "lb-clean loopback-json-schema*.tgz dist dist6 package api-docs", + "clean": "lb-clean loopback-json-schema*.tgz dist package api-docs", "prepublishOnly": "npm run build && npm run build:apidocs", - "pretest": "npm run build:current", + "pretest": "npm run build", "test": "lb-mocha \"DIST/test/unit/**/*.js\" \"DIST/test/integration/**/*.js\" \"DIST/test/acceptance/**/*.js\"", "verify": "npm pack && tar xf loopback-json-schema*.tgz && tree package && npm run clean" }, @@ -43,7 +40,6 @@ "index.js", "index.d.ts", "dist/src", - "dist6/src", "api-docs", "src" ], diff --git a/packages/repository/index.js b/packages/repository/index.js index 17f69e9118d4..062e5fcd6297 100644 --- a/packages/repository/index.js +++ b/packages/repository/index.js @@ -3,5 +3,4 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -const nodeMajorVersion = +process.versions.node.split('.')[0]; -module.exports = nodeMajorVersion >= 7 ? require('./dist') : require('./dist6'); +module.exports = require('./dist'); diff --git a/packages/repository/package.json b/packages/repository/package.json index 317cd8592387..9b0b8baef4aa 100644 --- a/packages/repository/package.json +++ b/packages/repository/package.json @@ -8,14 +8,11 @@ "main": "index", "scripts": { "acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"", - "build": "npm run build:dist && npm run build:dist6", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", - "build:dist6": "lb-tsc es2015", + "build": "lb-tsc es2017", "build:apidocs": "lb-apidocs", - "clean": "lb-clean loopback-repository*.tgz dist dist6 package api-docs", + "clean": "lb-clean loopback-repository*.tgz dist package api-docs", "prepublishOnly": "npm run build && npm run build:apidocs", - "pretest": "npm run build:current", + "pretest": "npm run build", "test": "lb-mocha \"DIST/test/unit/**/*.js\" \"DIST/test/acceptance/**/*.js\"", "unit": "lb-mocha \"DIST/test/unit/**/*.js\"", "verify": "npm pack && tar xf loopback-juggler*.tgz && tree package && npm run clean" @@ -37,7 +34,6 @@ "index.js", "index.d.ts", "dist/src", - "dist6/src", "api-docs", "src" ], diff --git a/packages/rest/index.js b/packages/rest/index.js index 2535e2b16a39..a783530a92cb 100644 --- a/packages/rest/index.js +++ b/packages/rest/index.js @@ -3,5 +3,4 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -const nodeMajorVersion = +process.versions.node.split('.')[0]; -module.exports = nodeMajorVersion >= 7 ? require('./dist') : require('./dist6'); +module.exports = require('./dist'); diff --git a/packages/rest/package.json b/packages/rest/package.json index 1ba6192c4dfe..92a991f33a20 100644 --- a/packages/rest/package.json +++ b/packages/rest/package.json @@ -7,14 +7,11 @@ }, "scripts": { "acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"", - "build": "npm run build:dist && npm run build:dist6", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", - "build:dist6": "lb-tsc es2015", + "build": "lb-tsc es2017", "build:apidocs": "lb-apidocs", - "clean": "lb-clean loopback-rest*.tgz dist dist6 package api-docs", + "clean": "lb-clean loopback-rest*.tgz dist package api-docs", "prepublishOnly": "npm run build && npm run build:apidocs", - "pretest": "npm run build:current", + "pretest": "npm run build", "integration": "lb-mocha \"DIST/test/integration/**/*.js\"", "test": "lb-mocha \"DIST/test/unit/**/*.js\" \"DIST/test/integration/**/*.js\" \"DIST/test/acceptance/**/*.js\"", "unit": "lb-mocha \"DIST/test/unit/**/*.js\"", @@ -51,7 +48,6 @@ "index.js", "index.d.ts", "dist/src", - "dist6/src", "api-docs", "src" ], diff --git a/packages/testlab/index.js b/packages/testlab/index.js index 4a5d72903ca6..6ecdd18d3882 100644 --- a/packages/testlab/index.js +++ b/packages/testlab/index.js @@ -3,5 +3,4 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -const nodeMajorVersion = +process.versions.node.split('.')[0]; -module.exports = nodeMajorVersion >= 7 ? require('./dist') : require('./dist6'); +module.exports = require('./dist'); diff --git a/packages/testlab/package.json b/packages/testlab/package.json index b0b1fbf67d37..a31c90329414 100644 --- a/packages/testlab/package.json +++ b/packages/testlab/package.json @@ -6,13 +6,10 @@ "node": ">=8" }, "scripts": { - "build": "npm run build:dist && npm run build:dist6", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", - "build:dist6": "lb-tsc es2015", - "clean": "lb-clean loopback-testlab*.tgz dist dist6 package api-docs", + "build": "lb-tsc es2017", + "clean": "lb-clean loopback-testlab*.tgz dist package api-docs", "prepublishOnly": "npm run build", - "pretest": "npm run build:current", + "pretest": "npm run build", "test": "lb-mocha \"DIST/test\"", "verify": "npm pack && tar xf loopback-testlab*.tgz && tree package && npm run clean" }, @@ -41,7 +38,6 @@ "index.js", "index.d.ts", "dist/src", - "dist6/src", "should-as-function.d.ts", "src" ],