-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce a build process using gulp.js #269
Conversation
Hi Ben! (not saying no, just that I need to think about it more carefully) |
@LeaVerou you could say the same thing about Codekit right now. And besides: you don't need to know node, you just need to do |
@LeaVerou As @apfelbox says you don't need a working knowledge of Node to use this, you just need Node installed, then you can pull down the dependencies using I think so long as the workflow for contributing to Prism is properly documented, it won't be a problem for people who want to contribute to the project, even if they have zero Node experience. I'd hope that having something like this would encourage people to learn more about it. :-) |
At least with CodeKit though, you set it up once and then it watches the files forever. With gulp, you need to run node and call |
That's correct, yes. Well it's your decision Lea so I'll leave it with you, but if you have any further questions then let me know. :-) |
@LeaVerou what do you think? I would say we include it - at least for the people who want to minify. |
Sure, let’s merge it. As long as somebody also updates the README.md to explain what to do for contributors, step by step. Btw, thank you so much for your help @apfelbox! |
"gulp-concat": "^2.2.0", | ||
"gulp-header": "^1.0.2", | ||
"gulp-rename": "^1.2.0", | ||
"gulp-uglify": "^0.3.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would make sense to update these dependencies now before merging.
@ben-eb do you want to rebase your PR on master? Otherwise I would send a PR probably later this week. |
@apfelbox See above. I just merged |
@ben-eb nice, thanks! I will merge it in the morning, when I have time to look at it in detail (and go for a test run 😉). Looks very good though, thanks for your work! |
You're very welcome. 😄 |
Introduce a build process using gulp.js
Thank you both for your work! |
Will do. I also wanted to add a paragraph to the website on how to contribute. |
Thanks! And thank you again @apfelbox so much for all your hard work recently. You rock! |
Hi Lea, thanks for the plugin! I found it very useful so I decided to write a build process for you, replacing the CodeKit workflow that you use at the moment. This will make it easier for collaborators to rebuild minified files as they work on the development javascript.
The build process uses gulp.js, the streaming build system. It requires that you have Node (and npm) installed so that you can run it and install the dependencies. To get up and running, once you have Node installed you'll need to run this command in the project root:
This will fetch all of the dependencies and install gulp globally to make it easier to run the tasks. Then, to start gulp watching the files for changes, do:
This will compile
prism.js
and any minified files forever until you stop the watcher with CTRL + C. You can also run compile tasks for each folder without watching, usinggulp build
,gulp components
andgulp plugins
.Note: The minifier seems slightly different to the one that CodeKit is using, some optimisations are different, hence why all of the minified versions have been changed.
I hope this helps! If you have any questions I'll be happy to answer them. :-)