[Feature Request] Export static files
See original GitHub issueI’ve been developing an aurelia-plugin for a legacy library. This library loads some static files asynchronously, which means that these files must be “exported” to the dist folder.
After a long conversation with @AStoker, we came to the conclusion that aurelia-cli needs a feature to export files, like the one that SystemJS Skeleton has. It’s good to emphasize that this feature is different from “resources” key in aurelia.json, that includes files in the bundle.
This feature would be very helpful for handling libraries that weren’t build for modular systems, and it will also solve some others problems like https://github.com/aurelia/cli/issues/248
We were thinking in something like this:
{
“name”: “ckeditor”,
“path”: “../node_modules/ckeditor”,
“main”:”main”,
“resources”: [
],
“exports”: {
“editor.js”:”exportLocation/editor.js”,
“config.js”:”exportLocation/config.js”
}
}
However, we have to find anohter name because the key “exports” is being used for other things:
{
"name": "bootstrap",
"path": "../node_modules/bootstrap/dist",
"main": "js/bootstrap.min",
"deps": ["jquery"],
"exports": "$",
"resources": [ "css/bootstrap.css" ]
}
I can make the PR if I get the right direction.
What the rest of the team think about this?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:6 (6 by maintainers)
@fabioluz, for the sake of moving forward, I’d
copy
. If you’re able to code it up in a way that makes renaming easy down the road, that’d be helpful.I think that
copy
andcopyToDist
are the best so far.