-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
77 lines (75 loc) · 1.95 KB
/
gulpfile.js
File metadata and controls
77 lines (75 loc) · 1.95 KB
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
/* eslint-disable quote-props */
// List all available tasks
const src = "src";
const dest = "dist";
const path = require("path");
const organiser = require("gulp-organiser");
organiser.registerAll("./gulp-tasks", {
"watch": {
src: ".",
taskNames: ["sass"],
},
"sass": {
src: path.join(src, "styles/**/*.scss"),
dest: path.join(dest, "styles"),
},
"copy-static": {
src,
dest,
map: {
[path.join(src, "js_static/**/*")]: "public/js",
},
},
"transpile-react": {
watch: path.join(src, "js", "/**/*.js"),
src: path.join(src, "js", "main.js"),
dest: "./public/js",
config: {
external: ["react", "react-dom"],
exports: "named",
format: "cjs",
},
},
"link-dependencies": {
dest: "./public/js",
},
"browser-sync": {
src: ".", // it doesn't matter, it's just so the task object is not ignored.
reloadOn: ["transpile-react"], // reload page when these tasks happen
startPath: "example",
baseDir: "./",
},
"test-browser": {
src: "./tests/unit/unit.js",
},
"jasmine-test-phantom": {
src: "./tests/unit/unit.js",
},
"build-elm": {
src: "src/Main.elm",
dest: "dist",
moduleName: "ModalRouter",
ext: "js",
},
"build": {
src: "./",
tasks: ["link-dependencies", "modify-timekit-booking", "transpile-to-es5", "concat"],
},
"karma-test": {
src: [
// Libraries
"http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js",
"./dist/fl-booking.js",
// Mockups
"./examples/fake-events-creator.js",
// Test files
"./tests/*-spec.js",
],
// Whether to close the browser after the tests or not.
singleRun: false,
},
"run-cmd": {
src: ".",
cmd: "flow",
},
});