Skip to content

Commit 9d00fb6

Browse files
sebawitasis0k0
authored andcommitted
chore: add an npm script for tns preview (#180)
The new npm script will allow devs to call `npm run preview`, which will execute `tns preview --bundle`
1 parent 8115cd3 commit 9d00fb6

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/add-ns/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,9 @@ const addRunScriptsToPackageJson = (tree: Tree, context: SchematicContext) => {
215215

216216
const scriptsToAdd = {
217217
android: 'tns run android --bundle',
218-
ios: 'tns run ios --bundle'
218+
ios: 'tns run ios --bundle',
219+
mobile: 'tns run --bundle',
220+
preview: 'tns preview --bundle'
219221
};
220222
packageJson.scripts = Object.assign({}, scriptsToAdd, packageJson.scripts);
221223

src/ng-new/shared/_files/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
"lint": "ng lint",
1313
"e2e": "ng e2e",
1414
"android": "tns run android --bundle",
15-
"ios": "tns run ios --bundle"
15+
"ios": "tns run ios --bundle",
16+
"mobile": "tns run --bundle",
17+
"preview": "tns preview --bundle"
1618
},
1719
"private": true,
1820
"dependencies": {

0 commit comments

Comments
 (0)