forked from smart-on-fhir/client-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
31 lines (28 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
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.initConfig({
shell: {
browserify: {
command: "./node_modules/.bin/browserify -e src/adapters/jquery.js -i 'jsdom' -g varify > dist/fhir-client-jquery.js; ./node_modules/.bin/browserify -e src/adapters/angularjs.js -i 'jsdom' -g varify > dist/fhir-client-angularjs.js; ./node_modules/.bin/browserify -e src/adapters/bundle.js -i 'jsdom' -g varify > dist/fhir-client.js",
options: {
failOnError: true,
stderr: true
}
}
},
uglify: {
minifiedLib: {
files: {
'dist/fhir-client-jquery.min.js': ['dist/fhir-client-jquery.js'],
'dist/fhir-client-angularjs.min.js': ['dist/fhir-client-angularjs.js'],
'dist/fhir-client.min.js': ['dist/fhir-client.js']
}
}
}
});
grunt.registerTask('browserify', 'Browserify to create window.FHIR', ['shell:browserify']);
grunt.registerTask('default', ['browserify', 'uglify:minifiedLib']);
};