forked from graphql-editor/graphql-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
32 lines (32 loc) · 914 Bytes
/
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
module.exports = function(grunt) {
grunt.initConfig({
ts: {
default: {
tsconfig: './tsconfig.json'
},
test: {
tsconfig: './test/tsconfig.json'
}
},
copy: {
default: {
files: [{ expand: true, cwd: 'src/', src: ['**/*.png'], dest: 'lib/' }]
},
test: {
files: [{ expand: true, cwd: 'src/', src: ['**/*.png'], dest: 'test/lib/graphql-editor/src/' }]
}
},
watch: {
files: ['src/**/*.tsx'],
tasks: ['default']
}
});
grunt.event.on('watch', function(action, filepath, target) {
grunt.log.writeln(target + ': ' + filepath + ' has ' + action);
});
grunt.loadNpmTasks('grunt-ts');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('test', ['ts:test', 'copy:test']);
grunt.registerTask('default', ['ts:default', 'copy:default']);
};