-
Notifications
You must be signed in to change notification settings - Fork 224
/
Gruntfile.js
39 lines (36 loc) · 1.15 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
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-curl');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.initConfig({
curl: {
conformance: {
dest: 'vendor/conformance.json',
src: 'http://hl7-fhir.github.io/conformance-base.json'
}
},
shell: {
browserify: {
command: "./node_modules/.bin/browserify -e client/entry.js -i './node_modules/jsdom/**' > dist/fhir-client.js",
options: {
failOnError: true,
stderr: true
}
}
},
uglify: {
minifiedLib: {
files: {
'dist/fhir-client.min.js': ['dist/fhir-client.js']
}
}
}
});
grunt.registerTask('browserify', 'Browserify to create window.FHIR', ['shell:browserify']);
grunt.registerTask('conformance', 'Download conformance base', ['curl:conformance']);
grunt.registerTask('default', ['browserify', 'uglify:minifiedLib']);
grunt.registerTask('all', ['conformance', 'default']);
};