This repository has been archived by the owner on Jul 28, 2020. It is now read-only.
forked from jonathan-fielding/SimpleStateManager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
executable file
·75 lines (66 loc) · 2.53 KB
/
Gruntfile.js
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
71
72
73
74
75
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
banner: '/*! <%= pkg.name %> | license: MIT | version: <%= pkg.version %> | build date: <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
build: {
files: {
'dist/ssm.min.js': ['src/ssm.js']
}
}
},
copy: {
main: {
files: [
// includes files within path
{expand: true, flatten: true, src: ['docs/bower_components/jquery/jquery.min.js'], dest: 'docs/js/vendor', filter: 'isFile'},
{expand: true, flatten: true, src: ['docs/bower_components/sass-bootstrap/js/bootstrap-scrollspy.js'], dest: 'docs/js/vendor', filter: 'isFile'},
{expand: true, flatten: true, src: ['docs/bower_components/sass-bootstrap/js/bootstrap-collapse.js'], dest: 'docs/js/vendor', filter: 'isFile'},
{expand: true, flatten: true, src: ['docs/bower_components/modernizr/modernizr.js'], dest: 'docs/js/vendor', filter: 'isFile'},
{expand: true, flatten: true, src: ['docs/bower_components/respond/respond.min.js'], dest: 'docs/js/vendor', filter: 'isFile'}
]
}
},
qunit: {
all: ['test/**/*.html']
},
jshint: {
all: ['src/ssm.js']
},
compass: {
dev: {
options: {
sassDir: 'docs/sass',
cssDir: 'docs/css',
imagesDir: 'docs/images',
environment: 'development',
httpGeneratedImagesPath: 'docs/images'
}
}
},
watch: {
build: {
files: ['src/ssm.js'],
tasks: ['uglify']
},
compass: {
files: ['docs/sass/{,*/}*.{scss,sass}'],
tasks: ['compass:dev']
},
}
});
// Required task(s)
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-jshint');
// Default task(s)
grunt.registerTask('default', ['uglify', 'copy']);
// Travis CI tests
grunt.registerTask('travis', ['qunit','jshint']);
};