sp-js-provisioning 1.0.4 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.husky/commit-msg +4 -0
- package/README.md +11 -31
- package/lib/handlers/clientsidepages.d.ts +13 -13
- package/lib/handlers/clientsidepages.js +77 -60
- package/lib/handlers/clientsidepages.js.map +1 -0
- package/lib/handlers/composedlook.d.ts +6 -6
- package/lib/handlers/composedlook.js +24 -17
- package/lib/handlers/composedlook.js.map +1 -0
- package/lib/handlers/contenttypes.d.ts +20 -20
- package/lib/handlers/contenttypes.js +77 -59
- package/lib/handlers/contenttypes.js.map +1 -0
- package/lib/handlers/customactions.d.ts +7 -7
- package/lib/handlers/customactions.js +24 -17
- package/lib/handlers/customactions.js.map +1 -0
- package/lib/handlers/exports.d.ts +3 -3
- package/lib/handlers/exports.js +15 -11
- package/lib/handlers/exports.js.map +1 -0
- package/lib/handlers/features.d.ts +7 -7
- package/lib/handlers/features.js +24 -22
- package/lib/handlers/features.js.map +1 -0
- package/lib/handlers/files.d.ts +44 -44
- package/lib/handlers/files.js +229 -159
- package/lib/handlers/files.js.map +1 -0
- package/lib/handlers/handlerbase.d.ts +21 -11
- package/lib/handlers/handlerbase.js +51 -16
- package/lib/handlers/handlerbase.js.map +1 -0
- package/lib/handlers/hooks.d.ts +22 -0
- package/lib/handlers/hooks.js +230 -0
- package/lib/handlers/hooks.js.map +1 -0
- package/lib/handlers/lists.d.ts +45 -45
- package/lib/handlers/lists.js +184 -150
- package/lib/handlers/lists.js.map +1 -0
- package/lib/handlers/navigation.d.ts +10 -10
- package/lib/handlers/navigation.js +40 -31
- package/lib/handlers/navigation.js.map +1 -0
- package/lib/handlers/propertybagentries.d.ts +7 -7
- package/lib/handlers/propertybagentries.js +30 -25
- package/lib/handlers/propertybagentries.js.map +1 -0
- package/lib/handlers/sitefields.d.ts +11 -11
- package/lib/handlers/sitefields.js +40 -29
- package/lib/handlers/sitefields.js.map +1 -0
- package/lib/handlers/websettings.d.ts +7 -7
- package/lib/handlers/websettings.js +36 -33
- package/lib/handlers/websettings.js.map +1 -0
- package/lib/index.d.ts +3 -3
- package/lib/index.js +3 -2
- package/lib/index.js.map +1 -0
- package/lib/provisioningconfig.d.ts +2 -2
- package/lib/provisioningconfig.js +2 -0
- package/lib/provisioningconfig.js.map +1 -0
- package/lib/provisioningcontext.d.ts +1 -5
- package/lib/provisioningcontext.js +2 -4
- package/lib/provisioningcontext.js.map +1 -0
- package/lib/schema.d.ts +18 -4
- package/lib/schema.js +2 -0
- package/lib/schema.js.map +1 -0
- package/lib/util/index.d.ts +3 -6
- package/lib/util/index.js +20 -29
- package/lib/util/index.js.map +1 -0
- package/lib/util/tokenhelper.d.ts +3 -3
- package/lib/util/tokenhelper.js +30 -29
- package/lib/util/tokenhelper.js.map +1 -0
- package/lib/webprovisioner.d.ts +16 -16
- package/lib/webprovisioner.js +42 -29
- package/lib/webprovisioner.js.map +1 -0
- package/package.json +118 -36
- package/sample-schemas/all-simple.ts +85 -76
- package/AUTHORS +0 -3
- package/LICENSE +0 -25
- package/debug/debug.ts +0 -68
- package/debug/example.ts +0 -42
- package/gulptasks/@configuration.js +0 -58
- package/gulptasks/build.js +0 -84
- package/gulptasks/clean.js +0 -23
- package/gulptasks/docs.js +0 -11
- package/gulptasks/index.js +0 -8
- package/gulptasks/lint.js +0 -18
- package/gulptasks/package.js +0 -44
- package/gulptasks/publish.js +0 -232
- package/gulptasks/test.js +0 -40
- package/gulptasks/watch.js +0 -15
- package/jsdoc.json +0 -26
- package/pnpm-lock.yaml +0 -6582
- package/shrinkwrap.yaml +0 -6513
- package/webpack.config.js +0 -58
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
// defines the configuration used by the gulp tasks
|
|
2
|
-
|
|
3
|
-
function getBanner() {
|
|
4
|
-
|
|
5
|
-
let pkg = require("../package.json");
|
|
6
|
-
|
|
7
|
-
return [
|
|
8
|
-
"/**",
|
|
9
|
-
` * ${pkg.name} v${pkg.version} - ${pkg.description}`,
|
|
10
|
-
` * ${pkg.license} (https://github.com/SharePoint/PnP-JS-Provisioning/blob/master/LICENSE)`,
|
|
11
|
-
" * Copyright (c) 2016 Microsoft",
|
|
12
|
-
" * docs: http://officedev.github.io/PnP-JS-Core",
|
|
13
|
-
` * source: ${pkg.homepage}`,
|
|
14
|
-
` * bugs: ${pkg.bugs.url}`,
|
|
15
|
-
].join("\n");
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function getSettings() {
|
|
19
|
-
|
|
20
|
-
try {
|
|
21
|
-
return require("../settings.js");
|
|
22
|
-
} catch(e) {
|
|
23
|
-
return require("../settings.example.js");
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// simplified exports of the config
|
|
28
|
-
module.exports = {
|
|
29
|
-
paths: {
|
|
30
|
-
dist: "./dist",
|
|
31
|
-
lib: "./lib",
|
|
32
|
-
source: "./src",
|
|
33
|
-
sourceGlob: "./src/**/*.ts",
|
|
34
|
-
},
|
|
35
|
-
testing: {
|
|
36
|
-
testsSource: "./tests",
|
|
37
|
-
testsSourceGlob: "./tests/**/*.ts",
|
|
38
|
-
testingRoot: "./testing",
|
|
39
|
-
testingTestsDest: "./testing/tests",
|
|
40
|
-
testingTestsDestGlob: "./testing/tests/**/*.js",
|
|
41
|
-
testingSrcDest: "./testing/src",
|
|
42
|
-
testingSrcDestGlob: "./testing/src/**/*.js"
|
|
43
|
-
},
|
|
44
|
-
debug: {
|
|
45
|
-
debugSourceGlob: "./debug/**/*.ts",
|
|
46
|
-
outputRoot: "./debugging",
|
|
47
|
-
outputSrc: "./debugging/src",
|
|
48
|
-
outputDebug: "./debugging/debug",
|
|
49
|
-
schemasSourceGlob: "./sample-schemas/**/*.ts",
|
|
50
|
-
schemasOutput: "./debugging/sample-schemas"
|
|
51
|
-
},
|
|
52
|
-
docs: {
|
|
53
|
-
include: "./lib/**/*.js",
|
|
54
|
-
output: "./docs"
|
|
55
|
-
},
|
|
56
|
-
header: getBanner(),
|
|
57
|
-
settings: getSettings()
|
|
58
|
-
}
|
package/gulptasks/build.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
//******************************************************************************
|
|
2
|
-
//* build.js
|
|
3
|
-
//*
|
|
4
|
-
//* Defines a custom gulp task for compiling TypeScript source code into
|
|
5
|
-
//* js files. It outputs the details as to what it generated to the console.
|
|
6
|
-
//******************************************************************************
|
|
7
|
-
|
|
8
|
-
var gulp = require("gulp"),
|
|
9
|
-
tsc = require("gulp-typescript"),
|
|
10
|
-
config = require('./@configuration.js'),
|
|
11
|
-
merge = require("merge2"),
|
|
12
|
-
sourcemaps = require('gulp-sourcemaps'),
|
|
13
|
-
pkg = require("../package.json");
|
|
14
|
-
|
|
15
|
-
gulp.task("build:lib", () => {
|
|
16
|
-
|
|
17
|
-
var project = tsc.createProject("tsconfig.json", { declaration: true });
|
|
18
|
-
|
|
19
|
-
var built = gulp.src(config.paths.sourceGlob)
|
|
20
|
-
.pipe(project());
|
|
21
|
-
|
|
22
|
-
return merge([
|
|
23
|
-
built.dts.pipe(gulp.dest(config.paths.lib)),
|
|
24
|
-
built.js.pipe(gulp.dest(config.paths.lib))
|
|
25
|
-
]);
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
gulp.task("build:testing", ["clean"], () => {
|
|
29
|
-
var projectSrc = tsc.createProject("tsconfig.json");
|
|
30
|
-
var projectTests = tsc.createProject("tsconfig.json");
|
|
31
|
-
|
|
32
|
-
return merge([
|
|
33
|
-
gulp.src(config.testing.testsSourceGlob)
|
|
34
|
-
.pipe(projectTests({
|
|
35
|
-
compilerOptions: {
|
|
36
|
-
types: [
|
|
37
|
-
"chai",
|
|
38
|
-
"chai-as-promised",
|
|
39
|
-
"node",
|
|
40
|
-
"mocha"
|
|
41
|
-
]
|
|
42
|
-
}
|
|
43
|
-
}))
|
|
44
|
-
.pipe(gulp.dest(config.testing.testingTestsDest)),
|
|
45
|
-
gulp.src(config.paths.sourceGlob)
|
|
46
|
-
.pipe(projectSrc())
|
|
47
|
-
.pipe(gulp.dest(config.testing.testingSrcDest))
|
|
48
|
-
]);
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
gulp.task("build:debug", ["clean"], () => {
|
|
52
|
-
|
|
53
|
-
var srcProject = tsc.createProject("tsconfig.json");
|
|
54
|
-
var debugProject = tsc.createProject("tsconfig.json");
|
|
55
|
-
var schemaProject = tsc.createProject("tsconfig.json");
|
|
56
|
-
|
|
57
|
-
let sourceMapSettings = {
|
|
58
|
-
includeContent: false,
|
|
59
|
-
sourceRoot: (file) => {
|
|
60
|
-
return "..\\.." + file.base.replace(file.cwd, "");
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
return merge([
|
|
65
|
-
gulp.src(config.paths.sourceGlob)
|
|
66
|
-
.pipe(sourcemaps.init())
|
|
67
|
-
.pipe(srcProject())
|
|
68
|
-
.pipe(sourcemaps.write(".", sourceMapSettings))
|
|
69
|
-
.pipe(gulp.dest(config.debug.outputSrc)),
|
|
70
|
-
gulp.src(config.debug.debugSourceGlob)
|
|
71
|
-
.pipe(sourcemaps.init())
|
|
72
|
-
.pipe(debugProject())
|
|
73
|
-
.pipe(sourcemaps.write(".", sourceMapSettings))
|
|
74
|
-
.pipe(gulp.dest(config.debug.outputDebug)),
|
|
75
|
-
gulp.src(config.debug.schemasSourceGlob)
|
|
76
|
-
.pipe(sourcemaps.init())
|
|
77
|
-
.pipe(schemaProject())
|
|
78
|
-
.pipe(sourcemaps.write(".", sourceMapSettings))
|
|
79
|
-
.pipe(gulp.dest(config.debug.schemasOutput))
|
|
80
|
-
]);
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
// run the build chain for lib
|
|
84
|
-
gulp.task("build", ["clean", "lint", "build:lib"]);
|
package/gulptasks/clean.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
//******************************************************************************
|
|
2
|
-
//* clean.js
|
|
3
|
-
//*
|
|
4
|
-
//* Defines a custom gulp task for removing all output files that were
|
|
5
|
-
//* autogenerated by other custom gulp tasks
|
|
6
|
-
//******************************************************************************
|
|
7
|
-
|
|
8
|
-
var gulp = require("gulp"),
|
|
9
|
-
del = require('del'),
|
|
10
|
-
config = require('./@configuration.js');
|
|
11
|
-
|
|
12
|
-
gulp.task('clean', (done) => {
|
|
13
|
-
|
|
14
|
-
var directories = [
|
|
15
|
-
config.paths.dist,
|
|
16
|
-
config.paths.lib,
|
|
17
|
-
config.testing.testingRoot,
|
|
18
|
-
config.debug.outputRoot,
|
|
19
|
-
config.docs.output
|
|
20
|
-
];
|
|
21
|
-
|
|
22
|
-
del(directories).then(() => done());
|
|
23
|
-
});
|
package/gulptasks/docs.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
var gulp = require("gulp"),
|
|
2
|
-
jsdoc = require('gulp-jsdoc3'),
|
|
3
|
-
del = require('del'),
|
|
4
|
-
jsdocConfig = require('../jsdoc.json'),
|
|
5
|
-
config = require('./@configuration.js');
|
|
6
|
-
|
|
7
|
-
gulp.task("docs", ["clean", "build:lib"], (done) => {
|
|
8
|
-
|
|
9
|
-
gulp.src(['./README.md', config.docs.include], { read: false })
|
|
10
|
-
.pipe(jsdoc(jsdocConfig, done));
|
|
11
|
-
});
|
package/gulptasks/index.js
DELETED
package/gulptasks/lint.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
//******************************************************************************
|
|
2
|
-
//* lint.js
|
|
3
|
-
//*
|
|
4
|
-
//* Defines a custom gulp task for ensuring that all source code in
|
|
5
|
-
//* this repository follows recommended TypeScript practices.
|
|
6
|
-
//*
|
|
7
|
-
//* Rule violations are output automatically to the console.
|
|
8
|
-
//******************************************************************************
|
|
9
|
-
|
|
10
|
-
var gulp = require("gulp"),
|
|
11
|
-
tslint = require("gulp-tslint"),
|
|
12
|
-
config = require('./@configuration.js');
|
|
13
|
-
|
|
14
|
-
gulp.task("lint", function () {
|
|
15
|
-
return gulp.src(config.paths.sourceGlob)
|
|
16
|
-
.pipe(tslint({ formatter: "prose" }))
|
|
17
|
-
.pipe(tslint.report({ emitError: false }));
|
|
18
|
-
});
|
package/gulptasks/package.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
//******************************************************************************
|
|
2
|
-
//* package.js
|
|
3
|
-
//*
|
|
4
|
-
//* Defines a custom gulp task for creaing pnp.js, pnp.min.js,
|
|
5
|
-
//* and pnp.min.js.map in the dist folder
|
|
6
|
-
//******************************************************************************
|
|
7
|
-
var gulp = require("gulp"),
|
|
8
|
-
tsc = require("gulp-typescript"),
|
|
9
|
-
webpack = require('webpack'),
|
|
10
|
-
webpackConfig = require('../webpack.config.js'),
|
|
11
|
-
config = require('./@configuration.js'),
|
|
12
|
-
gutil = require('gulp-util');
|
|
13
|
-
|
|
14
|
-
// package the definitions
|
|
15
|
-
gulp.task("package:defs", () => {
|
|
16
|
-
|
|
17
|
-
var typingsProject = tsc.createProject('tsconfig.json', { "declaration": true, "outFile": "pnp.js", "removeComments": false, "module": "system" });
|
|
18
|
-
|
|
19
|
-
gulp.src(config.paths.sourceGlob).pipe(typingsProject()).dts.pipe(gulp.dest(config.paths.dist));
|
|
20
|
-
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
// package the code files using webpack
|
|
24
|
-
gulp.task("package:code", ["build:lib"], (done) => {
|
|
25
|
-
|
|
26
|
-
webpack(webpackConfig, (err, stats) => {
|
|
27
|
-
|
|
28
|
-
if (err) {
|
|
29
|
-
throw new gutil.PluginError("package:code", err);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
console.log(stats.toString({
|
|
33
|
-
colors: true
|
|
34
|
-
}));
|
|
35
|
-
|
|
36
|
-
done();
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
// used by the sync task to rebuild code
|
|
41
|
-
gulp.task("package:sync", ["package:code"]);
|
|
42
|
-
|
|
43
|
-
// run the package chain
|
|
44
|
-
gulp.task("package", ["clean", "lint", "package:code", "package:defs"]);
|
package/gulptasks/publish.js
DELETED
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
//******************************************************************************
|
|
2
|
-
//* publish.js
|
|
3
|
-
//*
|
|
4
|
-
//* Defines a custom gulp task for publishing this repository to npm in
|
|
5
|
-
//* both main and beta versions for different branches
|
|
6
|
-
//*
|
|
7
|
-
//******************************************************************************
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
gulp = require("gulp"),
|
|
11
|
-
tslint = require("gulp-tslint"),
|
|
12
|
-
config = require('./@configuration.js'),
|
|
13
|
-
semver = require('semver'),
|
|
14
|
-
fs = require('fs'),
|
|
15
|
-
package = require("../package.json"),
|
|
16
|
-
execSync = require('child_process').execSync,
|
|
17
|
-
readline = require('readline');
|
|
18
|
-
|
|
19
|
-
const log = (value) => { console.log(value); return value };
|
|
20
|
-
const exec = (command) => execSync(log(command), { encoding: 'utf8' });
|
|
21
|
-
|
|
22
|
-
function publishSetup() {
|
|
23
|
-
|
|
24
|
-
log(`Starting automated npm publish of ${package.name}...`);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function publishBetaSetup() {
|
|
28
|
-
|
|
29
|
-
log(`Starting automated npm publish of BETA for ${package.name}...`);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function mergeDevToMaster() {
|
|
33
|
-
|
|
34
|
-
log('## Merge dev -> master');
|
|
35
|
-
exec('git checkout dev');
|
|
36
|
-
exec('git pull');
|
|
37
|
-
exec('git checkout master');
|
|
38
|
-
exec('git pull');
|
|
39
|
-
exec('git merge dev');
|
|
40
|
-
log(exec('npm install'));
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function incrementPackage() {
|
|
44
|
-
|
|
45
|
-
log('## Incrementing the package version');
|
|
46
|
-
const npmVersion = semver.clean(exec(`npm show ${package.name} version`));
|
|
47
|
-
const newVersion = exec('npm version patch');
|
|
48
|
-
|
|
49
|
-
log(`Current version in package.json: ${package.version}`);
|
|
50
|
-
log(`Latest version on npm: ${npmVersion}`);
|
|
51
|
-
log(`New version after patch: ${newVersion}`);
|
|
52
|
-
|
|
53
|
-
if (!semver.gt(newVersion, npmVersion)) {
|
|
54
|
-
log('Aborting publish, local version is not new.');
|
|
55
|
-
process.exit(0);
|
|
56
|
-
}
|
|
57
|
-
log('## Incremented the package version');
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function updateDistFiles() {
|
|
61
|
-
|
|
62
|
-
log('## Updating dist files');
|
|
63
|
-
exec('git checkout master');
|
|
64
|
-
log('Updating .gitignore to allow dist/ upload');
|
|
65
|
-
var data = fs.readFileSync('./.gitignore', 'utf-8');
|
|
66
|
-
var newValue = data.replace(/^dist\/$/gim, '#dist/');
|
|
67
|
-
fs.writeFileSync('.gitignore', newValue, 'utf-8');
|
|
68
|
-
log('Updated .gitignore to allow dist/ upload');
|
|
69
|
-
log(exec('git status'));
|
|
70
|
-
exec('gulp package');
|
|
71
|
-
log('## Updated dist files');
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function commitDistFiles() {
|
|
75
|
-
|
|
76
|
-
log('## Committing Dist Files');
|
|
77
|
-
exec('git add dist/');
|
|
78
|
-
exec('git commit -m "update to dist during master merge"');
|
|
79
|
-
exec('git checkout .gitignore');
|
|
80
|
-
exec('git push');
|
|
81
|
-
log('## Committed Dist Files');
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function publishToNPMGate() {
|
|
85
|
-
|
|
86
|
-
log('##');
|
|
87
|
-
log('## -->> The next step will publish the package to NPM!!! <<--');
|
|
88
|
-
log('##');
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function publishToNPM() {
|
|
92
|
-
log('## Publishing to NPM');
|
|
93
|
-
log(exec('npm publish'));
|
|
94
|
-
log('## Published to NPM');
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
function mergeMasterToDev() {
|
|
98
|
-
|
|
99
|
-
log('## Merging master -> dev');
|
|
100
|
-
exec('git checkout master');
|
|
101
|
-
exec('git pull');
|
|
102
|
-
exec('git checkout dev');
|
|
103
|
-
exec('git pull');
|
|
104
|
-
exec('git merge master');
|
|
105
|
-
exec('rmdir /S /Q dist');
|
|
106
|
-
exec('git add .');
|
|
107
|
-
exec('git commit -m "clean-up dist for dev branch"');
|
|
108
|
-
exec('git push');
|
|
109
|
-
log('## Merged master -> dev');
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
function updateDevForBeta() {
|
|
113
|
-
|
|
114
|
-
log('## Updating dev branch for beta release.');
|
|
115
|
-
|
|
116
|
-
exec('git checkout dev');
|
|
117
|
-
exec('git pull');
|
|
118
|
-
exec('npm install');
|
|
119
|
-
|
|
120
|
-
const npmVersion = semver.clean(exec(`npm show ${package.name} version`));
|
|
121
|
-
const newVersion = semver.inc(package.version, 'prerelease', 'beta');
|
|
122
|
-
|
|
123
|
-
log(`Current version in package.json: ${package.version}`);
|
|
124
|
-
log(`Latest version on npm: ${npmVersion}`);
|
|
125
|
-
log(`New version after patch: ${newVersion}`);
|
|
126
|
-
|
|
127
|
-
exec(`npm version ${newVersion}`);
|
|
128
|
-
|
|
129
|
-
if (!semver.gt(newVersion, npmVersion)) {
|
|
130
|
-
log('Aborting publish, local version is not new.');
|
|
131
|
-
process.exit(0);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
log('## Updated dev branch for beta release.');
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
function betaPushVersionUpdate() {
|
|
138
|
-
|
|
139
|
-
log('## Pushing dev branch for beta release.');
|
|
140
|
-
exec('git push');
|
|
141
|
-
log('## Pushed dev branch for beta release.');
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
function betaPackage() {
|
|
145
|
-
|
|
146
|
-
log('## Packaging files for BETA release');
|
|
147
|
-
exec('git checkout dev');
|
|
148
|
-
exec('gulp package');
|
|
149
|
-
log('## Packaged files for BETA release');
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
function betaPublishToNPM() {
|
|
153
|
-
|
|
154
|
-
log('## Publishing to NPM');
|
|
155
|
-
log(exec('npm publish --tag beta'));
|
|
156
|
-
log('## Published to NPM');
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
function engine(tasks, rl) {
|
|
160
|
-
|
|
161
|
-
let task = tasks.shift();
|
|
162
|
-
|
|
163
|
-
task();
|
|
164
|
-
|
|
165
|
-
if (tasks.length > 1) {
|
|
166
|
-
|
|
167
|
-
rl.question('Do you want to continue? (/^y(es)?$/i): ', (answer) => {
|
|
168
|
-
if (answer.match(/^y(es)?$/i)) {
|
|
169
|
-
rl.pause();
|
|
170
|
-
engine(tasks, rl);
|
|
171
|
-
} else {
|
|
172
|
-
|
|
173
|
-
// run the final cleanup and shutdown task.
|
|
174
|
-
tasks.pop()();
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
} else if (tasks.length === 1) {
|
|
178
|
-
|
|
179
|
-
// run the final cleanup and shutdown task.
|
|
180
|
-
tasks.pop()();
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
gulp.task("publish", (done) => {
|
|
185
|
-
|
|
186
|
-
const rl = readline.createInterface({
|
|
187
|
-
input: process.stdin,
|
|
188
|
-
output: process.stdout
|
|
189
|
-
});
|
|
190
|
-
|
|
191
|
-
const publishTasks = [
|
|
192
|
-
publishSetup,
|
|
193
|
-
mergeDevToMaster,
|
|
194
|
-
incrementPackage,
|
|
195
|
-
updateDistFiles,
|
|
196
|
-
commitDistFiles,
|
|
197
|
-
publishToNPMGate,
|
|
198
|
-
publishToNPM,
|
|
199
|
-
mergeMasterToDev,
|
|
200
|
-
function () {
|
|
201
|
-
log('Publishing complete');
|
|
202
|
-
rl.close();
|
|
203
|
-
done();
|
|
204
|
-
},
|
|
205
|
-
];
|
|
206
|
-
|
|
207
|
-
engine(publishTasks, rl);
|
|
208
|
-
});
|
|
209
|
-
|
|
210
|
-
gulp.task("publish-beta", (done) => {
|
|
211
|
-
|
|
212
|
-
const rl = readline.createInterface({
|
|
213
|
-
input: process.stdin,
|
|
214
|
-
output: process.stdout
|
|
215
|
-
});
|
|
216
|
-
|
|
217
|
-
const publishBetaTasks = [
|
|
218
|
-
publishBetaSetup,
|
|
219
|
-
updateDevForBeta,
|
|
220
|
-
betaPushVersionUpdate,
|
|
221
|
-
betaPackage,
|
|
222
|
-
publishToNPMGate,
|
|
223
|
-
betaPublishToNPM,
|
|
224
|
-
function () {
|
|
225
|
-
log('BETA Publishing complete');
|
|
226
|
-
rl.close();
|
|
227
|
-
done();
|
|
228
|
-
},
|
|
229
|
-
];
|
|
230
|
-
|
|
231
|
-
engine(publishBetaTasks, rl);
|
|
232
|
-
});
|
package/gulptasks/test.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
//******************************************************************************
|
|
2
|
-
//* test.js
|
|
3
|
-
//*
|
|
4
|
-
//* Defines a custom gulp task for executing the unit tests (with mocha) and
|
|
5
|
-
//* also reporting on code coverage (with istanbul).
|
|
6
|
-
//******************************************************************************
|
|
7
|
-
|
|
8
|
-
var gulp = require("gulp"),
|
|
9
|
-
mocha = require("gulp-mocha"),
|
|
10
|
-
istanbul = require("gulp-istanbul"),
|
|
11
|
-
tsc = require("gulp-typescript"),
|
|
12
|
-
yargs = require('yargs').argv,
|
|
13
|
-
config = require('./@configuration.js'),
|
|
14
|
-
istanbul = require("gulp-istanbul");
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
gulp.task("_istanbul:hook", ["build:testing"], () => {
|
|
18
|
-
|
|
19
|
-
return gulp.src(config.testing.testingSrcDestGlob)
|
|
20
|
-
.pipe(istanbul())
|
|
21
|
-
.pipe(istanbul.hookRequire());
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
gulp.task("test", ["_istanbul:hook"], () => {
|
|
25
|
-
|
|
26
|
-
// when using single, grab only that test.js file - otherwise use the entire test.js glob
|
|
27
|
-
let path = yargs.single ? './testing/tests/{path}.test.js'.replace('{path}', yargs.single) : config.testing.testingTestsDestGlob;
|
|
28
|
-
|
|
29
|
-
// determine if we show the full coverage table
|
|
30
|
-
let reports = yargs["coverage-details"] ? ['text', 'text-summary'] : ['text-summary'];
|
|
31
|
-
|
|
32
|
-
// easiest way for tests to have settings available
|
|
33
|
-
global.settings = config.settings;
|
|
34
|
-
|
|
35
|
-
return gulp.src(path)
|
|
36
|
-
.pipe(mocha({ ui: 'bdd', reporter: 'dot', timeout: 10000 }))
|
|
37
|
-
.pipe(istanbul.writeReports({
|
|
38
|
-
reporters: reports
|
|
39
|
-
}));
|
|
40
|
-
});
|
package/gulptasks/watch.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
//******************************************************************************
|
|
2
|
-
//* watch.js
|
|
3
|
-
//*
|
|
4
|
-
//******************************************************************************
|
|
5
|
-
|
|
6
|
-
var gulp = require("gulp"),
|
|
7
|
-
gulpWatch = require("gulp-watch"),
|
|
8
|
-
runSequence = require("run-sequence"),
|
|
9
|
-
config = require('./@configuration.js');
|
|
10
|
-
|
|
11
|
-
gulp.task("watch", () => {
|
|
12
|
-
gulpWatch(config.paths.sourceGlob).on("change", () => {
|
|
13
|
-
runSequence("build");
|
|
14
|
-
});
|
|
15
|
-
});
|
package/jsdoc.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"tags": {
|
|
3
|
-
"allowUnknownTags": true,
|
|
4
|
-
"dictionaries": [
|
|
5
|
-
"jsdoc",
|
|
6
|
-
"closure"
|
|
7
|
-
]
|
|
8
|
-
},
|
|
9
|
-
"source": {
|
|
10
|
-
"include": [
|
|
11
|
-
"./lib"
|
|
12
|
-
],
|
|
13
|
-
"includePattern": "\\.js$"
|
|
14
|
-
},
|
|
15
|
-
"plugins": [],
|
|
16
|
-
"templates": {
|
|
17
|
-
"cleverLinks": false,
|
|
18
|
-
"monospaceLinks": false
|
|
19
|
-
},
|
|
20
|
-
"opts": {
|
|
21
|
-
"template": "templates/default",
|
|
22
|
-
"encoding": "utf8",
|
|
23
|
-
"destination": "./docs/",
|
|
24
|
-
"recurse": true
|
|
25
|
-
}
|
|
26
|
-
}
|