-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
51 lines (50 loc) · 1.33 KB
/
gulpfile.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
/* 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", {
"test-headless": {
src: "./dist/fl-form-fields-tests.js",
},
"sass": {
watch: path.join(src, "scss/**/*.scss"),
src: path.join(src, "scss/index.scss"),
rename: "fl-form-fields.css",
dest,
},
"transpile-react": {
"main": {
watch: path.join(src, "js/**/*.js"),
src: path.join(src, "js/index.js"),
dest,
rename: "fl-form-fields.js",
config: {
external: ["react", "react-dom"],
format: "umd",
moduleName: "flFormFields",
},
},
"tests": {
watch: [path.join(src, "/**/*.js"), "tests/**/*.js"],
src: "tests/index.js",
dest,
rename: "fl-form-fields-tests.js",
config: {
// external: ["react", "react-dom"],
format: "umd",
},
},
},
"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: "examples/bare-fields/index.html",
baseDir: "./",
},
"watch": {
src: ".",
taskNames: ["transpile-react:tests", "transpile-react:main", "sass"],
},
});