Skip to content

Commit fdad1c9

Browse files
committed
chore: first bits of a pack script for non-scoped dependency
1 parent f725a6e commit fdad1c9

File tree

4 files changed

+55
-1
lines changed

4 files changed

+55
-1
lines changed

build/pack-script/index.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
console.log("Hi!");
2+
console.log(process.argv);
3+
4+
var myArgs = process.argv.slice(2);
5+
6+
console.log(`Packing with @nativescript/angular: ${myArgs}`);

build/pack-script/package.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "build",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "prepublish-next.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"author": "",
10+
"license": "ISC",
11+
"devDependencies": {
12+
"@types/node": "^12.7.12",
13+
"ts-node": "^8.4.1"
14+
}
15+
}

build/pack-script/tsconfig.json

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"compilerOptions": {
3+
"module": "commonjs",
4+
"target": "es5",
5+
"experimentalDecorators": true,
6+
"emitDecoratorMetadata": true,
7+
"noEmitHelpers": true,
8+
"noEmitOnError": true,
9+
"lib": [
10+
"es6",
11+
"dom",
12+
"es2015.iterable"
13+
],
14+
"baseUrl": ".",
15+
"paths": {
16+
"*": [
17+
"./node_modules/*"
18+
]
19+
},
20+
"types": [
21+
"node"
22+
],
23+
"typeRoots": [
24+
// add path to @types
25+
"node_modules/@types"
26+
],
27+
"strict": false
28+
}
29+
}

nativescript-angular-package/package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,9 @@
3232
},
3333
"dependencies": {
3434
"@nativescript/angular": "file:../nativescript-angular"
35+
},
36+
"scripts": {
37+
"pack": "cd ../build && npm pack ../nativescript-angular-package",
38+
"pack-with-scoped-version": "cd ../build/pack-script && npx ts-node index.ts"
3539
}
36-
}
40+
}

0 commit comments

Comments
 (0)