Skip to content

Commit cd60641

Browse files
Fix bug for TS projects that don't use tslint (#22)
Spelling
1 parent 2572f0d commit cd60641

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ An example of this would be the following Vue component:
5252
</style>
5353
```
5454

55-
### Optional Seperation of concerns for Web and Native SFC's
55+
### Optional Separation of concerns for Web and Native SFC's
5656
If you want complete seperation of concerns between Web and Native for components, core logic and styling, you can also provide an alternate file naming scheme in your project. The name will dictate which mode (Web or Native) and platform (Android or IOS) the file will be used with. The same overall schema will work for `.vue`, `.js`, `.ts`, `.scss` and `.css` files.
5757

5858
| File Type | Android __and__ IOS | Android only | IOS only | Web only |

generator/index.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,6 @@ module.exports = async (api, options, rootOptions) => {
132132
}
133133
});
134134
}
135-
136-
// lint and fix files after creation is completed
137-
api.onCreateComplete(() => {
138-
return require('../lib/tslint')({}, api, true);
139-
});
140135
}
141136

142137
// if the project is using babel, then load appropriate packages
@@ -253,7 +248,10 @@ module.exports = async (api, options, rootOptions) => {
253248
nsconfigSetup(genConfig.dirPathPrefix, api.resolve('nsconfig.json'), genConfig.nativeAppPathModifier, genConfig.appResourcesPathModifier);
254249

255250
if (api.hasPlugin('typescript')) {
256-
tslintSetup(genConfig.dirPathPrefix, api.resolve('tslint.json'), genConfig.tsExclusionArray);
251+
if (fs.existsSync(api.resolve('tslint.json'))) {
252+
require('../lib/tslint')({}, api, true);
253+
tslintSetup(genConfig.dirPathPrefix, api.resolve('tslint.json'), genConfig.tsExclusionArray);
254+
}
257255

258256
// we need to edit the tsconfig.json file in /app
259257
// for a Native only project to remove references to /src

0 commit comments

Comments
 (0)