Users should be able to setup the CLI to ignore particular files, usually ts, .d.ts, or other source files in a language that compiles to JS / CSS.
We can use the same rules, default rules and implementation code from AppBuilder CLI.
Things to consider:
appbuilder init from existing {N} project should consume existing {N} specific ignore rules.This is must have after we enabled transpilers.
Let's use .abignore - this way the project will work like a charm inside AppBuilder :)
In my opinion .tnsignore is better!
I'm closing this one since we need TypeScript files for debugging purposes (these files can be excluded with --release). Additionally every transpiler CLI hook can handle the logic per case internally.
@enchev This is not simply about transpiling and such, it is also about the fact that some editors add temporary files alongside files currently being edited.
Hi @casp-simberg,
Indeed, you are right. We had an issue with the temporary files some IDEs create and we've fixed it, so now these files are not livesynced anymore. Do you think there is some other case you'd need to exclude files from livesyncing?
@pkoleva Not that I can think of right now. Sorry for the late response.
I am interested in a way to add a filter on which kinds of files to watch. Usually this can be expressed as a RegExp or by some simpler means (filename extension, but this isn't enough in my case).
Emacs, when auto-saving, creates files with the format '.#
This was still a problem the last time I ran 'tns run android' (which I think is livesync, correct?) in my project. May have been fixed since this was before the big release. But is there a way to add the filter(s) manually?
Another case when ignoring files will be useful:
tns create TestApp --ng
tns build android --path TestApp --release <and all the options hare>
Result will be ~1200 .d.ts files at TestApp/platforms/android/src/main/assets/app/tns_modules
As we are now using webpack to build the application, I think this issue can be closed. Webpack includes only files required and used in the application, so we no longer have problem with filtering.
Most helpful comment
In my opinion
.tnsignoreis better!