X

Geertjan's Blog

  • March 24, 2015

A Simple Starter Project With Grunt

Geertjan Wielenga
Product Manager
In your package.json file:

{
    "name": "simple-app",
    "private": true,
    "version": "0.0.0",
    "description": "A Simple Starter Project With Grunt",
    "repository": "https://github.com/angular/angular-seed",
    "devDependencies": {
        "grunt-contrib-copy": "0.4.x",
        "grunt-contrib-clean": "0.4.x"
    }
}



In your Grunt file:
/* global module */
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
copy:{
build:{
cwd:'public_html',
src:['**'],
dest:'build',
expand:true
}
},
clean:{
build:{
src:'build'
}
}
});
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.registerTask(
'build',
'Compiles all the assets and copies the files to the build directory.',
[ 'clean', 'copy' ]
);
};

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.