Skip to content

Commit 7e5f924

Browse files
committed
Make generateModuleStub public too. Both are accessed by exertnal code and should be public. Also update dependencies.
1 parent 1e2847f commit 7e5f924

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

common/config/rush/pnpm-lock.yaml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core-build/gulp-core-build-sass/src/SassTask.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export class SassTask extends GulpTask<ISassTaskConfig> {
9090

9191
private _modulePostCssAdditionalPlugins: postcss.AcceptedPlugin[] = [
9292
cssModules({
93-
getJSON: this._generateModuleStub.bind(this),
93+
getJSON: this.generateModuleStub.bind(this),
9494
generateScopedName: this.generateScopedName.bind(this)
9595
})
9696
];
@@ -127,6 +127,10 @@ export class SassTask extends GulpTask<ISassTaskConfig> {
127127
}).then(() => { /* collapse void[] to void */ });
128128
}
129129

130+
public generateModuleStub(cssFileName: string, json: Object): void {
131+
_classMaps[cssFileName] = json;
132+
}
133+
130134
public generateScopedName(name: string, fileName: string, css: string): string {
131135
const fileBaseName: string = path.basename(fileName);
132136
const hash: string = crypto.createHmac('sha1', fileBaseName)
@@ -136,10 +140,6 @@ export class SassTask extends GulpTask<ISassTaskConfig> {
136140
return `${name}_${hash}`;
137141
}
138142

139-
private _generateModuleStub(cssFileName: string, json: Object): void {
140-
_classMaps[cssFileName] = json;
141-
}
142-
143143
private _processFile(filePath: string): Promise<void> {
144144
// Ignore files that start with underscores
145145
if (path.basename(filePath).match(/^\_/)) {

core-build/web-library-build/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
},
2020
"dependencies": {
2121
"@microsoft/gulp-core-build": "3.9.26",
22-
"@microsoft/gulp-core-build-sass": "4.6.34",
22+
"@microsoft/gulp-core-build-sass": "4.6.35",
2323
"@microsoft/gulp-core-build-serve": "3.3.35",
2424
"@microsoft/gulp-core-build-typescript": "8.1.11",
2525
"@microsoft/gulp-core-build-webpack": "3.4.102",

0 commit comments

Comments
 (0)