Skip to content

Ability to ignore files from build and livesync #887

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
teobugslayer opened this issue Sep 8, 2015 · 9 comments
Closed

Ability to ignore files from build and livesync #887

teobugslayer opened this issue Sep 8, 2015 · 9 comments
Labels

Comments

@teobugslayer
Copy link
Contributor

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:

  • We can move the rules into package.json, introduce a dedicated .tnsignore file, or use .abignore file - the latest option brings 100% interoperability with Telerik Platform
    • Implement interoperability with AppBuilder- i.e. appbuilder init from existing {N} project should consume existing {N} specific ignore rules.
@dtopuzov
Copy link
Contributor

This is must have after we enabled transpilers.

@dtopuzov dtopuzov added this to the 1.6.0 (Under consideration) milestone Nov 11, 2015
@rosen-vladimirov
Copy link
Contributor

Let's use .abignore - this way the project will work like a charm inside AppBuilder :)

@teobugslayer teobugslayer modified the milestones: 1.7.0, 1.6.0 Feb 3, 2016
@rosen-vladimirov rosen-vladimirov modified the milestones: 2.0, 1.7.0 Feb 19, 2016
@rosen-vladimirov rosen-vladimirov removed this from the 2.0 milestone Mar 31, 2016
@enchev
Copy link
Contributor

enchev commented May 25, 2016

In my opinion .tnsignore is better!

@enchev enchev changed the title Ability to ignore files from build Ability to ignore files from build and livesync Jun 2, 2016
@enchev
Copy link
Contributor

enchev commented Aug 1, 2016

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.

@ghost
Copy link

ghost commented Jun 21, 2017

@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.

@pkoleva
Copy link
Contributor

pkoleva commented Jun 22, 2017

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 pkoleva reopened this Jun 22, 2017
@ghost
Copy link

ghost commented Jun 29, 2017

@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 '.#', and sometimes '##' also shows up, but I think that's a different feature. And then we have some versions which save the file with a tilde in the end (~). So the easiest way would be to allow a list of filters. For example --watch-ignore [".#", "##"], where the strings will differ depending on the approach you take I suppose, RegExp or a simpler way of matching.

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?

@dtopuzov
Copy link
Contributor

dtopuzov commented Aug 29, 2017

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

@rosen-vladimirov
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants