-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
57 lines (53 loc) · 1.63 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
module.exports = function(grunt) {
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
DEVELOPMENT_PATH: 'demo/app/',
SRC_PATH: 'src/',
PRODUCTION_PATH: 'demo/dist/',
browserify: {
//src: {
// src: './src/pagination.js',
// dest: './src/main.js'
//},
demo: {
src: './demo/app/app.js',
dest: './demo/app/main.js'
}
},
ts: {
main: {
options: require('./tsconfig.json').compilerOptions,
src: [
'<%= DEVELOPMENT_PATH %>' + '**/*.ts',
'<%= SRC_PATH %>' + '**/*.ts'
],
dist: '<%= PRODUCTION_PATH %>'
}
},
watch: {
src: {
files: [
'<%= DEVELOPMENT_PATH %>' + '**/*.ts',
'<%= DEVELOPMENT_PATH %>' + '**/*.html',
'<%= DEVELOPMENT_PATH %>' + '**/*.css',
'<%= SRC_PATH %>' + '**/*.ts',
'<%= SRC_PATH %>' + '**/*.html',
'<%= SRC_PATH %>' + '**/*.css'
],
tasks: [
'ts',
'browserify'
]
}
}
});
grunt.registerTask('demo', [
'ts',
'browserify',
'watch'
]);
grunt.registerTask('default', function () {
console.log('!!! NOT ALLOWED !!!\n\nPlease run `grunt demo`.');
});
};