How to install dependencies to a particular folder?
g105b opened this issue · 2 comments
A simple component.json
config:
{
"dependencies": {
"necolas/normalize.css": "3.0.*"
}
}
When I run component build
, the css file gets put into components/necholas/normalize.css/3.0.3/normalize.css
, but I would like to specify where client side source files are put, to integrate with my current build system.
I would like to specify that CSS source files get installed to src/Style/Lib
and that JS source files get installed to src/Script/Lib
, matching the same folder hierarchy that I get from within the components
folder at the moment.
Is this possible? If not, is this a valid feature request?
I think it's possible with a builder option, no? I don't think it's part of the .componentrc file, though.
When I run component build, the css file gets put into components/necholas/normalize.css/3.0.3/normalize.css
That's not completely true. I think you misunderstood the usage of component build
and component install
. component build
call internally component install
if it does not find the dependencies in the components directory.
component install
does install all your dependencies into the components directory, it's like npm
and node_modules and you should not use these files directly!
With component build
you can bundle the files (to use them in the browser), if you're using the CLI you can specify the name and directory of the js and css file, you can run component build --help
to find out which options are provided.
But in your case you don't want to put the js and css files together into one directory, so then you need to use the builder API
BUT you should consider to use another tool, because component is deprecated already.