forked from IgniteUI/igniteui-angular-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
37 lines (31 loc) · 1.12 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
const gulp = require("gulp");
const tsNode = require('ts-node').register({
fast: true,
ignore: [/\/node_modules\/(?!igniteui-angular)/],
compilerOptions: {
allowJs: true
}
});
// Workaround for exception with Excel samples running product code during generate-live-editing task.
navigator = { language: "en-US" };
function requireFile(path) {
delete require.cache[require.resolve(path)];
return require(path);
}
gulp.task("generate-live-editing", () => {
requireFile("./live-editing/LiveEditingManager.ts");
});
gulp.task("watch-live-editing", ["generate-live-editing"], () => {
gulp.watch(["./src/**/*.*", "!./src/assets/**", "./live-editing/**/*.*", "package.json"], function () {
Object.keys(require.cache).forEach(function (key) {
if (key.indexOf("node_modules") === -1) {
delete require.cache[key];
}
});
gulp.start("generate-live-editing");
});
});
gulp.task("sass-js-compile-check", async() => {
var checker = requireFile("./live-editing/services/SassJsCompileChecker.ts");
await checker.sassJsCompileChecker.run();
});