Skip to content
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

how do i get cli to copy random files to dist folder? #2202

Closed
nmorado opened this issue Sep 18, 2016 · 9 comments
Closed

how do i get cli to copy random files to dist folder? #2202

nmorado opened this issue Sep 18, 2016 · 9 comments

Comments

@nmorado
Copy link

nmorado commented Sep 18, 2016

versions: angular-cli: 1.0.0-beta.14
node: 5.10.1

i needed to copy random files into the dist folder. it's not clean from the the documentations how to accomplish the same.

appreciate any help.

thanks in advance.

@kylecordes
Copy link

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

@Lightw3ight
Copy link

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
Copy link

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
Copy link
Author

nmorado commented Sep 21, 2016

This works

@nmorado nmorado closed this as completed Sep 21, 2016
@Lightw3ight
Copy link

How do you get it to copy a file that exists in the root /src/manifest.json

@zompad
Copy link

zompad commented 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
Copy link
Contributor

On the next release, this should be available: #2570

@batcoder1
Copy link

write manifest.son in assets, file anuglar-cli.json

"apps": [ { "root": "src", "outDir": "dist", "assets": [ "assets", "favicon.ico", "manifest.json" ],

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants