Skip to content

Commit fb4cf7b

Browse files
author
Alexander Vakrilov
authored
Merge pull request #204 from NativeScript/tachev/hmr-by-default
feat: use HMR by default for newly created projects
2 parents 300fba5 + 982d357 commit fb4cf7b

File tree

7 files changed

+14
-4
lines changed

7 files changed

+14
-4
lines changed

src/add-ns/_ns-files/nsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
"appPath": "<%= sourceDir %>",
44
"nsext": "<%= nsext %>",
55
"webext": "<%= webext %>",
6-
"shared": true
6+
"shared": true,
7+
"useLegacyWorkflow": false
78
}

src/models/nsconfig.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ export interface NsConfig {
33
appPath: string,
44
nsext: string,
55
webext: string,
6-
shared: boolean
6+
shared: boolean,
7+
useLegacyWorkflow: boolean
78
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"appPath": "<%= sourcedir %>",
3+
"useLegacyWorkflow": false
4+
}

src/ng-new/application/index_spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ describe('Application Schematic', () => {
2525
const tree = schematicRunner.runSchematic('application', options);
2626
const files = tree.files;
2727
expect(files.indexOf('/foo/angular.json')).toBeGreaterThanOrEqual(0);
28+
expect(files.indexOf('/foo/nsconfig.json')).toBeGreaterThanOrEqual(0);
2829
expect(files.indexOf('/foo/.gitignore')).toBeGreaterThanOrEqual(0);
2930
expect(files.indexOf('/foo/package.json')).toBeGreaterThanOrEqual(0);
3031
expect(files.indexOf('/foo/tsconfig.json')).toBeGreaterThanOrEqual(0);

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
"appPath": "<%= sourcedir %>",
44
"nsext": ".tns",
55
"webext": "",
6-
"shared": true
6+
"shared": true,
7+
"useLegacyWorkflow": false
78
}

src/ng-new/shared/index_spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ describe('Shared Application Schematic', () => {
2323
const tree = schematicRunner.runSchematic('shared', options);
2424
const files = tree.files;
2525
expect(files.indexOf('/foo/angular.json')).toBeGreaterThanOrEqual(0);
26+
expect(files.indexOf('/foo/nsconfig.json')).toBeGreaterThanOrEqual(0);
2627
expect(files.indexOf('/foo/.gitignore')).toBeGreaterThanOrEqual(0);
2728
expect(files.indexOf('/foo/package.json')).toBeGreaterThanOrEqual(0);
2829
expect(files.indexOf('/foo/tsconfig.tns.json')).toBeGreaterThanOrEqual(0);

src/utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ export function createEmptySharedProject(projectName: string, webExtension: stri
180180
'appPath': 'src',
181181
'nsext': '.tns',
182182
'webext': '',
183-
'shared': true
183+
'shared': true,
184+
'useLegacyWorkflow': false
184185
}));
185186

186187
return <any>appTree;

0 commit comments

Comments
 (0)