forked from SharePoint/PnP-JS-Core
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
88 lines (74 loc) · 2.31 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
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
78
79
80
81
82
83
84
85
86
87
88
"use strict";
//******************************************************************************
//* DEPENDENCIES
//******************************************************************************
var tsc = require("gulp-typescript");
//******************************************************************************
//* GLOBAL VARIABLES
//******************************************************************************
global.TSTypings = {
"Main": 'typings/index.d.ts'
};
global.TSCompiledOutput = {
"RootFolder": 'build/src',
"TestRootFolder": 'build/tests',
"JSCodeFiles": [
'build/**/*.js',
'!build/**/*.test.js'
],
"JSTestFiles": [
'build/**/*.test.js',
],
};
global.TSWorkspace = {
"RootFolder": 'src',
"PnPFile": "src/pnp.ts",
"Files": [
'src/**/*.ts',
],
"Tests": [
'tests/**/*.ts',
]
};
global.TSDist = {
"RootFolder": 'dist',
"SrcFolder": "lib",
"BundleFileName": "pnp.js",
"MinifyFileName": "pnp.min.js",
"DefinitionFileName": "pnp.d.ts"
};
global.PnPLocalServer = {
"RootFolder": 'server-root',
"ScriptsRootFolder": 'scripts'
};
global.tsProject = tsc.createProject("tsconfig.json");
global.pkg = require("./package.json");
global.banner = [
"/**",
" * <%= pkg.name %> v<%= pkg.version %> - <%= pkg.description %>",
" * Copyright (c) 2016 Microsoft",
" * <%= pkg.license %>",
" */", ""
].join("\n");
// make gulpfile.js not error out if settings.js is not present
try {
global.settings = require("./settings.js");
} catch (e) {
global.settings = {username: "", password: "", siteUrl: "", folder: ""};
}
//******************************************************************************
//* INCLUDE BUILDTASK DEFINTIONS
//******************************************************************************
require("./buildtasks/build.js");
require("./buildtasks/build-serve-dist.js");
require("./buildtasks/build-typings.js");
require("./buildtasks/clean.js");
require("./buildtasks/copyJsToSharePoint.js");
require("./buildtasks/copyRequireJsToSharePoint.js");
require("./buildtasks/default.js");
require("./buildtasks/istanbul-hook.js");
require("./buildtasks/lint.js");
require("./buildtasks/package.js");
require("./buildtasks/serve.js");
require("./buildtasks/sync.js");
require("./buildtasks/test.js");