|
|
|
@ -3,6 +3,13 @@ module.exports = function(grunt) {
|
|
|
|
|
// Project configuration.
|
|
|
|
|
grunt.initConfig({ |
|
|
|
|
pkg: grunt.file.readJSON('package.json'), |
|
|
|
|
|
|
|
|
|
// Metadata.
|
|
|
|
|
meta: { |
|
|
|
|
srcPath: 'lib/sass/', |
|
|
|
|
distPath: 'dist/' |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
banner: '/*!\n' + |
|
|
|
|
'* Ratchet v<%= pkg.version %> by @connors, @dhg, and @fat\n' + |
|
|
|
|
'* Copyright <%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' + |
|
|
|
@ -10,39 +17,41 @@ module.exports = function(grunt) {
|
|
|
|
|
'*\n' + |
|
|
|
|
'* Designed and built by @connors, @dhg, and @fat.\n' + |
|
|
|
|
'*/\n', |
|
|
|
|
uglify: { |
|
|
|
|
options: { |
|
|
|
|
banner: '' |
|
|
|
|
}, |
|
|
|
|
gbuild: { |
|
|
|
|
src: 'src/<%= pkg.name %>.js', |
|
|
|
|
dest: 'build/<%= pkg.name %>.min.js' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sass: { |
|
|
|
|
dist : { |
|
|
|
|
files: [{ |
|
|
|
|
expand: true, |
|
|
|
|
cwd: 'ratchet', |
|
|
|
|
src: ['lib/scss/*.scss'], |
|
|
|
|
dest: 'dist', |
|
|
|
|
ext: '.css' |
|
|
|
|
}] |
|
|
|
|
} |
|
|
|
|
options: { |
|
|
|
|
banner: '/**\n' + |
|
|
|
|
'* ==================================\n' + |
|
|
|
|
'* Ratchet v2.0.0\n' + |
|
|
|
|
'* Licensed under The MIT License\n' + |
|
|
|
|
'* http://opensource.org/licenses/MIT\n' + |
|
|
|
|
'* ==================================\n' + |
|
|
|
|
'*/\n', |
|
|
|
|
}, |
|
|
|
|
dist: { |
|
|
|
|
files: { |
|
|
|
|
'<%= meta.distPath %>ratchet.css': '<%= meta.srcPath %>ratchet.scss' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
watch: { |
|
|
|
|
scripts: { |
|
|
|
|
files: [ |
|
|
|
|
'<%= meta.srcPath %>/**/*.scss' |
|
|
|
|
], |
|
|
|
|
tasks: ['sass'] |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// Load the plugin that provides the "uglify" task.
|
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-uglify'); |
|
|
|
|
//grunt.loadNpmTasks('grunt-contrib-uglify');
|
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-sass'); |
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-watch'); |
|
|
|
|
|
|
|
|
|
// Default task(s).
|
|
|
|
|
grunt.registerTask('default', ['uglify']); |
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-sass'); |
|
|
|
|
//grunt.registerTask('default', ['uglify']);
|
|
|
|
|
grunt.registerTask('default', ['sass']); |
|
|
|
|
|
|
|
|
|
grunt.registerTask('default', ['sass']); |
|
|
|
|
}; |