Personal portfolio website for Regina Carvalho. Built with Famous.js library.

Gruntfile.js 3.7KB

    module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), jshint: { files: ['Gruntfile.js', 'app/scripts/*.js', 'app/scripts/**/*.js', 'test/**/*.js'], options: { globals: { jQuery: true } } }, watch: { files: ['<%= jshint.files %>'], tasks: ['jshint'] }, concat: { options: { // define a string to put between each file in the concatenated output separator: ';' }, dist: { // the files to concatenate src: ['app/scripts/*.js', 'app/scripts/**/*.js'], // the location of the resulting JS file dest: 'dist/js/app.js' } }, uglify: { options: { // the banner is inserted at the top of the output banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n', mangle: false }, dist: { files: { 'dist/js/app.min.js': ['<%= concat.dist.dest %>'] } } }, cssmin: { options: { banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n', shorthandCompacting: false, roundingPrecision: -1 }, target: { files: { 'dist/css/styles.css': ['app/styles/*.css'] } } }, qunit: { files: ['test/**/*.html'] }, bower: { dist: { dest: 'dist/lib/' } }, copy: { dist: { files: [ {src: ['app/index.html'], dest: 'dist/index.html', filter: 'isFile'}, {src: ['app/data.json'], dest: 'dist/data.json', filter: 'isFile'}, {expand: true, flatten: false, cwd: 'app/views/', src: ['**'], dest: 'dist/views/', filter: 'isFile'}, {expand: true, flatten: false, cwd: 'app/content/', src: ['**'], dest: 'dist/content/', filter: 'isFile'} ] } }, wiredep: { task: { // Point to the files that should be updated when // you run `grunt wiredep` src: [ 'app/*.html', 'app/views/**/*.html', // .html support... 'app/views/**/*.jade', // .jade support... 'app/styles/main.scss', // .scss & .sass support... 'app/config.yml' // and .yml & .yaml support out of the box! ], options: { // See wiredep's configuration documentation for the options // you may pass: // https://github.com/taptapship/wiredep#configuration } } }, serve: { options: { port: 8000, }, dist: { path: '/dist' } }, useminPrepare: { html: 'dist/index.html', options: { dest: 'dist/' } }, usemin: { html: 'dist/index.html', options: { assetsDirs: ['dist/js', 'dist/css', 'dist/content'] } } }); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-qunit'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-wiredep'); grunt.loadNpmTasks('grunt-serve'); grunt.loadNpmTasks('grunt-contrib-cssmin'); grunt.loadNpmTasks('grunt-bower'); grunt.loadNpmTasks('grunt-contrib-copy'); //grunt.loadNpmTasks('grunt-filerev'); grunt.loadNpmTasks('grunt-usemin'); grunt.registerTask('test', ['jshint', 'qunit']); grunt.registerTask('default', ['jshint', 'concat', 'uglify', 'cssmin', 'wiredep' ]); grunt.registerTask('deploy', ['jshint', 'bower', 'concat', 'uglify', 'cssmin', 'copy' ]); grunt.registerTask('build', [ 'copy', 'useminPrepare', 'concat:generated', 'uglify:generated', 'usemin', 'cssmin:target' ]); };