-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathGruntfile.coffee
42 lines (39 loc) · 1.02 KB
/
Gruntfile.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
coffee:
compile:
options:
sourceMap: true
files:
'dist/script.js': 'src/script.coffee'
'dist/options.js': 'src/options.coffee'
watch:
scripts:
files: [ 'src/*.coffee' ]
tasks: 'coffee'
styles:
files: [ 'src/*.scss' ]
tasks: 'sass'
htmls:
files: [ 'src/*.html' ]
tasks: 'copy'
sass:
dist:
options:
style: "compressed"
files:
'dist/style.css': 'src/style.scss'
copy:
main:
expand: true
cwd: "src/"
src: "*.html"
dest: "dist/"
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-sass'
grunt.loadNpmTasks 'grunt-contrib-copy'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.registerTask 'build', ['coffee', 'sass', 'copy']
grunt.registerTask 'default', ['build']