Browse Source

Use webfonts from jslib instead of downloading them using gulp

fix/chrome-macos-slowdown
Hinton 4 weeks ago
parent
commit
ee1af34e2e
  1. 12
      gulpfile.js
  2. 2
      jslib
  3. 3150
      package-lock.json
  4. 9
      package.json
  5. 2
      src/popup/scss/popup.scss
  6. 1
      webfonts.list

12
gulpfile.js

@ -2,7 +2,6 @@ const gulp = require('gulp'),
gulpif = require('gulp-if'),
filter = require('gulp-filter'),
replace = require('gulp-replace'),
googleWebFonts = require('gulp-google-webfonts'),
jeditor = require("gulp-json-editor"),
child = require('child_process'),
zip = require('gulp-zip'),
@ -204,15 +203,6 @@ function stdOutProc(proc) {
proc.stderr.on('data', (data) => console.error(data.toString()));
}
function webfonts() {
return gulp.src('./webfonts.list')
.pipe(googleWebFonts({
fontsDir: 'webfonts',
cssFilename: 'webfonts.css'
}))
.pipe(gulp.dest(paths.cssDir));
}
function ciCoverage(cb) {
return gulp.src(paths.coverage + '**/*')
.pipe(filter(['**', '!coverage/coverage*.zip']))
@ -231,5 +221,3 @@ exports['dist:safari:dmg'] = distSafariDmg;
exports.dist = gulp.parallel(distFirefox, distChrome, distOpera, distEdge);
exports['ci:coverage'] = ciCoverage;
exports.ci = ciCoverage;
exports.webfonts = webfonts;
exports.build = webfonts;

2
jslib

@ -1 +1 @@
Subproject commit b7429b0c0cdca8783fd9fa304918ee91f23c6f76
Subproject commit b2b7b34955368680c24f970d297a97618a1f229f

3150
package-lock.json
File diff suppressed because it is too large
View File

9
package.json

@ -9,10 +9,10 @@
"symlink:win": "rmdir /S /Q .\\jslib && cmd /c mklink /J .\\jslib ..\\jslib",
"symlink:mac": "npm run symlink:lin",
"symlink:lin": "rm -rf ./jslib && ln -s ../jslib ./jslib",
"build": "gulp build && webpack",
"build:watch": "gulp build && webpack --watch",
"build:prod": "gulp build && cross-env NODE_ENV=production webpack",
"build:prod:watch": "gulp build && cross-env NODE_ENV=production webpack --watch",
"build": "webpack",
"build:watch": "webpack --watch",
"build:prod": "cross-env NODE_ENV=production webpack",
"build:prod:watch": "cross-env NODE_ENV=production webpack --watch",
"clean:l10n": "git push origin --delete l10n_master",
"dist": "npm run build:prod && gulp dist",
"dist:firefox": "npm run build:prod && gulp dist:firefox",
@ -42,7 +42,6 @@
"file-loader": "^6.2.0",
"gulp": "^4.0.2",
"gulp-filter": "^7.0.0",
"gulp-google-webfonts": "^4.0.0",
"gulp-if": "^3.0.0",
"gulp-json-editor": "^2.5.5",
"gulp-replace": "^1.1.0",

2
src/popup/scss/popup.scss

@ -1,4 +1,4 @@
@import "../css/webfonts.css";
@import "../../../jslib/angular/src/scss/webfonts.css";
@import "variables.scss";
@import "base.scss";
@import "grid.scss";

1
webfonts.list

@ -1 +0,0 @@
Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i&subset=cyrillic,cyrillic-ext,greek,greek-ext,latin-ext
Loading…
Cancel
Save