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 to add a file to the build system (dist) folder #2613

Closed
hassanasad opened this issue Oct 9, 2016 · 8 comments
Closed

How to add a file to the build system (dist) folder #2613

hassanasad opened this issue Oct 9, 2016 · 8 comments

Comments

@hassanasad
Copy link

Hi!

Can someone please let me know how to add a simple file to the build system in angular-cli. For example, i want to keep a file called web.config in dist folder when the build is created. If i simply put it in my /src/ folder, it doesn't get copied. I am using beta.17 version of Angular-cli.

Any help will be appreciated :)

@grizzm0
Copy link
Contributor

grizzm0 commented Oct 9, 2016

The config key apps.assets accepts an array as of beta.17. You can now do the following.

"assets": [
  "assets",
  "favicon.ico"
]

@hassanasad
Copy link
Author

I did try that - but its still not copying it.

This is my app.assets:
"assets": ["assets", "web.config"]

I ran the command ng build --prod

Still no web.config in dist folder even though its present in /src/

@hassanasad
Copy link
Author

Actually - when i make app.assets an array, i dont even get my assets folder in the dist folder.

@grizzm0
Copy link
Contributor

grizzm0 commented Oct 10, 2016

Sorry, my fault. It was merged after beta.17 was released. It's currently in master and will be released with beta.18.

See: #2570

@hassanasad
Copy link
Author

oh - thanks grizzm0. Guess nothing more to do other than to wait for beta.18 :)

@grizzm0
Copy link
Contributor

grizzm0 commented Oct 10, 2016

@filipesilva Could you close?

@bdv1234
Copy link

bdv1234 commented Jul 4, 2019

The config key apps.assets accepts an array as of beta.17. You can now do the following.

"assets": [
  "assets",
  "favicon.ico"
]

hey, now apps.assets refer to the ".angular-cli.json" right, if so, I added staticfile.txt in the assets array, but when I run "ng build --prod" command , it didn't create staticfile.txt in the dist folder.

@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 9, 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

4 participants