Build mobile apps with simple HTML, CSS, and JS components. http://goratchet.com/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
2.4 KiB

/* ----------------------------------
* Ratchet's Gruntfile
* Licensed under The MIT License
* http://opensource.org/licenses/MIT
* ---------------------------------- */
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// Metadata.
meta: {
distPath: 'dist/',
docsPath: 'docs/dist/',
docsAssetsPath: 'docs/assets/'
},
banner: '/*\n' +
11 years ago
' * =====================================================\n' +
' * Ratchet v<%= pkg.version %>\n' +
' * Copyright <%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
' * Licensed under <%= _.pluck(pkg.licenses, "url").join(", ") %>\n' +
' *\n' +
11 years ago
' * V<%= pkg.version %> designed by @connors.\n' +
11 years ago
' * =====================================================\n' +
' */\n',
concat: {
options: {
banner: '<%= banner %>'
},
ratchet: {
src: [
'js/modals.js',
'js/popovers.js',
'js/push.js',
'js/segmented-controllers.js',
'js/sliders.js',
'js/toggles.js'
],
dest: '<%= meta.distPath %><%= pkg.name %>.js'
},
docs: {
src: '<%= meta.distPath %><%= pkg.name %>.js',
dest: '<%= meta.docsPath %><%= pkg.name %>.js'
}
},
11 years ago
sass: {
11 years ago
options: {
banner: '<%= banner %>',
style: 'expanded',
},
dist: {
files: {
'<%= meta.distPath %><%= pkg.name %>.css': 'sass/ratchet.scss',
11 years ago
'<%= meta.distPath %><%= pkg.name %>-theme-ios.css': 'sass/theme-ios.scss',
'<%= meta.distPath %><%= pkg.name %>-theme-android.css': 'sass/theme-android.scss',
'<%= meta.docsAssetsPath %>css/docs.css': 'sass/docs.scss'
}
11 years ago
}
},
copy: {
docs: {
expand: true,
cwd: 'dist',
src: [
'*'
],
dest: 'docs/dist'
}
},
watch: {
11 years ago
scripts: {
files: [
'<%= meta.srcPath %>/**/*.scss'
],
tasks: ['sass']
}
}
});
// Load the plugins
require('load-grunt-tasks')(grunt, {scope: 'devDependencies'});
// Default task(s).
grunt.registerTask('default', ['sass', 'concat', 'copy']);
grunt.registerTask('build', ['sass', 'concat', 'copy']);
11 years ago
};