Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Configure aurelia cli with bundling instraction #108

Closed
wants to merge 1 commit into from
Closed

Configure aurelia cli with bundling instraction #108

wants to merge 1 commit into from

Conversation

ahmedshuhel
Copy link
Contributor

No description provided.

@lukeapage
Copy link

Nice, this helped me, but because it isn't integrated with gulp, if you do aurelia bundle and then gulp serve then the aurelia bundles are deleted and the app doesn't work.

@EisenbergEffect
Copy link
Contributor

@ahmedshuhel Can you do a bit of improvement on this to integrate it with the gulp build so that the bundle doesn't get destroyed? There's some talk about that in the gitter.

@ahmedshuhel
Copy link
Contributor Author

@EisenbergEffect @lukeapage I am looking into it. Thank you.

@lukeapage
Copy link

I implemented a little gulp integration but done in a less than ideal way - less/less-preview@ca874af

I know you are working in documenting a way to use the aurelia-cli api, that would improve it a little. My two main issues with the workflow are..

  1. on this simple project it takes me 13 seconds to bundle (is that just my project or is it general?) that meant I didn't want to include it in the gulp-watch process.
  2. given I didn't want to include it in the watch process, I wanted to generate the site "bundled" into a new directory, that could be published. In addition, the content is already processed to a dist directory, so I didn't want to pollute that with bundled and un-bundled versions of the same app, I thought that got messy... so I run the bundle, then copy the files I need to new directory.. however I am now stuck because my config.js file has been modified and so has my index.html file - so I needed to do a git checkout after copying, to get a separated bundle directory.

I think these problems could be solved by

  1. giving aurelia-cli an api (which you are working on)
  2. making it faster (or fixing the bug thats making my project incredibly slow, if its a one-off)
  3. give an option to build the bundled site to a new directory (so existing files are not modified) OR integrate more with gulp so that the non bundled files don't even have to be written to dist

@EisenbergEffect
Copy link
Contributor

@ahmedshuhel I'm not going to merge this for now. I think we need to address at least two issues before we add this to the starter kit:

  • proper integration with gulp
  • there should not be version numbers in the aureliafile

The second one is what concerns me the most from a maintenance perspective. It means that every time I do a release of any library, I'm going to invalidate the aurelia file. I think the bundler should be able to figure out the versions by doing a lookup inside config.js.

@ahmedshuhel
Copy link
Contributor Author

@EisenbergEffect This Issue been created while I was working on wild card bundling support for jspm/systemjs. When there is no conflict if systemjs could ignore version, things would have been much easier.

In the most cases a lookup inside config.js will be enough to get the the proper module name with version number. We can do this. Bundler may throw when a version conflict is found.

@EisenbergEffect
Copy link
Contributor

Yes, I think we should use the config.js to do a lookup. If there is a version conflict then we should write out an error message and indicate that the developer needs to specify the version.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants