-
Notifications
You must be signed in to change notification settings - Fork 12k
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
feat(build): add support for assets array #2570
Conversation
4d27131
to
e48306e
Compare
e48306e
to
d0f360c
Compare
If we have
copy contents of I'm asking because, right now (beta-17) if I do this:
It doesn't create an I'm creating an additional folder ( |
@MrCroft this will always mirror the structure you have. For if you have |
I understand. Unfortunately, if we have 2 different folders and 5 files which each need to be in Would make more sense that Otherwise, this also means that there is no difference between let's say Thank you for the clarification. |
Correct, We felt it was better this way have a 30m discussion in the team where everyone had different expectations of how this would work. So to make it as simple as possible, path is always kept. |
I upgraded angular cli to 1.0.0-beta.17. I added the following to angular-cli.json:
favicon.ico and Web.config are not getting copied to dist folder. I'm running this command:
How do I get favicon.ico and Web.config copied from src folder to dist environment root folder? |
@SolutiaConsulting I don't think this feature is in beta 17. It seems that Beta 17 was released before this merge. So, it will probably be in the next release. |
Correct, this feature will be part of the next release, but is not in beta.17. |
Is there any idea on when the next release is due? I've ran into this problem as well. I've added a .htaccess file to the app folder, and that also needs to bee in my dist folder. But for now it isn't. Because we use Jenkins to build the app, and it overwrites the complete old folder, we need the .htaccess from the build. Or is there an other way around this? |
@fabianderijk beta.18 is out today! |
@filipesilva, @Splaktar - This should be added to the readme, specifically here: https://github.com/angular/angular-cli#project-assets It's an easy task... OK to create a pull request and add it myself or should I open an issue? |
@cmermingas I have started a quick README update in #2905 |
- angular cli's lack of ability to do this at the moment is fixed in future builds: angular/angular-cli#2570
What if you want to include assets from node_modules, which seems like a fairly common use case?
In this case angular-cli seems to copy the files back into the original directory rather than into the dist folder. A solution similar to what jeffaxial proposed in this thread would be good: #1463 |
The suggestion from @jdddog is excellent and urgently required. Using fonts and similar assets from node_modules is currently a huge pain in angular-cli. |
I second @jdddog I am having the same use case, which might be really cool to have. We use internal assets (in a separated repo) for all the projects in the company. So the designer is always updating svg files that get ported to the rest of the projects via npm so "assets": [
"assets",
"favicon.ico",
"../node_modules/the-designer-repo/svgs"
] would be cool to include and reuse the svgs |
@phil-cap @jdddog @jcperez-ch I would suggest opening a new issue to track that request/issue. This PR has been merged and isn't the best place for the discussion to take place. Update: It looks like #3500 and #2880 are tracking this issue. Please add your thoughts there. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This PR enables the
assets
entry inangular-cli.json
to be an array of globs:Previous behavior (`"assets": "assets") will still work, but might be deprecated/removed in future versions.
Close #1942
Close #2405