Skip to content

Commit 8d8a275

Browse files
committed
upgraded to v1.16.1
1 parent 67f2830 commit 8d8a275

File tree

10 files changed

+57360
-13745
lines changed

10 files changed

+57360
-13745
lines changed
Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,32 @@
11
{
2-
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json",
3-
"solution": {
4-
"name": "Module10Demo",
5-
"id": "bb9b8a24-155c-4ad1-bd0b-a85752ccda0f",
6-
"version": "1.0.0.7",
7-
"includeClientSideAssets": true,
8-
"skipFeatureDeployment": false,
9-
"isDomainIsolated": false
10-
},
11-
"paths": {
12-
"zippedPackage": "solution/module-10-demo.sppkg"
13-
}
14-
}
2+
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json",
3+
"solution": {
4+
"name": "Module10Demo",
5+
"id": "bb9b8a24-155c-4ad1-bd0b-a85752ccda0f",
6+
"version": "1.0.0.9",
7+
"includeClientSideAssets": true,
8+
"skipFeatureDeployment": false,
9+
"isDomainIsolated": false
10+
},
11+
"developer": {
12+
"name": "",
13+
"websiteUrl": "",
14+
"privacyUrl": "",
15+
"termsOfUseUrl": "",
16+
"mpnId": "Module10Demo"
17+
},
18+
"metadata": {
19+
"shortDescription": {
20+
"default": "Module10Demo description"
21+
},
22+
"longDescription": {
23+
"default": "Module10Demo description"
24+
},
25+
"screenshotPaths": [],
26+
"videoUrl": "",
27+
"categories": []
28+
},
29+
"paths": {
30+
"zippedPackage": "solution/module-10-demo.sppkg"
31+
}
32+
}

Module10/config/serve.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
{
2-
"$schema": "https://developer.microsoft.com/json-schemas/core-build/serve.schema.json",
3-
"port": 4321,
4-
"https": true,
5-
"initialPage": "https://localhost:5432/workbench",
6-
"api": {
7-
"port": 5432,
8-
"entryPath": "node_modules/@microsoft/sp-webpart-workbench/lib/api/"
9-
}
2+
"$schema": "https://developer.microsoft.com/json-schemas/core-build/serve.schema.json",
3+
"port": 4321,
4+
"https": true,
5+
"initialPage": "https://localhost:5432/workbench"
106
}

Module10/gulpfile.js

Lines changed: 81 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -10,107 +10,112 @@ var run = require('gulp-run');
1010
build.addSuppression(`Warning - [sass] The local CSS class 'ms-Grid' is not camelCase and will not be type-safe.`);
1111

1212
let subTaskUpdateVersion = build.subTask('update-version-subtask', function (gulp, buildOptions, done) {
13-
var self = this;
14-
let inputVersion = buildOptions.args[PARAMETER_VERSION];
15-
let newVersion = "";
16-
self.log(`build parameter: ${inputVersion}`);
17-
return gulp.src('./config/package-solution.json')
18-
.pipe(jeditor(function (json) {
19-
let currentVersion = json.solution.version;
20-
let versionStrings = [];
21-
//find the major and minor version and replace patch version with input
22-
if (currentVersion.indexOf('.') != -1) {
23-
versionStrings = currentVersion.split('.');
24-
}
25-
if (versionStrings != null && versionStrings.length > 2) {
26-
//check if input version includes "_"
27-
self.log(`inputVersion: ${inputVersion}`);
28-
if (inputVersion && inputVersion.indexOf('_') != -1) {
29-
const inputVersionArray = inputVersion.split('_');
30-
inputVersion = inputVersionArray[inputVersionArray.length - 1];
31-
//get last mmdd.ref
32-
//inputVersion = inputVersion.substring(4, inputVersion.length);
33-
newVersion = inputVersion.substring(4, inputVersion.length);
34-
self.log(`buildOptions parameter '${buildOptions.args[PARAMETER_VERSION]}' include '_' and use last segment ${newVersion}`);
35-
} else {
36-
//auto increase the version
37-
newVersion = +versionStrings[3] + 1;
38-
}
39-
40-
//json.solution.version = `${versionStrings[0]}.${versionStrings[1]}.${inputVersion}`;
41-
json.solution.version = `${versionStrings[0]}.${versionStrings[1]}.${versionStrings[2]}.${newVersion}`;
42-
self.log(`version: ${json.solution.version}`);
43-
} else {
44-
self.log(`version entry is either empty or not as "major.minor.pathch" format. currentVersion: ${currentVersion}`);
45-
}
46-
47-
return json;
48-
}, {
49-
'indent_char': '\t',
50-
'indent_size': 4
51-
}))
52-
.pipe(gulp.dest('./config'));
13+
var self = this;
14+
let inputVersion = buildOptions.args[PARAMETER_VERSION];
15+
let newVersion = "";
16+
self.log(`build parameter: ${inputVersion}`);
17+
return gulp.src('./config/package-solution.json')
18+
.pipe(jeditor(function (json) {
19+
let currentVersion = json.solution.version;
20+
let versionStrings = [];
21+
//find the major and minor version and replace patch version with input
22+
if (currentVersion.indexOf('.') != -1) {
23+
versionStrings = currentVersion.split('.');
24+
}
25+
if (versionStrings != null && versionStrings.length > 2) {
26+
//check if input version includes "_"
27+
self.log(`inputVersion: ${inputVersion}`);
28+
if (inputVersion && inputVersion.indexOf('_') != -1) {
29+
const inputVersionArray = inputVersion.split('_');
30+
inputVersion = inputVersionArray[inputVersionArray.length - 1];
31+
//get last mmdd.ref
32+
//inputVersion = inputVersion.substring(4, inputVersion.length);
33+
newVersion = inputVersion.substring(4, inputVersion.length);
34+
self.log(`buildOptions parameter '${buildOptions.args[PARAMETER_VERSION]}' include '_' and use last segment ${newVersion}`);
35+
} else {
36+
//auto increase the version
37+
newVersion = +versionStrings[3] + 1;
38+
}
39+
40+
//json.solution.version = `${versionStrings[0]}.${versionStrings[1]}.${inputVersion}`;
41+
json.solution.version = `${versionStrings[0]}.${versionStrings[1]}.${versionStrings[2]}.${newVersion}`;
42+
self.log(`version: ${json.solution.version}`);
43+
} else {
44+
self.log(`version entry is either empty or not as "major.minor.pathch" format. currentVersion: ${currentVersion}`);
45+
}
46+
47+
return json;
48+
}, {
49+
'indent_char': '\t',
50+
'indent_size': 4
51+
}))
52+
.pipe(gulp.dest('./config'));
5353
});
5454

5555
let taskUpdateVersionTask = build.task('update-version', subTaskUpdateVersion);
5656

5757
//task - ExecPowerShell
5858
let subTaskExecPowerShell = build.subTask('exec-powershell-subtask', function (gulp, buildOptions, done) {
59-
// return run('write-host "Hello World"', {
60-
// usePowerShell: true
61-
// }).exec();
62-
return run('o365 version').exec();
59+
// return run('write-host "Hello World"', {
60+
// usePowerShell: true
61+
// }).exec();
62+
return run('o365 version').exec();
6363
});
6464
let taskExecPowerShellTask = build.task('exec-powershell', subTaskExecPowerShell);
6565

6666
//Deployment
6767
let subTaskDeploy = build.subTask('deploy-subtask', function (gulp, buildOptions, done) {
68-
run('./deploy.ps1', {
69-
usePowerShell: true
70-
}).exec();
71-
// run('write-host "Hello World"', {
72-
// usePowerShell: true
73-
// }).exec();
74-
// run('write-host "Hello World"', {
75-
// usePowerShell: true
76-
// }).exec();
77-
// run('write-host "Hello World"', {
78-
// usePowerShell: true
79-
// }).exec();
68+
run('./deploy.ps1', {
69+
usePowerShell: true
70+
}).exec();
71+
// run('write-host "Hello World"', {
72+
// usePowerShell: true
73+
// }).exec();
74+
// run('write-host "Hello World"', {
75+
// usePowerShell: true
76+
// }).exec();
77+
// run('write-host "Hello World"', {
78+
// usePowerShell: true
79+
// }).exec();
8080
});
8181
let taskDeploy = build.task('deploy', subTaskDeploy);
8282

8383
gulp.task('custom-serve', function (done) {
84-
runSequence('update-version', 'serve', function () {
85-
done();
86-
})
84+
runSequence('update-version', 'serve', function () {
85+
done();
86+
})
8787
});
8888

8989
//WebPack
9090
build.configureWebpack.mergeConfig({
91-
additionalConfiguration: (generatedConfiguration) => {
92-
generatedConfiguration.module.rules.push({
93-
test: /\.md$/,
94-
use: [{
95-
loader: 'html-loader'
96-
},
97-
{
98-
loader: 'markdown-loader'
99-
}
100-
]
101-
});
102-
103-
return generatedConfiguration;
104-
}
91+
additionalConfiguration: (generatedConfiguration) => {
92+
generatedConfiguration.module.rules.push({
93+
test: /\.md$/,
94+
use: [{
95+
loader: 'html-loader'
96+
},
97+
{
98+
loader: 'markdown-loader'
99+
}
100+
]
101+
});
102+
103+
return generatedConfiguration;
104+
}
105105
});
106106

107107
var getTasks = build.rig.getTasks;
108108
build.rig.getTasks = function () {
109-
var result = getTasks.call(build.rig);
109+
var result = getTasks.call(build.rig);
110110

111-
result.set('serve', result.get('serve-deprecated'));
111+
result.set('serve', result.get('serve-deprecated'));
112112

113-
return result;
113+
return result;
114114
};
115115

116+
// ********* ADDED *******
117+
// disable tslint
118+
build.tslintCmd.enabled = false;
119+
// ********* ADDED *******
120+
116121
build.initialize(gulp);

0 commit comments

Comments
 (0)