forked from Sebobo/jquery.smallipop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.coffee
70 lines (67 loc) · 2.27 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
module.exports = (grunt) ->
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-qunit'
grunt.loadNpmTasks 'grunt-contrib-uglify'
grunt.loadNpmTasks 'grunt-contrib-sass'
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'smallipop.jquery.json'
meta:
banner: '/*!\n' +
'jQuery <%= pkg.name %> plugin\n' +
'@name jquery.<%= pkg.name %>.js\n' +
'@author Sebastian Helzle ([email protected] or @sebobo)\n' +
'@version <%= pkg.version %>\n' +
'@date <%= grunt.template.today("yyyy-mm-dd") %>\n' +
'@category jQuery plugin\n' +
'@copyright (c) 2011-2013 Small Improvements (http://www.small-improvements.com)\n' +
'@license Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.\n' +
'*/\n'
qunit:
files: ['tests/**/*.html']
growl:
coffee:
title: 'grunt'
message: 'Compiled coffeescript'
sass:
title: 'grunt'
message: 'Compiled sass'
coffee:
compile:
options:
bare: true
files:
'lib/jquery.smallipop.js': ['src/coffee/jquery.smallipop.coffee']
'tests/tests.js': ['src/coffee/tests.coffee']
watch:
coffee:
files: 'src/coffee/**/*.coffee',
tasks: ['coffee:compile']#, 'growl:coffee']
sass:
files: 'src/scss/**/*.scss'
tasks: ['sass:compile']#, 'growl:sass']
sass:
dist:
options:
style: 'compressed'
compass: true
files:
'css/jquery.smallipop.min.css': 'src/scss/jquery.<%= pkg.name %>.scss'
compile:
options:
style: 'expanded'
compass: true
files:
'css/screen.css': 'src/scss/screen.scss'
'css/jquery.smallipop.css': 'src/scss/jquery.<%= pkg.name %>.scss'
uglify:
dist:
options:
banner: '<%= meta.banner %>'
files:
'lib/jquery.smallipop.min.js': ['lib/jquery.<%= pkg.name %>.js']
# Default task which watches, sass and coffee.
grunt.registerTask 'default', ['watch']
# Release task to run tests then minify js and css
grunt.registerTask 'release', ['qunit', 'uglify', 'sass:dist']