Closed danielchappell closed 10 years ago
.js.js
src/
, we only need the compiled & concatenated builds. The end result will be only two generated files: maker-console.js
and maker-console.min.js
. Both these files will end up in the root directory for convenience. See Riot.js's repo for an example of the two compiled files.Great effort so far. You're almost there.
requested changes submitted. did you want me to write the minification task as well, or should we wait on that?
Also I did some googling on the fact that the compiled js files ended in .js.js I didn't find any solutions to this although I every thing I looked at just had coffee files ending in .coffee anything before that is considered part of the name. So I know why it is happening, but I haven't found how to fix it, the plug-ins documentation is sparse. It doesn't seem like an issue though as long as we are always compiling and piping right into the concat function, since that function allows you to name the new file.
Ah, so the .coffee.js
is Rails asset pipeline specific. You can remove the .js
from each .coffee.js
file. Try writing a Ruby script or a Node script to do this automatically (you'll only need to run the script once, but it'll be good practice).
Yes, extend the task to create a minified file as well.
The files need to be in this order:
lib/maker-console.coffee
lib/util.coffee
lib/models/
lib/views/
lib/console/
Be sure to rebase with master to get the new file.
Changes submitted. Used gulp-rename to keep piping in the same task and output two different files to the same directory. Used gulp-uglify for minification. Declared each file/directory in order as an array and passed as argument instead of passing in the outer directory.
You added the lib/maker-console.coffee
file manually. That's not good for git history. Next time you should:
gulp-coffee
) with master. This gets you latest changes from master and ensures your new code merges in cleanly.I edited your last commit to remove the manual lib/maker-console.coffee
addition, and rebased your feature branch with master.
Everything looks great otherwise. I'll merge it in now.
Branch created to solve issue # 1 created gulp builder using gulp plugins 'gulp-coffee' and 'gulp-concat' included in this branch are the generated files in their assigned directories. Currently it is set up for all compiled files JS files to land in ./public/javascript/ which is the source for the concatenated file which lands in /production/non_minified/ assuming there would also be minified versions of the concatenated files. otherwise this could be changed. One note, you probably know this already but, gulp must be installed globally to run console commands "gulp".