diff --git a/package.json b/package.json index ce2f2becba6e..d98420d773a5 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "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.d.ts b/packages/authentication/index.d.ts deleted file mode 100644 index daf48757e0b0..000000000000 --- a/packages/authentication/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright IBM Corp. 2017,2018. All Rights Reserved. -// Node module: @loopback/authentication -// This file is licensed under the MIT License. -// License text available at https://opensource.org/licenses/MIT - -export * from './dist'; diff --git a/packages/authentication/index.js b/packages/authentication/index.js deleted file mode 100644 index c0b7a759d1ad..000000000000 --- a/packages/authentication/index.js +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright IBM Corp. 2017,2018. All Rights Reserved. -// Node module: @loopback/authentication -// 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'); diff --git a/packages/authentication/package.json b/packages/authentication/package.json index 4272ce8fc5f0..f5bed0913459 100644 --- a/packages/authentication/package.json +++ b/packages/authentication/package.json @@ -5,16 +5,15 @@ "engines": { "node": ">=6" }, + "main": "dist/index.js", "scripts": { "acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"", - "build": "npm run build:dist", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", + "build": "lb-tsc", "build:apidocs": "lb-apidocs", "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" diff --git a/packages/context/index.d.ts b/packages/context/index.d.ts deleted file mode 100644 index 5002bc7a32ab..000000000000 --- a/packages/context/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright IBM Corp. 2017. All Rights Reserved. -// Node module: @loopback/context -// This file is licensed under the MIT License. -// License text available at https://opensource.org/licenses/MIT - -export * from './dist'; diff --git a/packages/context/index.js b/packages/context/index.js deleted file mode 100644 index e870396803d8..000000000000 --- a/packages/context/index.js +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright IBM Corp. 2017. All Rights Reserved. -// Node module: @loopback/context -// 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'); diff --git a/packages/context/package.json b/packages/context/package.json index 6aeee228761c..dfc23e8c8d5f 100644 --- a/packages/context/package.json +++ b/packages/context/package.json @@ -5,15 +5,14 @@ "engines": { "node": ">=6" }, + "main": "dist/index.js", "scripts": { "acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"", - "build": "npm run build:dist", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", + "build": "lb-tsc", "build:apidocs": "lb-apidocs", "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" diff --git a/packages/core/index.d.ts b/packages/core/index.d.ts deleted file mode 100644 index d4e09365e55e..000000000000 --- a/packages/core/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright IBM Corp. 2017. All Rights Reserved. -// Node module: @loopback/core -// This file is licensed under the MIT License. -// License text available at https://opensource.org/licenses/MIT - -export * from './dist'; diff --git a/packages/core/index.js b/packages/core/index.js deleted file mode 100644 index 966945af946c..000000000000 --- a/packages/core/index.js +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright IBM Corp. 2017. All Rights Reserved. -// Node module: @loopback/core -// 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'); diff --git a/packages/core/package.json b/packages/core/package.json index 83a2701bc94c..bf6a9f351051 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -5,15 +5,14 @@ "engines": { "node": ">=6" }, + "main": "dist/index.js", "scripts": { "acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"", - "build": "npm run build:dist", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", + "build": "lb-tsc", "build:apidocs": "lb-apidocs", "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\"", diff --git a/packages/example-getting-started/index.d.ts b/packages/example-getting-started/index.d.ts deleted file mode 100644 index 13ed083fde3a..000000000000 --- a/packages/example-getting-started/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright IBM Corp. 2017,2018. All Rights Reserved. -// Node module: @loopback/example-getting-started -// This file is licensed under the MIT License. -// License text available at https://opensource.org/licenses/MIT - -export * from './dist'; diff --git a/packages/example-getting-started/index.js b/packages/example-getting-started/index.js deleted file mode 100644 index 20cb263c2a1f..000000000000 --- a/packages/example-getting-started/index.js +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright IBM Corp. 2017,2018. All Rights Reserved. -// Node module: @loopback/example-getting-started -// 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)); - -if (require.main === module) { - // Run the application - application.main(); -} diff --git a/packages/example-getting-started/package.json b/packages/example-getting-started/package.json index 2ff0f2174fae..1c5b3cac6ce0 100644 --- a/packages/example-getting-started/package.json +++ b/packages/example-getting-started/package.json @@ -3,19 +3,17 @@ "version": "1.0.1-alpha.4", "description": "An application and tutorial on how to build with LoopBack 4.", "private": true, - "main": "index.js", + "main": "dist/index.js", "engines": { "node": ">=8" }, "scripts": { "acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"", - "build": "npm run build:dist", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", + "build": "lb-tsc", "build:apidocs": "lb-apidocs", "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.d.ts b/packages/example-hello-world/index.d.ts deleted file mode 100644 index 5b23fa367144..000000000000 --- a/packages/example-hello-world/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright IBM Corp. 2018. All Rights Reserved. -// Node module: @loopback/example-hello-world -// This file is licensed under the MIT License. -// License text available at https://opensource.org/licenses/MIT - -export * from './dist'; diff --git a/packages/example-hello-world/index.js b/packages/example-hello-world/index.js deleted file mode 100644 index 7cef61480f34..000000000000 --- a/packages/example-hello-world/index.js +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright IBM Corp. 2018. All Rights Reserved. -// Node module: @loopback/example-hello-world -// 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)); - -if (require.main === module) { - // Run the application - application.main(); -} diff --git a/packages/example-hello-world/package.json b/packages/example-hello-world/package.json index baf3ea16f7ab..6db9dfa3aac3 100644 --- a/packages/example-hello-world/package.json +++ b/packages/example-hello-world/package.json @@ -3,15 +3,13 @@ "version": "4.0.0-alpha.1", "description": "A simple hello-world Application using LoopBack 4", "private": true, - "main": "index.js", + "main": "dist/index.js", "engines": { "node": ">=6" }, "scripts": { "acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"", - "build": "npm run build:dist", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", + "build": "lb-tsc", "build:apidocs": "lb-apidocs", "clean": "lb-clean *example-hello-world*.tgz dist package api-docs", "prepublishOnly": "npm run build && npm run build:apidocs", diff --git a/packages/example-log-extension/index.d.ts b/packages/example-log-extension/index.d.ts deleted file mode 100644 index e31447d2ed98..000000000000 --- a/packages/example-log-extension/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright IBM Corp. 2018. All Rights Reserved. -// Node module: @loopback/example-log-extension -// This file is licensed under the MIT License. -// License text available at https://opensource.org/licenses/MIT - -export * from './dist'; diff --git a/packages/example-log-extension/index.js b/packages/example-log-extension/index.js deleted file mode 100644 index 4df543b66fff..000000000000 --- a/packages/example-log-extension/index.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright IBM Corp. 2018. All Rights Reserved. -// Node module: @loopback/example-log-extension -// 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); diff --git a/packages/example-log-extension/package.json b/packages/example-log-extension/package.json index 3502866b46f7..93c52fffab01 100644 --- a/packages/example-log-extension/package.json +++ b/packages/example-log-extension/package.json @@ -3,14 +3,12 @@ "version": "4.0.0-alpha.4", "description": "An example extension project for LoopBack 4", "private": true, - "main": "index.js", + "main": "dist/index.js", "engines": { "node": ">=6" }, "scripts": { - "build": "npm run build:dist", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", + "build": "lb-tsc", "build:apidocs": "lb-apidocs", "build:watch": "lb-tsc --watch", "clean": "lb-clean *example-log-extension-*.tgz dist package api-docs", @@ -22,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.d.ts b/packages/example-rpc-server/index.d.ts deleted file mode 100644 index 13ed083fde3a..000000000000 --- a/packages/example-rpc-server/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright IBM Corp. 2017,2018. All Rights Reserved. -// Node module: @loopback/example-getting-started -// This file is licensed under the MIT License. -// License text available at https://opensource.org/licenses/MIT - -export * from './dist'; diff --git a/packages/example-rpc-server/index.js b/packages/example-rpc-server/index.js deleted file mode 100644 index 20cb263c2a1f..000000000000 --- a/packages/example-rpc-server/index.js +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright IBM Corp. 2017,2018. All Rights Reserved. -// Node module: @loopback/example-getting-started -// 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)); - -if (require.main === module) { - // Run the application - application.main(); -} diff --git a/packages/example-rpc-server/package.json b/packages/example-rpc-server/package.json index 0bb5733e10a2..0f0c34bb677e 100644 --- a/packages/example-rpc-server/package.json +++ b/packages/example-rpc-server/package.json @@ -10,10 +10,9 @@ "engines": { "node": ">=6" }, + "main": "dist/index.js", "scripts": { - "build": "npm run build:dist", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", + "build": "lb-tsc", "build:watch": "lb-tsc --watch", "clean": "lb-clean", "lint": "npm run prettier:check && npm run tslint", @@ -23,7 +22,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 .", @@ -37,8 +36,6 @@ "license": "MIT", "files": [ "README.md", - "index.js", - "index.d.ts", "dist" ], "dependencies": { diff --git a/packages/metadata/index.d.ts b/packages/metadata/index.d.ts deleted file mode 100644 index 5ad88365eb71..000000000000 --- a/packages/metadata/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright IBM Corp. 2017. All Rights Reserved. -// Node module: @loopback/metadata -// This file is licensed under the MIT License. -// License text available at https://opensource.org/licenses/MIT - -export * from './dist'; diff --git a/packages/metadata/index.js b/packages/metadata/index.js deleted file mode 100644 index 2af66bfda9f6..000000000000 --- a/packages/metadata/index.js +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright IBM Corp. 2017,2018. All Rights Reserved. -// Node module: @loopback/metadata -// 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'); diff --git a/packages/metadata/package.json b/packages/metadata/package.json index 1ac71db284c8..05dd5d6bd4cf 100644 --- a/packages/metadata/package.json +++ b/packages/metadata/package.json @@ -5,15 +5,14 @@ "engines": { "node": ">=6" }, + "main": "dist/index.js", "scripts": { "acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"", - "build": "npm run build:dist", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", + "build": "lb-tsc", "build:apidocs": "lb-apidocs", "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" @@ -39,8 +38,7 @@ ], "files": [ "README.md", - "index.js", - "index.d.ts", + "dist/index.js", "dist/src", "api-docs", "src" diff --git a/packages/openapi-spec-builder/index.d.ts b/packages/openapi-spec-builder/index.d.ts deleted file mode 100644 index e6c72e4498a7..000000000000 --- a/packages/openapi-spec-builder/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright IBM Corp. 2017. All Rights Reserved. -// Node module: @loopback/openapi-spec-builder -// This file is licensed under the MIT License. -// License text available at https://opensource.org/licenses/MIT - -export * from './dist'; diff --git a/packages/openapi-spec-builder/index.js b/packages/openapi-spec-builder/index.js deleted file mode 100644 index dbf2ab88169c..000000000000 --- a/packages/openapi-spec-builder/index.js +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright IBM Corp. 2017,2018. All Rights Reserved. -// Node module: @loopback/openapi-spec-builder -// 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'); diff --git a/packages/openapi-spec-builder/package.json b/packages/openapi-spec-builder/package.json index 7bec1a61642a..46946f23a274 100644 --- a/packages/openapi-spec-builder/package.json +++ b/packages/openapi-spec-builder/package.json @@ -5,10 +5,9 @@ "engines": { "node": ">=6" }, + "main": "dist/index.js", "scripts": { - "build": "npm run build:dist", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", + "build": "lb-tsc", "build:apidocs": "lb-apidocs", "clean": "lb-clean loopback-openapi-spec*.tgz dist package api-docs", "prepublishOnly": "npm run build && npm run build:apidocs", @@ -32,8 +31,7 @@ }, "files": [ "README.md", - "index.js", - "index.d.ts", + "dist/index.js", "dist/src", "api-docs", "src" diff --git a/packages/openapi-spec/index.d.ts b/packages/openapi-spec/index.d.ts deleted file mode 100644 index dba88ee552d1..000000000000 --- a/packages/openapi-spec/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright IBM Corp. 2017,2018. All Rights Reserved. -// Node module: @loopback/openapi-spec -// This file is licensed under the MIT License. -// License text available at https://opensource.org/licenses/MIT - -export * from './dist'; diff --git a/packages/openapi-spec/index.js b/packages/openapi-spec/index.js deleted file mode 100644 index 64016c4e2abf..000000000000 --- a/packages/openapi-spec/index.js +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright IBM Corp. 2017,2018. All Rights Reserved. -// Node module: @loopback/openapi-spec -// 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'); diff --git a/packages/openapi-spec/package.json b/packages/openapi-spec/package.json index 3f52fda8d1a9..a9f5316f2e69 100644 --- a/packages/openapi-spec/package.json +++ b/packages/openapi-spec/package.json @@ -8,10 +8,9 @@ "devDependencies": { "@loopback/build": "^4.0.0-alpha.12" }, + "main": "dist/index.js", "scripts": { - "build": "npm run build:dist", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", + "build": "lb-tsc", "build:apidocs": "lb-apidocs", "clean": "lb-clean loopback-openapi-spec*.tgz dist package api-docs", "prepublishOnly": "npm run build && npm run build:apidocs", @@ -28,8 +27,7 @@ ], "files": [ "README.md", - "index.js", - "index.d.ts", + "dist/index.js", "dist/src", "api-docs", "src" diff --git a/packages/openapi-v2/index.d.ts b/packages/openapi-v2/index.d.ts deleted file mode 100644 index c1ab715d0c85..000000000000 --- a/packages/openapi-v2/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright IBM Corp. 2018. All Rights Reserved. -// Node module: @loopback/openapi-v2 -// This file is licensed under the MIT License. -// License text available at https://opensource.org/licenses/MIT - -export * from './dist'; diff --git a/packages/openapi-v2/index.js b/packages/openapi-v2/index.js deleted file mode 100644 index 4e9d47c5b3db..000000000000 --- a/packages/openapi-v2/index.js +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright IBM Corp. 2018. All Rights Reserved. -// Node module: @loopback/openapi-v2 -// 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'); diff --git a/packages/openapi-v2/package.json b/packages/openapi-v2/package.json index c63bfe6b986a..d2dc549ec049 100644 --- a/packages/openapi-v2/package.json +++ b/packages/openapi-v2/package.json @@ -5,6 +5,7 @@ "engines": { "node": ">=8" }, + "main": "dist/index.js", "devDependencies": { "@loopback/build": "^4.0.0-alpha.12", "@loopback/openapi-spec-builder": "^4.0.0-alpha.20", @@ -14,13 +15,11 @@ "@types/lodash": "^4.14.96" }, "scripts": { - "build": "npm run build:dist", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", + "build": "lb-tsc", "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" }, @@ -34,8 +33,7 @@ ], "files": [ "README.md", - "index.js", - "index.d.ts", + "dist/index.js", "dist/src", "api-docs", "src" diff --git a/packages/repository-json-schema/index.d.ts b/packages/repository-json-schema/index.d.ts deleted file mode 100644 index 336c25da6d11..000000000000 --- a/packages/repository-json-schema/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright IBM Corp. 2018. All Rights Reserved. -// Node module: @loopback/repository-json-schema -// This file is licensed under the MIT License. -// License text available at https://opensource.org/licenses/MIT - -export * from './dist'; diff --git a/packages/repository-json-schema/index.js b/packages/repository-json-schema/index.js deleted file mode 100644 index 625f8b13c397..000000000000 --- a/packages/repository-json-schema/index.js +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright IBM Corp. 2018. All Rights Reserved. -// Node module: @loopback/repository-json-schema -// 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'); diff --git a/packages/repository-json-schema/package.json b/packages/repository-json-schema/package.json index 1db122b396bc..62a293e07219 100644 --- a/packages/repository-json-schema/package.json +++ b/packages/repository-json-schema/package.json @@ -5,14 +5,13 @@ "engines": { "node": ">=6" }, + "main": "dist/index.js", "scripts": { - "build": "npm run build:dist", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", + "build": "lb-tsc", "build:apidocs": "lb-apidocs", "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" }, @@ -39,8 +38,7 @@ }, "files": [ "README.md", - "index.js", - "index.d.ts", + "dist/index.js", "dist/src", "api-docs", "src" diff --git a/packages/repository/index.d.ts b/packages/repository/index.d.ts deleted file mode 100644 index c79fbf1f353c..000000000000 --- a/packages/repository/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright IBM Corp. 2017. All Rights Reserved. -// Node module: @loopback/repository -// This file is licensed under the MIT License. -// License text available at https://opensource.org/licenses/MIT - -export * from './dist'; diff --git a/packages/repository/index.js b/packages/repository/index.js deleted file mode 100644 index 17f69e9118d4..000000000000 --- a/packages/repository/index.js +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright IBM Corp. 2017. All Rights Reserved. -// Node module: @loopback/repository -// 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'); diff --git a/packages/repository/package.json b/packages/repository/package.json index 987ae5543074..fc458fc122f3 100644 --- a/packages/repository/package.json +++ b/packages/repository/package.json @@ -5,16 +5,14 @@ "engines": { "node": ">=6" }, - "main": "index", + "main": "dist/index.js", "scripts": { "acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"", - "build": "npm run build:dist", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", + "build": "lb-tsc", "build:apidocs": "lb-apidocs", "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" @@ -33,8 +31,7 @@ }, "files": [ "README.md", - "index.js", - "index.d.ts", + "dist/index.js", "dist/src", "api-docs", "src" diff --git a/packages/rest/index.d.ts b/packages/rest/index.d.ts deleted file mode 100644 index 3e45f53534a9..000000000000 --- a/packages/rest/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright IBM Corp. 2017. All Rights Reserved. -// Node module: @loopback/rest -// This file is licensed under the MIT License. -// License text available at https://opensource.org/licenses/MIT - -export * from './dist'; diff --git a/packages/rest/index.js b/packages/rest/index.js deleted file mode 100644 index 2535e2b16a39..000000000000 --- a/packages/rest/index.js +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright IBM Corp. 2017. All Rights Reserved. -// Node module: @loopback/rest -// 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'); diff --git a/packages/rest/package.json b/packages/rest/package.json index c040a838f714..8b6dad73d2ac 100644 --- a/packages/rest/package.json +++ b/packages/rest/package.json @@ -5,15 +5,14 @@ "engines": { "node": ">=6" }, + "main": "dist/index.js", "scripts": { "acceptance": "lb-mocha \"DIST/test/acceptance/**/*.js\"", - "build": "npm run build:dist", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", + "build": "lb-tsc", "build:apidocs": "lb-apidocs", "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\"", @@ -47,8 +46,7 @@ }, "files": [ "README.md", - "index.js", - "index.d.ts", + "dist/index.js", "dist/src", "api-docs", "src" diff --git a/packages/testlab/index.d.ts b/packages/testlab/index.d.ts deleted file mode 100644 index d15be2753161..000000000000 --- a/packages/testlab/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright IBM Corp. 2017,2018. All Rights Reserved. -// Node module: @loopback/testlab -// This file is licensed under the MIT License. -// License text available at https://opensource.org/licenses/MIT - -export * from './dist'; diff --git a/packages/testlab/index.js b/packages/testlab/index.js deleted file mode 100644 index 4a5d72903ca6..000000000000 --- a/packages/testlab/index.js +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright IBM Corp. 2017,2018. All Rights Reserved. -// Node module: @loopback/testlab -// 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'); diff --git a/packages/testlab/package.json b/packages/testlab/package.json index ab864991b802..dfb9742726c9 100644 --- a/packages/testlab/package.json +++ b/packages/testlab/package.json @@ -5,13 +5,12 @@ "engines": { "node": ">=6" }, + "main": "dist/index.js", "scripts": { - "build": "npm run build:dist", - "build:current": "lb-tsc", - "build:dist": "lb-tsc es2017", + "build": "lb-tsc", "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" }, @@ -37,8 +36,7 @@ }, "files": [ "README.md", - "index.js", - "index.d.ts", + "dist/index.js", "dist/src", "should-as-function.d.ts", "src"