-
-
Notifications
You must be signed in to change notification settings - Fork 157
Replace RequireJS with Almond during build #300
Conversation
Hi @marian-r,
Would you be able to explain why this is happening? |
Do you have everything installed properly - Grunt, Node packages? |
Yes, I have all of those installed and working.
to start the app but I was getting the conflict with usemin and requirejs when doing the build with grunt.
in index.html and tried to build again |
Have you copied all my changes to your Gruntfile? |
I tried your workflow and it is working. Make sure you copied all the changed blocks especially the last one - build workflow. Also don't forget to remove one '%' character for config variables, i.e. |
Thanks @marian-r for looking into it. Maybe the problem is somewhere else. I am able to build without problem when I comment out the line
from the build task and the output looks all right so I won't worry about this any more. Thank you for you help! |
Your Gruntfile works for me. Maybe one more thing you can do is to send me the verbose output from grunt build |
There are a couple additional changes that need to be made for this to work with CoffeeScript—specifially, building the CoffeScript files into a separate temporary directory, then loading the main module from that location during the RequireJS step. In - dest: '.tmp/scripts',
+ dest: '.tmp/coffee/scripts', and in the - mainConfigFile: '<%= yeoman.app %>/scripts/main.js', // contains path specifications and nothing else important with respect to config
+ paths: {'main': '../../.tmp/coffee/scripts/main'},
+ mainConfigFile: '.tmp/coffee/scripts/main.js', // contains path specifications and nothing else important with respect to config |
Actually, even better: instead of changing the CoffeeScript build output directory, change the |
I am a little bit surprised why the maintainers of this repo are not trying to make Grunt build working. But maybe my fix is not working for some scenarios which I didn't test. In the meantime, you can try to use this fix by yourself. |
Hey y'all! Please merge re: yeoman/grunt-usemin#112 |
This needs a rebase. |
Am I suppose to do it, or you are? I am not sure what you mean. |
You are. |
a78c348
to
be199c3
Compare
I've done the rebase. Please check if it's OK as I've done it for the first time. |
Looks good :). |
Any progress? |
I'm not really using this so I'm not the right one to test, but if someone else could and confirm it's working I'll be happy to merge. |
@kevva I'm not the right one eighter and I don't think many of us (if any) uses generator-backbone extensively. The build system is broken in many ways and I saw people complaining about it on IRC already... We don't have an active maintainer for this repo so we should probably discuss opening such a "call for a maintainer" issue. |
Call for a maintainer or find a community alternative that we can deprecate this in favor of. |
Totally 👍! |
I'm 👍 call for a maintainer |
What about replacing RequireJS with almond for app in production? This config works for me. R.js combines everything to one file in .tmp directory and uglify then minifies and moves the file to dist. Just, I've not tested it with CoffeScript, since I don't work with it.