Skip to content

Commit 573cebf

Browse files
authored
refactor(add-ns): remove --bundle flag from scripts (#232)
1 parent b83a30b commit 573cebf

File tree

3 files changed

+10
-15
lines changed

3 files changed

+10
-15
lines changed

src/add-ns/index.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -214,21 +214,16 @@ const mergeGitIgnore = (tree: Tree, context: SchematicContext) => {
214214
tree.commitUpdate(recorder);
215215
};
216216

217-
/**
218-
* Adds {N} npm run scripts to package.json
219-
* npm run ios => tns run ios --bundle
220-
* npm run android => tns run android --bundle
221-
*/
222217
const addRunScriptsToPackageJson = (tree: Tree, context: SchematicContext) => {
223218
context.logger.info('Adding NativeScript run scripts to package.json');
224219

225220
const packageJson = getPackageJson(tree);
226221

227222
const scriptsToAdd = {
228-
android: 'tns run android --bundle',
229-
ios: 'tns run ios --bundle',
230-
mobile: 'tns run --bundle',
231-
preview: 'tns preview --bundle',
223+
android: 'tns run android',
224+
ios: 'tns run ios',
225+
mobile: 'tns run',
226+
preview: 'tns preview',
232227
};
233228
packageJson.scripts = {...scriptsToAdd, ...packageJson.scripts};
234229

src/add-ns/index_spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ describe('Add {N} schematic', () => {
9393
const packageJson = JSON.parse(getFileContent(appTree, packageJsonPath));
9494
const { scripts } = packageJson;
9595
expect(scripts).toBeDefined();
96-
expect(scripts.android).toEqual('tns run android --bundle');
97-
expect(scripts.ios).toEqual('tns run ios --bundle');
96+
expect(scripts.android).toEqual('tns run android');
97+
expect(scripts.ios).toEqual('tns run ios');
9898
});
9999

100100
it('should add NativeScript key to the package json', () => {

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
"test": "ng test",
1212
"lint": "ng lint",
1313
"e2e": "ng e2e",
14-
"android": "tns run android --bundle",
15-
"ios": "tns run ios --bundle",
16-
"mobile": "tns run --bundle",
17-
"preview": "tns preview --bundle"
14+
"android": "tns run android",
15+
"ios": "tns run ios",
16+
"mobile": "tns run",
17+
"preview": "tns preview"
1818
},
1919
"private": true,
2020
"dependencies": {

0 commit comments

Comments
 (0)