module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: '', meta: { file: "lungo", // BETA endpoint: "example/components", version: ".brownie", // RELEASE // endpoint: "packages", // version: "", banner: '/* <%= pkg.name %> v<%= pkg.version %> - <%= grunt.template.today("yyyy/m/d") %>\n' + ' <%= pkg.homepage %>\n' + ' Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>' + ' - Licensed <%= _.pluck(pkg.license, "type").join(", ") %> */' }, resources: { coffeescripts: ['src/**/*.coffee'], core: ['build/src/Lungo.js'], modules: [ 'build/src/modules/*.js', 'build/src/boot/*.js', 'build/src/data/*.js', 'build/src/element/*.js', 'build/src/router/Lungo.Router.js', 'build/src/router/Lungo.Router.*.js'], stylesheets: [ 'src/**/lungo.base.styl', 'src/**/lungo.layout.styl', 'src/**/lungo.layout.*.styl', 'src/**/lungo.widgets.styl', 'src/**/lungo.widgets.*.styl', 'src/**/lungo.media.*.styl'], icons: ['src/**/lungo.icon**.styl'], themes: ['src/**/theme**.styl'] }, coffee: { lungo: { src: [''], dest: 'build', options: { bare: true, preserve_dirs: true } } }, concat: { js: { src: ['', '', ''], dest: 'build/<%=meta.file%>.js' } }, min: { js: { src: ['', 'build/<%=meta.file%>.js'], dest: '<%=meta.endpoint%>/<%=meta.file%><%=meta.version%>/<%=meta.file%>.js' } }, stylus: { stylesheets: { options: { compress: true, paths: ['src/stylesheets/import'] }, files: { '<%=meta.endpoint%>/<%=meta.file%><%=meta.version%>/<%=meta.file%>.css': '' } }, icons: { options: { compress: true }, files: { '<%=meta.endpoint%>/<%=meta.file%><%=meta.version%>/**.css': '' } }, flatten: { options: { flatten: true }, files: { '<%=meta.endpoint%>/<%=meta.file%><%=meta.version%>/**.css': '' } } }, copy: { example: { files: { 'example/components/<%=meta.file%>/': ['<%=meta.endpoint%>/<%=meta.file%>/*'] } }, target: { files: { '<%=meta.endpoint%>/<%=meta.file%>.theme/': [''] } } }, watch: { files: ['', '', ''], tasks: 'coffee concat min stylus' } }); grunt.loadNpmTasks('grunt-coffee'); grunt.loadNpmTasks('grunt-contrib-stylus'); grunt.loadNpmTasks('grunt-contrib-copy'); // Default task. grunt.registerTask('default', 'coffee concat min stylus copy'); };