This repository was archived by the owner on Jun 10, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGruntfile.js
executable file
·74 lines (70 loc) · 2.13 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
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
concat: {
wrap: {
options: {
separator: ';\n',
banner: '(function(){\n',
footer: '\n})();'
},
src: [
// Configurations
"src/config/webvr-config.js",
"src/config/meta-config.js",
"src/config/css-config.js",
// Dependencies
"node_modules/es6-promise/dist/es6-promise.js",
"node_modules/three/build/three.min.js",
"node_modules/three/examples/js/renderers/CSS3DRenderer.js",
"node_modules/three/examples/js/controls/VRControls.js",
"node_modules/three/examples/js/effects/VREffect.js",
"node_modules/three/examples/js/loaders/ColladaLoader.js",
"node_modules/three/examples/js/loaders/OBJLoader.js",
"node_modules/three/examples/js/loaders/MTLLoader.js",
"node_modules/webvr-polyfill/build/webvr-polyfill.js",
"node_modules/webvr-boilerplate/build/webvr-manager.js",
"node_modules/jquery/dist/jquery.min.js",
"node_modules/bootstrap/dist/js/bootstrap.min.js",
// Source codes
"dist/tmp/webpack-out.js"
],
dest: 'dist/wirtual.js',
}
},
clean: {
tmp: ['./dist/tmp']
},
connect: {
options: {
port: 8000,
livereload: 35729,
hostname: 'localhost',
base: ['demo', 'dist']
},
livereload: {
options: {
open: true,
base: ['demo', 'dist']
}
}
},
watch: {
reload: {
options: {
livereload: '<%= connect.options.livereload %>'
},
files: [
'dist/**/*',
'demo/**/*'
]
}
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.registerTask('serve', function () { grunt.task.run(['connect:livereload', 'watch']); });
grunt.registerTask('attach-vendors', ['concat:wrap', 'clean:tmp']);
};