- Äɲ䵤줿¹Ô¤Ï¤³¤Î¿§¤Ç¤¹¡£
- ºï½ü¤µ¤ì¤¿¹Ô¤Ï¤³¤Î¿§¤Ç¤¹¡£
*ºÇ¾®¸Â¤Î¼Â¹ÔGrunt¥µ¥ó¥×¥ë
¼ê½ç¤ò¤·¤Ã¤«¤ê³Ð¤¨¤Þ¤·¤ç¤¦¡ª
+Grunt¤ò¼Â¹Ô¤¹¤ë¥Ç¥£¥ì¥¯¥È¥ê¤òºîÀ®¤·¤Æ¥¿¡¼¥ß¥Ê¥ë¤Ç³«¤¤Þ¤¹
+package.json¤òºîÀ®¤·¤Þ¤¹ ... ¢â ¥×¥í¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë
nmp init
+¥í¡¼¥«¥ë¤Ëgrunt¥â¥¸¥å¡¼¥ë¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤Þ¤¹
sudo npm install grunt --save-dev
+Gruntfile.js¥Õ¥¡¥¤¥ë¤òºîÀ®¤·¤Þ¤¹ ... ¢â makefile
+Grunt¤ò¼Â¹Ô¤·¤Þ¤¹
grunt
°ú¿ô¤òÉÕ¤±¤Ê¤¤¤È¥¿¡¼¥²¥Ã¥È¤Ïdefault¤È¤Ê¤ê¤Þ¤¹¡£¡Ögrunt default¡×¤ÈƱ¤¸¤Ç¤¹¡£
~ ~
package.jsonÎã
#pre{{
{
"name": "it",
"version": "1.0.0",
"description": "",
"main": "Gruntfile.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"grunt": "^0.4.5"
}
}
}}
~
Gruntfile.jsÎã
#pre{{
module.exports = function(grunt) {
//Grunt¤ÎÀßÄê
grunt.initConfig({
pkg: grunt.file.readJSON('package.json')
});
//default¥¿¥¹¥¯¤ÎÄêµÁ
grunt.registerTask('default', 'Log some stuff.', function() {
//¥í¥°¥á¥Ã¥»¡¼¥¸¤Î½ÐÎÏ
grunt.log.write('Logging some stuff...').ok();
});
};
}}
~
¥µ¥ó¥×¥ë¤Ç¤Î¡Ögrunt¡×¼Â¹Ô·ë²ÌÎã
Running "default" task
Logging some stuff...OK
Done, without errors.
»²¹Íurl: [[¥Ö¥é¥Ã¥¯¤ÊWeb³«È¯¸½¾ì¤ÎµßÀ¤¼ç¡¢Grunt¤Î¥¤¥ó¥¹¥È¡¼¥ë¤È»È¤¤Êý | @IT>http://www.atmarkit.co.jp/ait/articles/1403/04/news020.html]]
*¥ê¥ó¥¯
-[[¥³¥Ô¥Ú¤¬½ÐÍè¤ë¤Ê¤éï¤Ç¤â½ÐÍè¤ë¡¢WebÀ©ºî¥¿¥¹¥¯¼«Æ°²½¥Ä¡¼¥ë¡ÖGrunt¡×ƳÆþ¼ê½ç | OZPA¤Îɽ4>http://ozpa-h4.com/2014/02/06/grunt-js-install/]]
-[[Grunt¤Ç»Ï¤á¤ëWeb³«È¯Çú®¼«Æ°²½ÆþÌç¡Ê1¡Ë¡§¥Ö¥é¥Ã¥¯¤ÊWeb³«È¯¸½¾ì¤ÎµßÀ¤¼ç¡¢Grunt¤Î¥¤¥ó¥¹¥È¡¼¥ë¤È»È¤¤Êý | ¡÷IT>http://www.atmarkit.co.jp/ait/articles/1403/04/news020.html?fb_action_ids=495947923840680&fb_action_types=og.likes&fb_source=other_multiline&action_object_map=%5B407791856024072%5D&action_type_map=%5B%22og.likes%22%5D&action_ref_map=%5B%5D]]