Created
August 18, 2016 18:57
-
-
Save joedaniels29/8a19f7fd78ea0ecba38712b3f5215695 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
// configure the tasks | |
grunt.initConfig({ | |
//pkg: grunt.file.readJSON('package.json'), | |
clean: { | |
all: ['Epilepsy/Resources/HTMLContent'] | |
}, | |
copy: { | |
dev: { | |
files: [ | |
{ | |
expand: true, | |
cwd: 'WebContentSource/src', | |
src: ['scripts/**/*.js', 'styles/**/*.css'], | |
dest: 'Epilepsy/Resources/HTMLContent' | |
},{ | |
expand: true, | |
cwd: 'WebContentSource/src', | |
src: ['images/**/*'], | |
dest: 'Epilepsy/Resources/HTMLContent' | |
}] | |
}, | |
dist: { | |
files: [ | |
{ | |
expand: true, | |
cwd: 'WebContentSource/src', | |
src: ['images/**/*'], | |
dest: 'Epilepsy/Resources/HTMLContent' | |
}] | |
} | |
}, | |
sass: { | |
all: { | |
options: { | |
style: 'compressed', | |
compass: true | |
}, | |
files: { | |
'Epilepsy/Resources/HTMLContent/styles/app.css': 'WebContentSource/src/styles/app.scss', | |
'Epilepsy/Resources/HTMLContent/styles/eligibility.css': 'WebContentSource/src/styles/eligibility.scss', | |
'Epilepsy/Resources/HTMLContent/styles/consent.css': 'WebContentSource/src/styles/consent.scss' | |
} | |
} | |
}, | |
ejs: { | |
all: { | |
cwd: 'WebContentSource/src/pages/', | |
src: '*.ejs', | |
dest: 'Epilepsy/Resources/HTMLContent/pages/', | |
expand: true, | |
ext: '.html' | |
} | |
}, | |
uglify: { | |
option: { | |
mangle: false | |
}, | |
all: { | |
files: [{ | |
expand: true, | |
cwd: 'WebContentSource/src/scripts', | |
src: '**/*.js', | |
dest: 'Epilepsy/Resources/HTMLContent/scripts' | |
}] | |
} | |
}, | |
watch: { | |
dev: { | |
files: ['*', 'WebContentSource/src/**/*'], | |
tasks: ['clean', 'copy:dev', 'sass', 'ejs'], | |
options: { | |
spawn: false, | |
livereload: true | |
} | |
} | |
}, | |
connect: { | |
server: { | |
options: { | |
port: 8000, | |
hostname: '*', | |
livereload: true | |
} | |
} | |
} | |
}); | |
grunt.registerTask('dev', ['clean', 'copy:dev', 'sass', 'ejs', 'connect', 'watch']); | |
grunt.registerTask('dist', ['clean', 'copy:dist', 'sass', 'ejs', 'uglify']); | |
// load the tasks | |
grunt.loadNpmTasks('grunt-contrib-clean'); | |
grunt.loadNpmTasks('grunt-contrib-copy'); | |
grunt.loadNpmTasks('grunt-contrib-uglify'); | |
grunt.loadNpmTasks('grunt-contrib-sass'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.loadNpmTasks('grunt-contrib-connect'); | |
grunt.loadNpmTasks('grunt-ejs'); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment