module.exports = (grunt)-> version = -> grunt.file.readJSON("package.json").version version_text = -> "v#{version()}" repo = "https://github.com/dylan/modular" grunt.initConfig pkg: grunt.file.readJSON("package.json") repo: repo comments: """ /* // <%= pkg.name %> // v<%= pkg.version %> // Built on <%= grunt.template.today("yyyy-mm-dd") %> // Full source at <%= repo %> // // MIT License, <%= repo %>/blob/master/LICENSE // This file is generated by `grunt build` do not edit it by hand. */\n """ minified_comments: "/* <%= pkg.name %> v<%= pkg.version %>, MIT License <%= repo %>/blob/master/LICENSE */" sass: dist: files: 'css/modular.css':'app/assets/stylesheets/dist.scss' 'example/example.css':'example/example.scss' express: all: options: hostname: '*' port: 3000 bases: 'example' open: all: path: 'http://localhost:<%= express.all.options.port %>' cssmin: minify: expand: true options: banner: '<%= minified_comments %>' cwd: 'css/' src: ['*.css','!*.min.css'] dest: 'css/' ext: '.min.css' watch: scripts: files: ['app/assets/stylesheets/*.scss','app/assets/stylesheets/*/*.scss','example/*.scss','example/*.html'] tasks: ['build'] options: livereload: true clean: dist: ['.sass-cache','css/*'] concat: options: banner: '<%= comments %>' css: src: ['css/modular.css'] dest: 'css/modular.css' grunt.loadNpmTasks 'grunt-express' grunt.loadNpmTasks 'grunt-open' grunt.loadNpmTasks 'grunt-notify' grunt.loadNpmTasks 'grunt-contrib-sass' grunt.loadNpmTasks 'grunt-contrib-cssmin' grunt.loadNpmTasks 'grunt-contrib-concat' grunt.registerTask 'default', ['build'] grunt.registerTask 'build', ['sass','cssmin','concat'] grunt.registerTask 'server', ['build','express','open','watch']