@DBFluteフェス2013
本質的じゃないコト、自動チェックできるコトの指摘。
本質的じゃないコト、自動チェックできるコトの指摘。
$ npm install jshint -g $ jshint app.js
app.js: line 4, col 11, Expected '===' and instead saw '=='. app.js: line 5, col 8, Expected 'i' to have an indentation at 7 instead at 8.
.jshintrc
{
"eqeqeq": true,
"indent": 4
}
$ optipng hoge.png
** Processing: hoge.png 500x223 pixels, 4x8 bits/pixel, RGB+alpha Reducing image to 3x8 bits/pixel, RGB Input IDAT size = 100330 bytes Input file size = 100381 bytes ... Output file size = 60150 bytes (40231 bytes = 40.00% decrease)
手作業じゃ面倒, 忘れるし間違う, 同じことを繰り返したくない
module.exports = function(grunt) {
grunt.initConfig({
concat: {
dist: {
src: ['.tmp/js/*.js'],
dest: 'js/app.js'
}
},
uglify: {
dist: {
src: 'js/app.js',
dest: 'js/app.min.js'
}
}
});
};
LiveReload$ npm install karma -g $ mkdir project && cd project $ karma init $ karma start
$ npm install grunt-mocha --save-dev
package.json
devDependencies": {
"grunt-mocha": "~0.2.3",
...
$ npm install
fb/twitter shoito
Use a spacebar or arrow keys to navigate