From b24b9695c1f8d971e3449f2c0b39ef0e495c445d Mon Sep 17 00:00:00 2001 From: zachzhu2016 <48337051+zachzhu2016@users.noreply.github.com> Date: Tue, 17 Aug 2021 16:39:03 -0400 Subject: [PATCH] Improve packages' settings (#6) * various package.json related changes * in pack --- azure-pipelines.yml | 14 ++++++++------ cli/LICENSE | 21 --------------------- cli/package.json | 13 +++++++++---- core/LICENSE | 21 --------------------- core/package.json | 18 ++++++++++++------ 5 files changed, 29 insertions(+), 58 deletions(-) delete mode 100644 cli/LICENSE delete mode 100644 core/LICENSE diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4675244..2f417c2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -85,7 +85,9 @@ stages: imjs_test_regular_user_name: $(test_user_name) imjs_test_regular_user_password: $(test_user_password) - - script: | + - bash: | + cp ../README.md . + cp ../LICENSE . npm pack displayName: 'npm pack' workingDirectory: core @@ -109,7 +111,8 @@ stages: displayName: 'npm link' workingDirectory: cli - - script: | + - bash: | + cp ../LICENSE . npm pack displayName: 'npm pack' workingDirectory: cli @@ -128,10 +131,6 @@ stages: displayName: 'pcf init' workingDirectory: cli - - bash: | - ls ../../core - workingDirectory: cli/TestProject - - bash: | npm install ../../core/*.tgz displayName: 'npm install core/*tgz' @@ -194,6 +193,9 @@ stages: echo "coreName: $(info.coreName)" echo "cliVer: $(info.cliVer)" echo "cliName: $(info.cliName)" + ls + ls cli + ls core displayName: 'Show Build Info' condition: and(succeeded(), eq(variables['info.shouldPublish'], 'true')) diff --git a/cli/LICENSE b/cli/LICENSE deleted file mode 100644 index 862acad..0000000 --- a/cli/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Bentley Systems, Incorporated. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/cli/package.json b/cli/package.json index 3aba4e9..ec6504b 100644 --- a/cli/package.json +++ b/cli/package.json @@ -8,15 +8,20 @@ "BIM", "iModel" ], - "main": "./bin/pcf.js", - "bin": { - "pcf": "bin/pcf" + "engines": { + "node": ">=12.17.0 <15.0", + "npm": ">=6.0.0 <7.0.0" }, - "preferGlobal": true, + "homepage": "https://github.com/itwin/pcf", "repository": { "type": "git", "url": "https://github.com/iTwin/pcf/tree/main/cli" }, + "main": "./bin/pcf.js", + "bin": { + "pcf": "bin/pcf" + }, + "preferGlobal": true, "scripts": {}, "dependencies": { "chalk": "2.4.2", diff --git a/core/LICENSE b/core/LICENSE deleted file mode 100644 index 862acad..0000000 --- a/core/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Bentley Systems, Incorporated. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/core/package.json b/core/package.json index 461d4c5..dbc2652 100644 --- a/core/package.json +++ b/core/package.json @@ -5,8 +5,19 @@ "main": "lib/pcf.js", "typings": "lib/pcf", "license": "MIT", + "keywords": [ + "Bentley", + "BIM", + "iModel" + ], "engines": { - "node": ">=12.17.0 <15.0" + "node": ">=12.17.0 <15.0", + "npm": ">=6.0.0 <7.0.0" + }, + "homepage": "https://github.com/itwin/pcf", + "repository": { + "type": "git", + "url": "https://github.com/itwin/pcf" }, "scripts": { "build": "tsc && npm run copyFiles", @@ -19,11 +30,6 @@ "deploy": "git push && npm run clean && npm run build && npm publish", "docs": "betools docs" }, - "keywords": [ - "Bentley", - "BIM", - "iModel" - ], "dependencies": { "@bentley/backend-itwin-client": "2.16.10", "@bentley/bentleyjs-core": "2.16.10",