Getting to Know Grunt By Writing Your Own Plugin
Transcript of Getting to Know Grunt By Writing Your Own Plugin
“This scaffolding task was always an odd-duck, and it really
deserves it’s own project. So, we’ve broken it into a separate
npm module, grunt-init … In the coming weeks, the Yeoman
team will be replacing this task entirely, using their rails-
inspired generator system.”
February 18, 2013https://bocoup.com/weblog/tearing-grunt-apart/
Scaffold Develop Test Publish
Scaffold Develop Test Publish
nodeunit tests
sass_version.js
lib/_sass_version.jsGrunt input Grunt output
success,
message
package.json
{ "dependencies" : {
"til" : "~1.2",
"elf" : "^1.2.3",
"asd" : "http://asdf.com/asdf.tar.gz",
"gitproj" : "git://github.com/user/project.git#commit-ish",
"dyl" : "file:../dyl"
} }
Scaffold Develop Test Publish
npm publish
Scaffold Develop Test Publish
1. register at npmjs.com
2. npm adduser
7. (npm unpublish)
Scaffolding
solid tools available: grunt-init, Yeoman
saves time
avoids mistakes
makes dull work easier
you can find existing templates or make your own
Managing Dependencies
npm link for local dependencies
git repos for unregistered dependencies
create distributed projects with npm
Contributing
process is similar for:
gulp plugins
grunt-init templates
Yeoman generators
hubot scripts