Ionic-app-scripts: Only delete relevant files/directories in the www directory

Created on 11 Oct 2016  路  6Comments  路  Source: ionic-team/ionic-app-scripts

Short description of the problem:

Currently the build is deleting everything in the www/ directory. If I have a file in my www/ directory it gets erased on build. I could put the file in another directory and add a custom config but this seems like overkill for one file.

What behavior are you expecting?

Either be able to add specific files to ignore from deletion in the www/ directory or only have the relevant files in www/ deleted for a build.

Steps to reproduce:

  1. Clone the conference app: https://github.com/driftyco/ionic-conference-app
  2. Run ionic serve
  3. See that the .gitignore file is deleted inside of www/ and all other files in www/ are showing up to add to git

Which @ionic/app-scripts version are you using?

0.0.30

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

Related to: https://github.com/driftyco/ionic-app-scripts/issues/127

enhancement

Most helpful comment

my bad, i didn't run npm install after updating package.json, was using app-scripts 0.30.

All 6 comments

@adamdbradley @danbucholtz Thoughts on how this should be handled?

It sounds like we should only delete the www/build directory going forward.

What does this mean for the assets directory, though?

Thanks,
Dan

The recent updates has it so only www/build gets deleted.

i still get all the folder cleaned (app-scripts 0.34)

@marcoturi hmm I'm not seeing the folder cleaned using the conference app. Could you clone that and see if it happens for you there? https://github.com/driftyco/ionic-conference-app

my bad, i didn't run npm install after updating package.json, was using app-scripts 0.30.

Was this page helpful?
0 / 5 - 0 ratings