forked from IHTSDO/sct-browser-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
92 lines (87 loc) · 3.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
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
/**
* Created by quuyely on 26/12/19.
*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
clean: ["snomed-interaction-components/dist", "snomed-interaction-components/views/compiled"],
concat: {
js: {
src: [
'snomed-interaction-components/views/compiled/templates.js',
'snomed-interaction-components/js/conceptExpressions.js',
'snomed-interaction-components/js/conceptDetailsPlugin.js',
'snomed-interaction-components/js/countryIcons.js',
'snomed-interaction-components/js/drawConceptDiagram.js',
'snomed-interaction-components/js/popover.js',
'snomed-interaction-components/js/searchPlugin.js',
'snomed-interaction-components/js/svgdiagrammingv2.js',
'snomed-interaction-components/js/taxonomyPlugin.js',
'snomed-interaction-components/js/refsetPlugin.js',
'snomed-interaction-components/js/favoritesPlugin.js',
'snomed-interaction-components/js/queryPlugin.js',
'snomed-interaction-components/js/util.js'
],
dest: 'snomed-interaction-components/dist/js/<%= pkg.name %>.js'
},
css: {
src: 'snomed-interaction-components/css/*.css',
dest: 'snomed-interaction-components/dist/css/<%= pkg.name %>.css'
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
build: {
src: 'snomed-interaction-components/dist/js/<%= pkg.name %>.js',
dest: 'snomed-interaction-components/dist/js/<%= pkg.name %>.min.js'
}
},
cssmin: {
css: {
src: 'snomed-interaction-components/dist/css/<%= pkg.name %>.css',
dest: 'snomed-interaction-components/dist/css/<%= pkg.name %>.min.css'
}
},
handlebars: {
compile: {
options: {
namespace: "JST"
},
files: {
"snomed-interaction-components/views/compiled/templates.js": "snomed-interaction-components/views/**/*.hbs"
}
}
},
jshint: {
all: ['js/**/*.js'],
options: {
reporter: require('jshint-stylish'),
reporterOutput: 'dist/jshint-output.txt'
}
},
copy: {
dev: {
files: [{
src: 'snomed-interaction-components/dist/js/<%= pkg.name %>.min.js',
dest: 'internal-libs/<%= pkg.name %>.min.js',
},
{
src: 'snomed-interaction-components/dist/css/<%= pkg.name %>.min.css',
dest: 'css//<%= pkg.name %>.min.css',
}]
}
}
});
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-handlebars');
grunt.loadNpmTasks('grunt-contrib-jshint');
// Default task(s).
grunt.registerTask('default', ['clean', 'handlebars', 'concat','uglify', 'cssmin', 'copy']);
};