You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
how do i get cli to copy random files to dist folder? #2202
This capability was lost a few weeks ago - you and I and others are eagerly hoping for its return. I feel like there is an inevitable opening for such a mechanism to be misused, so it would be great to do without it - but without it, too many projects will be driven away from CLI. Therefore, I hope it returns.)
(For some use cases you can work around it by copying extra files to "dist" after running ng build; for other that won't work, because that doesn't make the files available at top level URLs during development with ng serve.)
Im writing a chrome extension in Angular 2 with the cli and chrome extensions need a manifest.json file in the root of the app, so I would really like this feature back as manually copying files sucks! :(
Look in your angular-cli.json file for "assets" under "apps". The default value is "assets", which represents the name of the folder you need to create under your "src" folder. This folder, and its contents, will be copied to the "dist" folder during "ng build".
Of course you can change the name of this folder to whatever you want, as long as it matches what is in your angular-cli.json file. IE:
"assets": "myAssets"
src -> myAssets
Reacted by Darren Griffith, Mike King, Daniel Hilgarth, Dharmik V Patel, Amit Parrikar, fisher, Brandon Taylor, Mehdi Mecheri, 陈杨文, Brandon Clapp and 3 more
I'm trying to build a PWA and need to move the manifest.json to the root. Currently I am moving this with a shell copy script but would be nice to incorporate this into the ng build process. @Lightw3ight - did you find a solution?
Activity
kylecordes commentedon Sep 18, 2016
This capability was lost a few weeks ago - you and I and others are eagerly hoping for its return. I feel like there is an inevitable opening for such a mechanism to be misused, so it would be great to do without it - but without it, too many projects will be driven away from CLI. Therefore, I hope it returns.)
(For some use cases you can work around it by copying extra files to "dist" after running
ng build; for other that won't work, because that doesn't make the files available at top level URLs during development withng serve.)Lightw3ight commentedon Sep 19, 2016
Im writing a chrome extension in Angular 2 with the cli and chrome extensions need a manifest.json file in the root of the app, so I would really like this feature back as manually copying files sucks! :(
pauldubois777 commentedon Sep 21, 2016
I am on 1.0.0-beta.14
Look in your angular-cli.json file for "assets" under "apps". The default value is "assets", which represents the name of the folder you need to create under your "src" folder. This folder, and its contents, will be copied to the "dist" folder during "ng build".
Of course you can change the name of this folder to whatever you want, as long as it matches what is in your angular-cli.json file. IE:
"assets": "myAssets"
src -> myAssets
nmorado commentedon Sep 21, 2016
This works
Lightw3ight commentedon Sep 21, 2016
How do you get it to copy a file that exists in the root /src/manifest.json
zompad commentedon Oct 9, 2016
I'm trying to build a PWA and need to move the manifest.json to the root. Currently I am moving this with a shell copy script but would be nice to incorporate this into the ng build process.
@Lightw3ight - did you find a solution?
filipesilva commentedon Oct 10, 2016
On the next release, this should be available: #2570
erscoder commentedon Dec 12, 2017
write manifest.son in assets, file anuglar-cli.json
"apps": [ { "root": "src", "outDir": "dist", "assets": [ "assets", "favicon.ico", "manifest.json" ],angular-automatic-lock-bot commentedon Sep 7, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.