Skip to content

Commit 8240d60

Browse files
committed
(chore): Add script to create testing local packages
1 parent be2024b commit 8240d60

File tree

6 files changed

+93
-2
lines changed

6 files changed

+93
-2
lines changed

packages/angular/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"eslint": "eslint . --ext .ts",
3838
"prerelease": "npm run validate && np prerelease --yolo --any-branch --tag next",
3939
"sync": "./scripts/sync.sh",
40+
"local.sync.and.pack": "./scripts/sync-and-pack.sh",
4041
"test": "echo 'angular no tests yet'",
4142
"tsc": "tsc -p .",
4243
"validate": "npm i && npm run lint && npm run test && npm run build"
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
set -e
2+
3+
# Delete old packages
4+
rm -f *.tgz
5+
6+
# Pack @ionic/core
7+
echo "\n📦 Packing @ionic/core..."
8+
npm pack ../../core
9+
10+
# Update package.json with global path for the @ionic/core package
11+
echo "\n⚙️ Updating package.json with global path for @ionic/core..."
12+
CORE_PACKAGE=$(ls ionic-core-*.tgz | head -1)
13+
sed -i "" "s|\"@ionic/core\": \".*\"|\"@ionic/core\": \"file:$(pwd)/$CORE_PACKAGE\"|" package.json
14+
15+
# Install Dependencies
16+
echo "\n🔧 Installing dependencies..."
17+
npm install
18+
19+
# Build the project
20+
echo "\n🔨 Building the project..."
21+
npm run build
22+
23+
# Pack @ionic/angular
24+
echo "\n📦 Packing @ionic/angular..."
25+
npm pack ./dist
26+
27+
echo "\n✅ Packed ionic-angular package!\n $(pwd)/$(ls ionic-angular-*.tgz | head -1)\n"

packages/react/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"lint.fix": "npm run eslint -- --fix && npm run prettier -- --write --cache",
3131
"copy": "node scripts/copy.js",
3232
"test.spec": "jest --ci",
33-
"sync": "sh ./scripts/sync.sh"
33+
"sync": "sh ./scripts/sync.sh",
34+
"local.sync.and.pack": "./scripts/sync-and-pack.sh"
3435
},
3536
"main": "dist/index.js",
3637
"types": "dist/types/index.d.ts",
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
set -e
2+
3+
# Delete old packages
4+
rm -f *.tgz
5+
6+
# Pack @ionic/core
7+
echo "\n📦 Packing @ionic/core..."
8+
npm pack ../../core
9+
10+
# Update package.json with global path for the @ionic/core package
11+
echo "\n⚙️ Updating package.json with global path for @ionic/core..."
12+
CORE_PACKAGE=$(ls ionic-core-*.tgz | head -1)
13+
sed -i "" "s|\"@ionic/core\": \".*\"|\"@ionic/core\": \"file:$(pwd)/$CORE_PACKAGE\"|" package.json
14+
15+
# Install Dependencies
16+
echo "\n🔧 Installing dependencies..."
17+
npm install
18+
19+
# Build the project
20+
echo "\n🔨 Building the project..."
21+
npm run build
22+
23+
# Pack @ionic/react
24+
echo "\n📦 Packing @ionic/react..."
25+
npm pack
26+
27+
echo "\n✅ Packed @ionic/react package!\n $(pwd)/$(ls ionic-react-*.tgz | head -1)\n"

packages/vue/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"build.vetur": "node ./scripts/build-vetur.js",
1717
"copy": "node ./scripts/copy-css.js",
1818
"copy.overlays": "node ./scripts/copy-overlays.js",
19-
"sync": "sh ./scripts/sync.sh"
19+
"sync": "sh ./scripts/sync.sh",
20+
"local.sync.and.pack": "./scripts/sync-and-pack.sh"
2021
},
2122
"main": "./dist/index.js",
2223
"types": "./dist/types/index.d.ts",
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
set -e
2+
3+
# Delete old packages
4+
rm -f *.tgz
5+
6+
# Delete vite cache
7+
rm -rf node_modules/.vite
8+
9+
# Pack @ionic/core
10+
echo "\n📦 Packing @ionic/core..."
11+
npm pack ../../core
12+
13+
# Pack @ionic/vue-router
14+
echo "\n📦 Packing @ionic/vue-router..."
15+
npm pack ../vue-router
16+
17+
# Update package.json with global path for the @ionic/core package
18+
echo "\n⚙️ Updating package.json with global path for @ionic/core..."
19+
CORE_PACKAGE=$(ls ionic-core-*.tgz | head -1)
20+
sed -i "" "s|\"@ionic/core\": \".*\"|\"@ionic/core\": \"file:$(pwd)/$CORE_PACKAGE\"|" package.json
21+
22+
# Install Dependencies
23+
echo "\n🔧 Installing dependencies..."
24+
npm install
25+
26+
# Build the project
27+
echo "\n🔨 Building the project..."
28+
npm run build
29+
30+
# Pack @ionic/vue
31+
echo "\n📦 Packing @ionic/vue..."
32+
npm pack
33+
34+
echo "\n✅ Packed @ionic/vue package!\n $(pwd)/$(ls ionic-vue-*.tgz | head -1)\n"

0 commit comments

Comments
 (0)