Skip to content

Commit 173a5e2

Browse files
authored
[PM-13277] Gulp: Remove unnecessary filtering (#11456)
Part of the browser build script refactor effort. bitwarden.atlassian.net/browse/PM-6683 We seem to have some very old filters related to fonts and safari build files. These predates our modern usage of webpack for bundling only used assets. I've run diff -qr on Chrome, Firefox and Safari builds and the only difference is that we now include a bwi-font.svg resource. bwi-font.svg is referenced in our css files and "should" be included.
1 parent 023abe2 commit 173a5e2

File tree

4 files changed

+0
-136
lines changed

4 files changed

+0
-136
lines changed

.github/renovate.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@
8181
"cross-env",
8282
"del",
8383
"gulp",
84-
"gulp-filter",
8584
"gulp-if",
8685
"gulp-json-editor",
8786
"gulp-replace",

apps/browser/gulpfile.js

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,9 @@ const betaBuild = process.env.BETA_BUILD === "1";
1414
const paths = {
1515
build: "./build/",
1616
dist: "./dist/",
17-
node_modules: "./node_modules/",
18-
popupDir: "./src/popup/",
19-
cssDir: "./src/popup/css/",
2017
safari: "./src/safari/",
2118
};
2219

23-
const filters = {
24-
fonts: [
25-
"!build/popup/fonts/*",
26-
"build/popup/fonts/Open_Sans*.woff",
27-
"build/popup/fonts/bwi-font.woff2",
28-
"build/popup/fonts/bwi-font.woff",
29-
"build/popup/fonts/bwi-font.ttf",
30-
],
31-
safari: ["!build/safari/**/*"],
32-
};
33-
3420
/**
3521
* Converts a number to a tuple containing two Uint16's
3622
* @param num {number} This number is expected to be a integer style number with no decimals
@@ -64,11 +50,9 @@ function distFileName(browserName, ext) {
6450

6551
async function dist(browserName, manifest) {
6652
const { default: zip } = await import("gulp-zip");
67-
const { default: filter } = await import("gulp-filter");
6853

6954
return gulp
7055
.src(paths.build + "**/*")
71-
.pipe(filter(["**"].concat(filters.fonts).concat(filters.safari)))
7256
.pipe(gulpif("popup/index.html", replace("__BROWSER__", "browser_" + browserName)))
7357
.pipe(gulpif("manifest.json", jeditor(manifest)))
7458
.pipe(zip(distFileName(browserName, "zip")))
@@ -192,8 +176,6 @@ function distSafariApp(cb, subBuildPath) {
192176
return new Promise((resolve) => proc.on("close", resolve));
193177
})
194178
.then(async () => {
195-
const { default: filter } = await import("gulp-filter");
196-
197179
const libs = fs
198180
.readdirSync(builtAppexFrameworkPath)
199181
.filter((p) => p.endsWith(".dylib"))
@@ -237,13 +219,10 @@ function safariCopyAssets(source, dest) {
237219
}
238220

239221
async function safariCopyBuild(source, dest) {
240-
const { default: filter } = await import("gulp-filter");
241-
242222
return new Promise((resolve, reject) => {
243223
gulp
244224
.src(source)
245225
.on("error", reject)
246-
.pipe(filter(["**"].concat(filters.fonts)))
247226
.pipe(gulpif("popup/index.html", replace("__BROWSER__", "browser_safari")))
248227
.pipe(
249228
gulpif(

package-lock.json

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

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@
107107
"eslint-plugin-storybook": "0.8.0",
108108
"eslint-plugin-tailwindcss": "3.17.4",
109109
"gulp": "4.0.2",
110-
"gulp-filter": "9.0.1",
111110
"gulp-if": "3.0.0",
112111
"gulp-json-editor": "2.6.0",
113112
"gulp-replace": "1.1.4",

0 commit comments

Comments
 (0)