gulp webfonts task as part of build

This commit is contained in:
Kyle Spearrin 2018-07-18 10:54:22 -04:00
parent e55408424e
commit ff64ad8df0
5 changed files with 1441 additions and 9 deletions

13
gulpfile.js Normal file
View file

@ -0,0 +1,13 @@
const gulp = require('gulp');
const googleWebFonts = require('gulp-google-webfonts');
gulp.task('build', ['webfonts']);
gulp.task('webfonts', () => {
return gulp.src('./webfonts.list')
.pipe(googleWebFonts({
fontsDir: 'webfonts',
cssFilename: 'webfonts.css'
}))
.pipe(gulp.dest('./src/css/'));
});

1416
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -6,14 +6,14 @@
"sub:update": "git submodule update --remote",
"sub:pull": "git submodule foreach git pull",
"postinstall": "npm run sub:init",
"build": "webpack --config webpack.config.js",
"build:watch": "webpack-serve --config webpack.config.js",
"build:prod": "cross-env NODE_ENV=production webpack --config webpack.config.js",
"build:prod:watch": "cross-env NODE_ENV=production webpack-serve --config webpack.config.js",
"build:selfhost": "cross-env SELF_HOST=true webpack-serve --config webpack.config.js",
"build:selfhost:watch": "cross-env SELF_HOST=true webpack-serve --config webpack.config.js",
"build:selfhost:prod": "cross-env SELF_HOST=true NODE_ENV=production webpack --config webpack.config.js",
"build:selfhost:prod:watch": "cross-env SELF_HOST=true NODE_ENV=production webpack-serve --config webpack.config.js",
"build": "gulp build && webpack --config webpack.config.js",
"build:watch": "gulp build && webpack-serve --config webpack.config.js",
"build:prod": "gulp build && cross-env NODE_ENV=production webpack --config webpack.config.js",
"build:prod:watch": "gulp build && cross-env NODE_ENV=production webpack-serve --config webpack.config.js",
"build:selfhost": "gulp build && cross-env SELF_HOST=true webpack-serve --config webpack.config.js",
"build:selfhost:watch": "gulp build && cross-env SELF_HOST=true webpack-serve --config webpack.config.js",
"build:selfhost:prod": "gulp build && cross-env SELF_HOST=true NODE_ENV=production webpack --config webpack.config.js",
"build:selfhost:prod:watch": "gulp build && cross-env SELF_HOST=true NODE_ENV=production webpack-serve --config webpack.config.js",
"dist": "npm run build:prod && gulp dist",
"lint": "tslint src/**/*.ts || true",
"lint:fix": "tslint src/**/*.ts --fix"
@ -34,6 +34,8 @@
"css-loader": "^0.28.11",
"extract-text-webpack-plugin": "next",
"file-loader": "^1.1.11",
"gulp": "^3.9.1",
"gulp-google-webfonts": "^2.0.0",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^3.2.0",
"node-sass": "^4.7.2",

View file

@ -1,4 +1,4 @@
@import "../webfonts/webfonts.css";
@import "../css/webfonts.css";
$primary: #3c8dbc;
$primary-accent: #286090;

1
webfonts.list Normal file
View file

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