My best grunt
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
1,746
On Slideshare
1,741
From Embeds
5
Number of Embeds
2

Actions

Shares
Downloads
5
Comments
0
Likes
4

Embeds 5

https://twitter.com 4
http://symfony2developer.com 1

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. オレの最強のGruntfile13年5月6日月曜日
  • 2. @muddydixongithub.com/muddydixon13年5月6日月曜日
  • 3. GruntisTask Runner13年5月6日月曜日
  • 4. とんでもないレベルにまでエコシステムが発達したTask RunnerGrunt13年5月6日月曜日
  • 5. Grunt13年5月6日月曜日
  • 6. Gruntcontrib / contrib-clean / contrib-coffee / contrib-compass / contrib-compress / contrib-concat / contrib-connect / contrib-copy / contrib-csslint / contrib-cssmin / contrib-handlebars / contrib-htmlmin / contrib-imagemin / contrib-jade / contrib-jasmine / contrib-jshint / contrib-jst / contrib-less / contrib-livereload / contrib-mincss /contrib-nodeunit / contrib-qunit / contrib-requirejs / contrib-sass / contrib-stylus / contrib-uglify / contrib-watch / contrib-yuidoc / amd-doc / assemble / assemble-less /assemble-package-manager / assemble-utils / assetflow / atpackager / bbb / build-bootstrap / can-compile / coffee2closure / config-heroku / connect-modrewrite / dp-contrib-copy / enyo / fe / aggregator / akamai-clear / amd-check / amd-checkrequire / amd-dist / amd-doc / amd-test / anglebars / angular-annotator / angular-seed / angular-templates / angular-templates-amd / angular-verifybuild / annotated-requirejs / ant-sfdc / apidoc / append-sourcemapping / append-templates / asciify / asset-mapper / asset-revisions / assetify / assetpush / assets-revving / assets-versioning / at-class / autoprefixer / aws / backbone-routes / backbonebuilder / bake / banner / barista /barkeep / batman-template / bbb-requirejs / bbb-server / bbb-styles / beautify / behat / bem / benchmark / bg-shell / blanket / bless / blink1 / blueprints / bom /bookmarklet-thingy / bootstrap / booty / bower / bower-concat / bower-config / bower-hooks / bower-install / bower-organiser / bower-requirejs / bower-task / bowerful /browserify / browserify2 / browserstack / build-docs / build-gh-pages / build-requirejs / buildconcat / buildfiles / bump / bumpup / bumpx / buster / buster-plugin / bvitk-tools / cachebuster / cafe-mocha / casper / casperjs / cat / cdn / cdn-refresh / changelog / check-modules / check-online / chmod / chrome-manifest / clean / cleanx / clear /client-compiler / clientside / closure-compiler / closure-linter / closure-soy / closure-tools / closure-wrap / closurecompiler / cloudfiles / cloudfront-clear / cmd-combo /cmd-concat / cmd-transport / cms-site-scaffold / cms-upload / coffee / coffee-coverage / coffee-percolator / coffee-redux / coffee-server / coffeecup / coffeeify /coffeelint / combine / comment-media-queries / commonjs / commonjs-handlebars / compile-handlebars / complexity / compliment / component / component-build / concat / concat-sourcemap / concurrent / config / connect / connect-proxy / connect-rewrite / consolidate-css / context / contrib / contrib-clean / contrib-coffee / contrib-compass /contrib-compress / contrib-concat / contrib-connect / contrib-copy / contrib-csslint / contrib-cssmin / contrib-handlebars / contrib-htmlmin / contrib-imagemin / contrib-jade / contrib-jasmine / contrib-jshint / contrib-jst / contrib-less / contrib-livereload / contrib-mincss / contrib-nodeunit / contrib-qunit / contrib-requirejs / contrib-sass / contrib-stylus / contrib-uglify / contrib-watch / contrib-yuidoc / couch / couchapp / coverjs / cp / crane / crusher / crx / css / css-amd / css-collect / css-combo /css2js / cssc / csscss / cssjoin / csso / cssrb / cucumber / curl / customize-bootstrap / data-uri / dawg / dep-concat / dependencygraph / dependo / devcode / develop /devserver / devtools / dir2json / docco / docker / docs / docsitebuilder / docular / dojo / dom-munger / dot / dot-compiler / dot-precompile / dotjs / dotlit / download /dox / drush / dss / dust / dust-html / dustjs / eco / eco-amd / ect / ect-templates / eiffel / email-builder / ember-handlebars / ember-templates / emberify / emblem /encase / ender / env / es6-module-transpiler / esmangle / este / exec / exists / express / express-bootstrap / express-server / extdeps / extendscript / fail / fenbi-tasks /fest / file-creator / file-regex-rename / filesize / fileslist / fingerprint / flyway / forever / frontend / fscss / ftp-deploy / functional / furnace / fuse / gcc / ghost /gint / git / git-authors / git-contributors / git-describe / gitco / github-pages / gjslint / global-config / glue / groc / groundskeeper / growl / grunticon / grunticon-highrespng / grunticon-sass / grunticon-stylus / gss-pull / haml / handlebars-compiler / handlebars-custom / handlebars-js / handlebars-requirejs / handlebars-seajs /handlebars-static / hapi / hash / hashmap / hashres / haxe / heroku-deploy / hogan / hogan-client / hoganjs / html / html-annotation / html-build / html-builder / html-json-wrapper / html-prettyprinter / html-smoosher / html-snapshot / html-validation / html2js / html2json / htmlbuild / htmlcompressor / htmlgen / htmlhint / htmlrefs / httpcopy /hub / hug / hull-widgets / hustler / iced-coffee / iconv / ie9-selector-counter / image-embed / image-normalize / imagemagick / images / imagine / imgmin / imgo / importsrc /include / include-bootstrap / include-replace / include-replace-cwd / includes / indent / init-browser / init-gruntplugin2 / init-init / init-mootools / init-plugin / inline-assets / inline-css / install-dependencies / install-init / invalidate-cloudfront / iron-worker / istanbul / it / itv / jade / jade-handlebars / jade-plugin / jaded / jam /jasmine / jasmine-coverage / jasmine-html-runner / jasmine-html-spec-runner / jasmine-node / jasmine-node-lite / jasmine-node-task / jasmine-runner / jasmine-spec-server /jasmine-task / jassi / java-properties / jekyll / jenkins / jetrunner / jquery-content / jquery-json / jquerybuilder / jquerytransform / jsbeautifier / jsdoc / jsdoc-plugin /jsduck / jshint2 / jsio / jslint / jsmin-sourcemap / json / json-minify / json-schema / jsonlint / jsonmin / jssemicoloned / jstemplater / jstestdriver / jstools / jsttojs /jsvalidate / juggler / junit / jw-uglify / karma / karma-0.9.1 / kissy-template / kiwi / kmc / knox / koko / ksp / lenient / less / less-config / less-imports / lessless /lexicon / license / line-remover / lineending / link / link-html / lint-bash / lint-inline / lintblame / linter / livereload / livescript / lmd / localtunnel /lodashbuilder / macreload / manifest / mapcat / markdown / markdown-blog / markdown-to-json / markx / maven-tasks / md2html / md5 / md5-manifest / mdlldr / messageformat /mincer / mindirect / minified / minifykr / minispade / minjson / mins / mixin-dir / mkdir / mocha-cli / mocha-cov / mocha-hack / mocha-phantomjs / mocha-test / mod-dev /modernizr / modules / mustache / native2ascii / natural-docs / ne / net / neuter / newrelic / ng-constant / node-qunit / nodemon / nodequnit / nodestatic / notify / o-bundle-commands / open / oversprite / ozjs / ozjs-tudou / package-environment / pakmanager / parallel / parseunicode / pathfinder / peaches / peg / peon-gui / pg / phonegap-build /php / php-analyzer / php-set-constant / phpcs / phpdocumentor / phplint / phpunit / pistachio-compiler / pkg-to-component / plato / play / plugin-angular-template-inline /plugin-buster / plugin-pkg2cmp / plugin-size / pngmin / preload / preloader-manifest-generator / preprocess / prettify / process-css / proxy / qettlhup / qpoc-closure-compiler / queen / qunit-cov / qunit-istanbul / qunit-junit / qunit-serverless / qunit-sonar / qunit-tap / r3m / rackspace / rcukes / recess / recursive-compass / reduce /regex-replace / release / release-branch / reload / reloadr / rem-to-px / remotefile / remove-logging / rename / rendr-stitch / replace / replace-dojo-cache / replace-main /require-dir / required / requiregrep / requirejs / requirejs-jzaefferer / requirejs-tasks / rerun / resx2json / retro / rev / rev-md5 / rev-package / rework / rigger /ristretto / rm / robot / roy / rsync / rsync-2 / ruby-haml / s3 / s3deploy / samsung-widgetlist / sass / sass-charset-del / sass-convert / saucelabs / saucelabs-qunit / say /scandium / scp / scriptlinker / sea-hashmap / sed / selenium / sencha-dependencies / sencha-jasmine / sf / sftp-deploy / shell / shell-completion / shell-spawn / shopify /shower-markdown / siml / simple-mocha / simple-smtp / simple-watch / sitemap / sizediff / sizereport / slim / sm-watch / smush-components / smushit / snapshot / snockets /soy / soy-compile / sp2010 / spark / spell / spm-build / spritesheet / spritesmith / ss-helpers / ssh / stats / steal / stitch / stitch-extra / string-replace / strip /style-temtem / styleguide / styletto / stylusguide / svgmin / svn-fetch / svn-update / svninfo / sweet / swig / symbolic-link / symfony2-console / symlink / symlinks / sync /tagrelease / tailor / targethtml / template-client / template-client-dot / template-helper / template-html / template-inline / template-jasmine-curljs / template-module /templater / templates / templatizer / testacular / testem / text-replace / three-obj / thrill / tishadow / tmplmin / todos / topcoat / tpl / tpsmate / traceur / translate /travis / tree / tsag / tusk / tusk-coffee / type / typescript / unicon / unicon-sass / urequire / usemin / usemin-baked / usemin-codio / useref / utils / variations /velocity.js / ver / verbosity / verifylowercase / version / vlt / volo / vows / vows-runner / vows-test / watch-nospawn / webdriver / webfont / webfontjson / webmake /webpack / wickit / willitmerge / winston / wintersmith / wisdom / wkhtmltopdf / wording / wrap / wrapper / wrapup / wx-copydir / wx-zipdir / wxi-shell / xmlmin / yaml /yate / yomb / yui-compressor / yuidocs / yukkuroid / zendesk-apps-tools / zip / zipstream / zobei-template / zoopinator / zopfli / gruntacular / gruntbuild / grunts /homemade / istanbul-mocha / js2uri / jwalsh-contrib-copy / lufax / mantri / masonjs / mongrel / node-asset-pipeline / nodetiles / projmate-consolidate / pw-rsync / pw-smushit / rcl / rosetta / smush-components / styles / svgo-grunt / tailored-jade / testdata-generator / testee / text2datauri / toast / towelie / webassemble / winningjs-build / winningjs-svg2png13年5月6日月曜日
  • 7. Gruntcontrib / contrib-clean / contrib-coffee / contrib-compass / contrib-compress / contrib-concat / contrib-connect / contrib-copy / contrib-csslint / contrib-cssmin / contrib-handlebars / contrib-htmlmin / contrib-imagemin / contrib-jade / contrib-jasmine / contrib-jshint / contrib-jst / contrib-less / contrib-livereload / contrib-mincss /contrib-nodeunit / contrib-qunit / contrib-requirejs / contrib-sass / contrib-stylus / contrib-uglify / contrib-watch / contrib-yuidoc / amd-doc / assemble / assemble-less /assemble-package-manager / assemble-utils / assetflow / atpackager / bbb / build-bootstrap / can-compile / coffee2closure / config-heroku / connect-modrewrite / dp-contrib-copy / enyo / fe / aggregator / akamai-clear / amd-check / amd-checkrequire / amd-dist / amd-doc / amd-test / anglebars / angular-annotator / angular-seed / angular-templates / angular-templates-amd / angular-verifybuild / annotated-requirejs / ant-sfdc / apidoc / append-sourcemapping / append-templates / asciify / asset-mapper / asset-revisions / assetify / assetpush / assets-revving / assets-versioning / at-class / autoprefixer / aws / backbone-routes / backbonebuilder / bake / banner / barista /barkeep / batman-template / bbb-requirejs / bbb-server / bbb-styles / beautify / behat / bem / benchmark / bg-shell / blanket / bless / blink1 / blueprints / bom /bookmarklet-thingy / bootstrap / booty / bower / bower-concat / bower-config / bower-hooks / bower-install / bower-organiser / bower-requirejs / bower-task / bowerful /browserify / browserify2 / browserstack / build-docs / build-gh-pages / build-requirejs / buildconcat / buildfiles / bump / bumpup / bumpx / buster / buster-plugin / bvitk-tools / cachebuster / cafe-mocha / casper / casperjs / cat / cdn / cdn-refresh / changelog / check-modules / check-online / chmod / chrome-manifest / clean / cleanx / clear /client-compiler / clientside / closure-compiler / closure-linter / closure-soy / closure-tools / closure-wrap / closurecompiler / cloudfiles / cloudfront-clear / cmd-combo /cmd-concat / cmd-transport / cms-site-scaffold / cms-upload / coffee / coffee-coverage / coffee-percolator / coffee-redux / coffee-server / coffeecup / coffeeify /coffeelint / combine / comment-media-queries / commonjs / commonjs-handlebars / compile-handlebars / complexity / compliment / component / component-build / concat / concat-sourcemap / concurrent / config / connect / connect-proxy / connect-rewrite / consolidate-css / context / contrib / contrib-clean / contrib-coffee / contrib-compass /contrib-compress / contrib-concat / contrib-connect / contrib-copy / contrib-csslint / contrib-cssmin / contrib-handlebars / contrib-htmlmin / contrib-imagemin / contrib-jade / contrib-jasmine / contrib-jshint / contrib-jst / contrib-less / contrib-livereload / contrib-mincss / contrib-nodeunit / contrib-qunit / contrib-requirejs / contrib-sass / contrib-stylus / contrib-uglify / contrib-watch / contrib-yuidoc / couch / couchapp / coverjs / cp / crane / crusher / crx / css / css-amd / css-collect / css-combo /css2js / cssc / csscss / cssjoin / csso / cssrb / cucumber / curl / customize-bootstrap / data-uri / dawg / dep-concat / dependencygraph / dependo / devcode / develop /devserver / devtools / dir2json / docco / docker / docs / docsitebuilder / docular / dojo / dom-munger / dot / dot-compiler / dot-precompile / dotjs / dotlit / download /dox / drush / dss / dust / dust-html / dustjs / eco / eco-amd / ect / ect-templates / eiffel / email-builder / ember-handlebars / ember-templates / emberify / emblem /encase / ender / env / es6-module-transpiler / esmangle / este / exec / exists / express / express-bootstrap / express-server / extdeps / extendscript / fail / fenbi-tasks /fest / file-creator / file-regex-rename / filesize / fileslist / fingerprint / flyway / forever / frontend / fscss / ftp-deploy / functional / furnace / fuse / gcc / ghost /gint / git / git-authors / git-contributors / git-describe / gitco / github-pages / gjslint / global-config / glue / groc / groundskeeper / growl / grunticon / grunticon-highrespng / grunticon-sass / grunticon-stylus / gss-pull / haml / handlebars-compiler / handlebars-custom / handlebars-js / handlebars-requirejs / handlebars-seajs /handlebars-static / hapi / hash / hashmap / hashres / haxe / heroku-deploy / hogan / hogan-client / hoganjs / html / html-annotation / html-build / html-builder / html-json-wrapper / html-prettyprinter / html-smoosher / html-snapshot / html-validation / html2js / html2json / htmlbuild / htmlcompressor / htmlgen / htmlhint / htmlrefs / httpcopy /hub / hug / hull-widgets / hustler / iced-coffee / iconv / ie9-selector-counter / image-embed / image-normalize / imagemagick / images / imagine / imgmin / imgo / importsrc /include / include-bootstrap / include-replace / include-replace-cwd / includes / indent / init-browser / init-gruntplugin2 / init-init / init-mootools / init-plugin / inline-assets / inline-css / install-dependencies / install-init / invalidate-cloudfront / iron-worker / istanbul / it / itv / jade / jade-handlebars / jade-plugin / jaded / jam /jasmine / jasmine-coverage / jasmine-html-runner / jasmine-html-spec-runner / jasmine-node / jasmine-node-lite / jasmine-node-task / jasmine-runner / jasmine-spec-server /jasmine-task / jassi / java-properties / jekyll / jenkins / jetrunner / jquery-content / jquery-json / jquerybuilder / jquerytransform / jsbeautifier / jsdoc / jsdoc-plugin /jsduck / jshint2 / jsio / jslint / jsmin-sourcemap / json / json-minify / json-schema / jsonlint / jsonmin / jssemicoloned / jstemplater / jstestdriver / jstools / jsttojs /jsvalidate / juggler / junit / jw-uglify / karma / karma-0.9.1 / kissy-template / kiwi / kmc / knox / koko / ksp / lenient / less / less-config / less-imports / lessless /lexicon / license / line-remover / lineending / link / link-html / lint-bash / lint-inline / lintblame / linter / livereload / livescript / lmd / localtunnel /lodashbuilder / macreload / manifest / mapcat / markdown / markdown-blog / markdown-to-json / markx / maven-tasks / md2html / md5 / md5-manifest / mdlldr / messageformat /mincer / mindirect / minified / minifykr / minispade / minjson / mins / mixin-dir / mkdir / mocha-cli / mocha-cov / mocha-hack / mocha-phantomjs / mocha-test / mod-dev /modernizr / modules / mustache / native2ascii / natural-docs / ne / net / neuter / newrelic / ng-constant / node-qunit / nodemon / nodequnit / nodestatic / notify / o-bundle-commands / open / oversprite / ozjs / ozjs-tudou / package-environment / pakmanager / parallel / parseunicode / pathfinder / peaches / peg / peon-gui / pg / phonegap-build /php / php-analyzer / php-set-constant / phpcs / phpdocumentor / phplint / phpunit / pistachio-compiler / pkg-to-component / plato / play / plugin-angular-template-inline /plugin-buster / plugin-pkg2cmp / plugin-size / pngmin / preload / preloader-manifest-generator / preprocess / prettify / process-css / proxy / qettlhup / qpoc-closure-compiler / queen / qunit-cov / qunit-istanbul / qunit-junit / qunit-serverless / qunit-sonar / qunit-tap / r3m / rackspace / rcukes / recess / recursive-compass / reduce /regex-replace / release / release-branch / reload / reloadr / rem-to-px / remotefile / remove-logging / rename / rendr-stitch / replace / replace-dojo-cache / replace-main /require-dir / required / requiregrep / requirejs / requirejs-jzaefferer / requirejs-tasks / rerun / resx2json / retro / rev / rev-md5 / rev-package / rework / rigger /ristretto / rm / robot / roy / rsync / rsync-2 / ruby-haml / s3 / s3deploy / samsung-widgetlist / sass / sass-charset-del / sass-convert / saucelabs / saucelabs-qunit / say /scandium / scp / scriptlinker / sea-hashmap / sed / selenium / sencha-dependencies / sencha-jasmine / sf / sftp-deploy / shell / shell-completion / shell-spawn / shopify /shower-markdown / siml / simple-mocha / simple-smtp / simple-watch / sitemap / sizediff / sizereport / slim / sm-watch / smush-components / smushit / snapshot / snockets /soy / soy-compile / sp2010 / spark / spell / spm-build / spritesheet / spritesmith / ss-helpers / ssh / stats / steal / stitch / stitch-extra / string-replace / strip /style-temtem / styleguide / styletto / stylusguide / svgmin / svn-fetch / svn-update / svninfo / sweet / swig / symbolic-link / symfony2-console / symlink / symlinks / sync /tagrelease / tailor / targethtml / template-client / template-client-dot / template-helper / template-html / template-inline / template-jasmine-curljs / template-module /templater / templates / templatizer / testacular / testem / text-replace / three-obj / thrill / tishadow / tmplmin / todos / topcoat / tpl / tpsmate / traceur / translate /travis / tree / tsag / tusk / tusk-coffee / type / typescript / unicon / unicon-sass / urequire / usemin / usemin-baked / usemin-codio / useref / utils / variations /velocity.js / ver / verbosity / verifylowercase / version / vlt / volo / vows / vows-runner / vows-test / watch-nospawn / webdriver / webfont / webfontjson / webmake /webpack / wickit / willitmerge / winston / wintersmith / wisdom / wkhtmltopdf / wording / wrap / wrapper / wrapup / wx-copydir / wx-zipdir / wxi-shell / xmlmin / yaml /yate / yomb / yui-compressor / yuidocs / yukkuroid / zendesk-apps-tools / zip / zipstream / zobei-template / zoopinator / zopfli / gruntacular / gruntbuild / grunts /homemade / istanbul-mocha / js2uri / jwalsh-contrib-copy / lufax / mantri / masonjs / mongrel / node-asset-pipeline / nodetiles / projmate-consolidate / pw-rsync / pw-smushit / rcl / rosetta / smush-components / styles / svgo-grunt / tailored-jade / testdata-generator / testee / text2datauri / toast / towelie / webassemble / winningjs-build / winningjs-svg2png763plugins2013/05/0513年5月6日月曜日
  • 8. type `npm`!npm install grunt-cli -gmkdir “your project” && cd “your project”npm install grunt --save-devnpm install grunt-contrib --save-devnpm install grunt-simple-mocha --save-dev13年5月6日月曜日
  • 9. create `Gruntfile.coffee`!vi Gruntfile.coffeeGruntfile isBluePrint for Tasks13年5月6日月曜日
  • 10. module.exports = (grunt) ->grunt.initConfigpkg: grunt.file.readJSON package.jsoncoffee:compile:options:bare: truefiles:public/js/myproject.js: src/client/myproject.coffeesimplemocha:all:src: test/**/*_test.coffeeoptions:ui: bddreporter: specdocco:index:src: [‘src/index.coffee]options:output: docs/watch:scripts:files: **/*.coffeetasks: [simplemocha, coffee]options:interrupt: truegrunt.loadNpmTasks grunt-contrib-coffeegrunt.loadNpmTasks grunt-contrib-cleangrunt.loadNpmTasks grunt-doccogrunt.loadNpmTasks grunt-contrib-watchgrunt.loadNpmTasks grunt-simple-mocha# Default task.grunt.registerTask default, [simplemocha, coffee]13年5月6日月曜日
  • 11. module.exports = (grunt) ->grunt.initConfigpkg: grunt.file.readJSON package.jsoncoffee:compile:options:bare: truefiles:public/js/myproject.js: src/client/myproject.coffeesimplemocha:all:src: test/**/*_test.coffeeoptions:ui: bddreporter: specdocco:index:src: [‘src/index.coffee]options:output: docs/watch:scripts:files: **/*.coffeetasks: [simplemocha, coffee]options:interrupt: truegrunt.loadNpmTasks grunt-contrib-coffeegrunt.loadNpmTasks grunt-contrib-cleangrunt.loadNpmTasks grunt-doccogrunt.loadNpmTasks grunt-contrib-watchgrunt.loadNpmTasks grunt-simple-mocha# Default task.grunt.registerTask default, [simplemocha, coffee]gruntコマンドが利用する13年5月6日月曜日
  • 12. module.exports = (grunt) ->grunt.initConfigpkg: grunt.file.readJSON package.jsoncoffee:compile:options:bare: truefiles:public/js/myproject.js: src/client/myproject.coffeesimplemocha:all:src: test/**/*_test.coffeeoptions:ui: bddreporter: specdocco:index:src: [‘src/index.coffee]options:output: docs/watch:scripts:files: **/*.coffeetasks: [simplemocha, coffee]options:interrupt: truegrunt.loadNpmTasks grunt-contrib-coffeegrunt.loadNpmTasks grunt-contrib-cleangrunt.loadNpmTasks grunt-doccogrunt.loadNpmTasks grunt-contrib-watchgrunt.loadNpmTasks grunt-simple-mocha# Default task.grunt.registerTask default, [simplemocha, coffee]タスク群の設定13年5月6日月曜日
  • 13. module.exports = (grunt) ->grunt.initConfigpkg: grunt.file.readJSON package.jsoncoffee:compile:options:bare: truefiles:public/js/myproject.js: src/client/myproject.coffeesimplemocha:all:src: test/**/*_test.coffeeoptions:ui: bddreporter: specdocco:index:src: [‘src/index.coffee]options:output: docs/watch:scripts:files: **/*.coffeetasks: [simplemocha, coffee]options:interrupt: truegrunt.loadNpmTasks grunt-contrib-coffeegrunt.loadNpmTasks grunt-contrib-cleangrunt.loadNpmTasks grunt-doccogrunt.loadNpmTasks grunt-contrib-watchgrunt.loadNpmTasks grunt-simple-mocha# Default task.grunt.registerTask default, [simplemocha, coffee]package.jsonを読み込むこの内容は”<% %>”のtemplateの中でpkg.XXXとして利用可能13年5月6日月曜日
  • 14. module.exports = (grunt) ->grunt.initConfigpkg: grunt.file.readJSON package.jsoncoffee:compile:options:bare: truefiles:public/js/myproject.js: src/client/myproject.coffeesimplemocha:all:src: test/**/*_test.coffeeoptions:ui: bddreporter: specdocco:index:src: [‘src/index.coffee]options:output: docs/watch:scripts:files: **/*.coffeetasks: [simplemocha, coffee]options:interrupt: truegrunt.loadNpmTasks grunt-contrib-coffeegrunt.loadNpmTasks grunt-contrib-cleangrunt.loadNpmTasks grunt-doccogrunt.loadNpmTasks grunt-contrib-watchgrunt.loadNpmTasks grunt-simple-mocha# Default task.grunt.registerTask default, [simplemocha, coffee]coffee (grunt-contrib-coffee)の設定compileというサブタスクの処理が記述されている13年5月6日月曜日
  • 15. module.exports = (grunt) ->grunt.initConfigpkg: grunt.file.readJSON package.jsoncoffee:compile:options:bare: truefiles:public/js/myproject.js: src/client/myproject.coffeesimplemocha:all:src: test/**/*_test.coffeeoptions:ui: bddreporter: specdocco:index:src: [‘src/index.coffee]options:output: docs/watch:scripts:files: **/*.coffeetasks: [simplemocha, coffee]options:interrupt: truegrunt.loadNpmTasks grunt-contrib-coffeegrunt.loadNpmTasks grunt-contrib-cleangrunt.loadNpmTasks grunt-doccogrunt.loadNpmTasks grunt-contrib-watchgrunt.loadNpmTasks grunt-simple-mocha# Default task.grunt.registerTask default, [simplemocha, coffee]simplemocha (grunt-simple-mocha)の設定allというサブタスクの処理が記述されている13年5月6日月曜日
  • 16. module.exports = (grunt) ->grunt.initConfigpkg: grunt.file.readJSON package.jsoncoffee:compile:options:bare: truefiles:public/js/myproject.js: src/client/myproject.coffeesimplemocha:all:src: test/**/*_test.coffeeoptions:ui: bddreporter: specdocco:index:src: [‘src/index.coffee]options:output: docs/watch:scripts:files: **/*.coffeetasks: [simplemocha, coffee]options:interrupt: truegrunt.loadNpmTasks grunt-contrib-coffeegrunt.loadNpmTasks grunt-contrib-cleangrunt.loadNpmTasks grunt-doccogrunt.loadNpmTasks grunt-contrib-watchgrunt.loadNpmTasks grunt-simple-mocha# Default task.grunt.registerTask default, [simplemocha, coffee]上記のtaskの処理実装が書かれているnpmをloadしている13年5月6日月曜日
  • 17. module.exports = (grunt) ->grunt.initConfigpkg: grunt.file.readJSON package.jsoncoffee:compile:options:bare: truefiles:public/js/myproject.js: src/client/myproject.coffeesimplemocha:all:src: test/**/*_test.coffeeoptions:ui: bddreporter: specdocco:index:src: [‘src/index.coffee]options:output: docs/watch:scripts:files: **/*.coffeetasks: [simplemocha, coffee]options:interrupt: truegrunt.loadNpmTasks grunt-contrib-coffeegrunt.loadNpmTasks grunt-contrib-cleangrunt.loadNpmTasks grunt-doccogrunt.loadNpmTasks grunt-contrib-watchgrunt.loadNpmTasks grunt-simple-mocha# Default task.grunt.registerTask default, [simplemocha, coffee]taskのaliasを行い、自分好みの順序で実行したいTask群を設定する13年5月6日月曜日
  • 18. type `grunt`!% grunt coffeeRunning "coffee:compile" (coffee) taskFile public/js/myproject.js created.Done, without errors.% grunt watchRunning "watch" taskWaiting...13年5月6日月曜日
  • 19. オレの最強のGruntfile13年5月6日月曜日
  • 20. coffee-coverage :simple-mocha :contrib-coffee :contrib-uglify :contrib-compress :docco :contrib-watch :check code coveragemake testcompile coffee-scriptuglify codemake zipand create documentobserve all tasks13年5月6日月曜日
  • 21. code coverageを求めtestを走らせcoffeeをbuildし圧縮しzip化しdocumentを作成しファイルを監視し変更があれば自動で実行!13年5月6日月曜日
  • 22. ※注意1:doccoは開発者多忙につきdocco本体のバージョンアップに追従できていませんhttps://github.com/DavidSouther/grunt-docco/pull/1413年5月6日月曜日
  • 23. ※注意2:coffee-coverageによるカバレッジテストの際には読み込むファイルを変更する(lib-covなど)必要ありtest/*_test.coffeeで環境変数によって分岐させる必要ありgrunt-execで、コマンド叩く必要あり13年5月6日月曜日
  • 24. ※注意2:coffee-coverageによるカバレッジテストの際には読み込むファイルを変更する(lib-covなど)必要ありtest/*_test.coffeeで環境変数によって分岐させる必要ありgrunt-execで、コマンド叩く必要あり正直萎えるんで誰か頼む13年5月6日月曜日
  • 25. GruntかわいいよGrunt13年5月6日月曜日