forked from unfoldingWord-dev/ts-desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
97 lines (79 loc) · 2.33 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/**
* translationStudio Gruntfile
*
* Copyright 2015
*/
module.exports = function (grunt) {
'use strict';
// load all grunt tasks
require('time-grunt')(grunt);
require('load-grunt-tasks')(grunt);
// configurable paths
var config = {
app: 'app',
dist: 'dist'
};
grunt.initConfig({
config: config,
nodewebkit: {
options: {
platforms: ['win', 'osx'],
buildDir: '<%= config.dist %>' // Where the build version of my node-webkit app is saved
},
src: ['<%= config.app %>/**/*', '!<%= config.app %>/**/*.{scss,sass}'] // Your node-webkit app
},
mochaTest: {
test: {
options: {
reporter: 'spec',
captureFile: 'unit_tests/report.txt', // Optionally capture the reporter output to a file
quiet: false, // Optionally suppress output to standard out (defaults to false)
clearRequireCache: false // Optionally clear the require cache before running tests (defaults to false)
},
src: ['unit_tests/**/*.js']
}
},
watch: {
sass: {
files: [
'<%= config.app %>/css/{,*/}*.{scss,sass}',
'<%= config.app %>/elements/{,*/}*.{scss,sass}'
],
tasks: ['sass']
}
},
jshint: {
options: {
jshintrc: '.jshintrc'
},
files: '<%= config.app %>/js/*.js'
},
sass: {
options: {
sourceMap: true
},
dist: {
files: [{
expand: true,
cwd: '<%= config.app %>',
src: ['css/{,*/}*.{scss,sass}', 'elements/{,*/}*.{scss,sass}'],
dest: '<%= config.app %>',
ext: '.css'
}]
}
}
});
grunt.registerTask('check', [
'jshint'
]);
grunt.registerTask('test', [
'mochaTest'
]);
grunt.registerTask('dist', [
'check',
'sass',
'nodewebkit'
]);
grunt.registerTask('default', ['dist']);
grunt.loadNpmTasks('grunt-mocha-runner');
};