duojs / duo

A next-generation package manager for the front-end
3.42k stars 118 forks source link

Files, fonts and assets? #458

Closed sachalifs closed 9 years ago

sachalifs commented 9 years ago

Sorry but has this https://github.com/duojs/duo/issues/171 been solved in any way by Duo?

Or best solution is to have those assets copied in another way?

dominicbarnes commented 9 years ago

This has been resolved, you can pass arbitrary files to the duo CLI and it will copy them to the build/ directory.

# copies everything in the public directory to build/public/
$ duo public/

# copies to build/logo.svg
$ duo logo.svg
dominicbarnes commented 9 years ago

Sorry that wasn't documented more clearly, but that feature was added back in 0.9.0

cristiandouce commented 9 years ago

@dominicbarnes Is there a way to handle it via the component.json so that I can be sure it copies the dependency assets?

sachalifs commented 9 years ago

And is this available from the [https://github.com/duojs/duo/blob/master/docs/api.md](Javascript API)?

dominicbarnes commented 9 years ago

@cristiandouce unfortunately, not at the moment. However, the css-compat plugin could likely be extended to cover that situation as well. (PRs welcome)

@slifszyc yeah, the CLI simply passes those arguments as entries to the JS API.

cristiandouce commented 9 years ago

@dominicbarnes Where should I start looking? :wink:

cristiandouce commented 9 years ago

Never mind, I think I've got it