standart minimal grunt config

module.exports = function (grunt) { 'use strict'; grunt.initConfig({ concat: { dist: { src: [ 'bower_components/jquery-legacy/dist/jquery.min.js', 'bower_components/slick.js/slick/slick.min.js', 'bower_components/magnific-popup/dist/jquery.magnific-popup.min.js', 'bower_components/jquery-placeholder/jquery.placeholder.min.js' ], dest: 'js/production-libs.js' } }, uglify: { my_target: { files: { 'js/production-libs.min.js': ['js/production-libs.js'] } } }, less: { development: { options: { 'sourceMap': true, 'compress': true }, files: { 'css/styles.css': 'less/styles.less' } } }, watch: { styles: { files: [ 'less/styles.less' ], tasks: ['default'], options: { spawn: false } } } }); grunt.loadNpmTasks('grunt-contrib-less');//less to css grunt.loadNpmTasks('grunt-contrib-watch'); grunt.registerTask('default', ['less', 'watch']); grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.registerTask('make-js', ['concat', 'uglify']); };

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.