2013-05-17 06:08:30 -04:00
|
|
|
module.exports = function(grunt) {
|
|
|
|
|
|
|
|
grunt.initConfig({
|
|
|
|
pkg: grunt.file.readJSON('package.json'),
|
|
|
|
// CSS
|
|
|
|
sass: {
|
|
|
|
dist: {
|
|
|
|
files: {
|
2013-07-15 05:28:06 -04:00
|
|
|
'build/css/Ribs.css': 'src/scss/Ribs.scss',
|
2013-05-17 06:08:30 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
csslint: {
|
|
|
|
scssoutput: {
|
|
|
|
options: {
|
2013-05-17 08:01:58 -04:00
|
|
|
import: false,
|
|
|
|
csslintrc: '.csslintrc'
|
2013-05-17 06:08:30 -04:00
|
|
|
},
|
2013-07-15 05:28:06 -04:00
|
|
|
src: ['build/css/Ribs.css']
|
2013-07-15 05:30:27 -04:00
|
|
|
},
|
|
|
|
brutal: {
|
|
|
|
src: ['build/css/Ribs.css']
|
2013-05-17 06:08:30 -04:00
|
|
|
}
|
|
|
|
},
|
|
|
|
cssmin: {
|
|
|
|
compress: {
|
|
|
|
options: {
|
2013-07-15 05:19:46 -04:00
|
|
|
banner: '/* <%= pkg.name %> <%= pkg.version %> - https://github.com/nickpack/Ribs - <%= grunt.template.today("dd-mm-yyyy") %> */'
|
2013-05-17 06:08:30 -04:00
|
|
|
},
|
|
|
|
files: {
|
2013-07-15 05:28:06 -04:00
|
|
|
'build/css/Ribs.min.css': 'build/css/Ribs.css'
|
2013-05-17 06:08:30 -04:00
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
watch: {
|
2013-07-15 05:28:06 -04:00
|
|
|
files: 'src/scss/**/*',
|
2013-07-21 16:49:03 -04:00
|
|
|
tasks: ['sass', 'csslint:scssoutput', 'cssmin']
|
2013-10-10 13:35:26 -04:00
|
|
|
},
|
|
|
|
styleguide: {
|
|
|
|
styledocco: {
|
|
|
|
options: {
|
|
|
|
framework: {
|
|
|
|
name: 'styledocco'
|
|
|
|
},
|
|
|
|
name: '<%= pkg.name %>'
|
|
|
|
},
|
|
|
|
template: {
|
|
|
|
include: 'build/css/Ribs.min.css'
|
|
|
|
},
|
|
|
|
files: {
|
|
|
|
'docs': 'src/scss/*.scss'
|
|
|
|
},
|
|
|
|
}
|
|
|
|
},
|
2013-05-17 06:08:30 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-csslint');
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-cssmin');
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-sass');
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
2013-10-10 13:35:26 -04:00
|
|
|
grunt.loadNpmTasks('grunt-styleguide');
|
|
|
|
|
|
|
|
grunt.registerTask('docs', ['sass', 'styleguide']);
|
2013-07-15 05:30:27 -04:00
|
|
|
grunt.registerTask('test', ['sass', 'csslint:scssoutput']);
|
2013-05-17 06:20:43 -04:00
|
|
|
grunt.registerTask('minify', ['cssmin']);
|
2013-05-28 15:35:21 -04:00
|
|
|
grunt.registerTask('default', ['sass', 'cssmin']);
|
2013-05-17 06:08:30 -04:00
|
|
|
|
2013-10-10 13:35:26 -04:00
|
|
|
};
|