mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-18 17:21:33 +00:00
Updated
Added gulp-replace dev dependency. Removed version strings of Fontello fonts from fontello.css Added "build:fontello" Gulp task which will append version string to Fontello fonts, then do the usual processing for CSS file. It will use type 5 from versions.json, if available. Also updated src/README.md about it.
This commit is contained in:
parent
8ab77a6464
commit
a79803cbd6
2
dist/js/home.js
vendored
2
dist/js/home.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/home.js.map
vendored
2
dist/js/home.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/libs/fontello/fontello.css
vendored
2
dist/libs/fontello/fontello.css
vendored
@ -1,2 +1,2 @@
|
||||
@font-face{font-family:fontello;src:url(fontello.eot?iDzQ0dov5j);src:url(fontello.eot?iDzQ0dov5j#iefix) format("embedded-opentype"),url(fontello.woff2?iDzQ0dov5j) format("woff2"),url(fontello.woff?iDzQ0dov5j) format("woff"),url(fontello.ttf?iDzQ0dov5j) format("truetype"),url(fontello.svg?iDzQ0dov5j#fontello) format("svg");font-weight:400;font-style:normal}[class*=" icon-"]:before,[class^=icon-]:before{font-family:fontello;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-feature-settings:normal;font-variant:normal;text-transform:none;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-2x:before{font-size:2rem}.icon-archive:before{content:"\e800"}.icon-sharex:before{content:"\e801"}.icon-picture:before{content:"\e802"}.icon-th-list:before{content:"\e803"}.icon-trash:before{content:"\e804"}.icon-cancel:before{content:"\e805"}.icon-arrows-cw:before{content:"\e806"}.icon-plus:before{content:"\e807"}.icon-clipboard:before{content:"\e808"}.icon-login:before{content:"\e809"}.icon-home:before{content:"\e80a"}.icon-gauge:before{content:"\e80b"}.icon-video:before{content:"\e80c"}.icon-help-circled:before{content:"\e80d"}.icon-github-circled:before{content:"\e80e"}.icon-pencil:before{content:"\e80f"}.icon-terminal:before{content:"\e810"}.icon-hammer:before{content:"\e811"}.icon-block:before{content:"\e812"}.icon-link:before{content:"\e813"}.icon-cog-alt:before{content:"\e814"}.icon-floppy:before{content:"\e815"}.icon-user-plus:before{content:"\e816"}.icon-privatebin:before{content:"\e817"}.icon-upload-cloud:before{content:"\e819"}.icon-th-large:before{content:"\e81a"}.icon-download:before{content:"\e81b"}.icon-gatsby:before{content:"\e81c"}.icon-filter:before{content:"\f0b0"}.icon-docs:before{content:"\f0c5"}.icon-doc-inv:before{content:"\f15b"}.icon-paper-plane:before{content:"\f1d8"}.icon-chrome:before{content:"\f268"}.icon-firefox:before{content:"\f269"}
|
||||
@font-face{font-family:fontello;src:url(fontello.eot?_=1568894058);src:url(fontello.eot?_=1568894058#iefix) format("embedded-opentype"),url(fontello.woff2?_=1568894058) format("woff2"),url(fontello.woff?_=1568894058) format("woff"),url(fontello.ttf?_=1568894058) format("truetype"),url(fontello.svg?_=1568894058#fontello) format("svg");font-weight:400;font-style:normal}[class*=" icon-"]:before,[class^=icon-]:before{font-family:fontello;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-feature-settings:normal;font-variant:normal;text-transform:none;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-2x:before{font-size:2rem}.icon-archive:before{content:"\e800"}.icon-sharex:before{content:"\e801"}.icon-picture:before{content:"\e802"}.icon-th-list:before{content:"\e803"}.icon-trash:before{content:"\e804"}.icon-cancel:before{content:"\e805"}.icon-arrows-cw:before{content:"\e806"}.icon-plus:before{content:"\e807"}.icon-clipboard:before{content:"\e808"}.icon-login:before{content:"\e809"}.icon-home:before{content:"\e80a"}.icon-gauge:before{content:"\e80b"}.icon-video:before{content:"\e80c"}.icon-help-circled:before{content:"\e80d"}.icon-github-circled:before{content:"\e80e"}.icon-pencil:before{content:"\e80f"}.icon-terminal:before{content:"\e810"}.icon-hammer:before{content:"\e811"}.icon-block:before{content:"\e812"}.icon-link:before{content:"\e813"}.icon-cog-alt:before{content:"\e814"}.icon-floppy:before{content:"\e815"}.icon-user-plus:before{content:"\e816"}.icon-privatebin:before{content:"\e817"}.icon-upload-cloud:before{content:"\e819"}.icon-th-large:before{content:"\e81a"}.icon-download:before{content:"\e81b"}.icon-gatsby:before{content:"\e81c"}.icon-filter:before{content:"\f0b0"}.icon-docs:before{content:"\f0c5"}.icon-doc-inv:before{content:"\f15b"}.icon-paper-plane:before{content:"\f1d8"}.icon-chrome:before{content:"\f268"}.icon-firefox:before{content:"\f269"}
|
||||
/*# sourceMappingURL=fontello.css.map */
|
||||
|
2
dist/libs/fontello/fontello.css.map
vendored
2
dist/libs/fontello/fontello.css.map
vendored
@ -1 +1 @@
|
||||
{"version":3,"sources":["libs/fontello/fontello.css"],"names":[],"mappings":"AAAA,WACE,oBAAuB,CACvB,gCAAmC,CACnC,kQAKuD,CACvD,eAAmB,CACnB,iBACF,CAaA,+CAEE,oBAAuB,CACvB,iBAAkB,CAClB,eAAmB,CACnB,UAAW,CACX,oBAAqB,CACrB,uBAAwB,CACxB,SAAU,CACV,iBAAmB,CACnB,iBAAkB,CAIlB,4BAAoB,CAApB,mBAAoB,CACpB,mBAAoB,CAOpB,gBAAkB,CAMlB,kCAAmC,CACnC,iCAIF,CAEA,gBACE,cACF,CAEA,qBAAwB,eAAiB,CACzC,oBAAuB,eAAiB,CACxC,qBAAwB,eAAiB,CACzC,qBAAwB,eAAiB,CACzC,mBAAsB,eAAiB,CACvC,oBAAuB,eAAiB,CACxC,uBAA0B,eAAiB,CAC3C,kBAAqB,eAAiB,CACtC,uBAA0B,eAAiB,CAC3C,mBAAsB,eAAiB,CACvC,kBAAqB,eAAiB,CACtC,mBAAsB,eAAiB,CACvC,mBAAqB,eAAkB,CACvC,0BAA6B,eAAiB,CAC9C,4BAA+B,eAAiB,CAChD,oBAAuB,eAAiB,CACxC,sBAAyB,eAAiB,CAC1C,oBAAuB,eAAiB,CACxC,mBAAsB,eAAiB,CACvC,kBAAqB,eAAiB,CACtC,qBAAwB,eAAiB,CACzC,oBAAuB,eAAiB,CACxC,uBAA0B,eAAiB,CAC3C,wBAA2B,eAAiB,CAC5C,0BAA6B,eAAiB,CAC9C,sBAAyB,eAAiB,CAC1C,sBAAyB,eAAiB,CAC1C,oBAAuB,eAAiB,CACxC,oBAAuB,eAAiB,CACxC,kBAAqB,eAAiB,CACtC,qBAAwB,eAAiB,CACzC,yBAA4B,eAAiB,CAC7C,oBAAuB,eAAiB,CACxC,qBAAwB,eAAiB","file":"fontello.css","sourcesContent":["@font-face {\n font-family: 'fontello';\n src: url('fontello.eot?iDzQ0dov5j');\n src:\n url('fontello.eot?iDzQ0dov5j#iefix') format('embedded-opentype'),\n url('fontello.woff2?iDzQ0dov5j') format('woff2'),\n url('fontello.woff?iDzQ0dov5j') format('woff'),\n url('fontello.ttf?iDzQ0dov5j') format('truetype'),\n url('fontello.svg?iDzQ0dov5j#fontello') format('svg');\n font-weight: normal;\n font-style: normal\n}\n\n/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */\n/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */\n/*\n@media screen and (-webkit-min-device-pixel-ratio:0) {\n @font-face {\n font-family: 'fontello';\n src: url('fontello.svg?iDzQ0dov5j#fontello') format('svg');\n }\n}\n*/\n\n[class^=\"icon-\"]::before,\n[class*=\" icon-\"]::before {\n font-family: \"fontello\";\n font-style: normal;\n font-weight: normal;\n speak: none;\n display: inline-block;\n text-decoration: inherit;\n width: 1em;\n margin-right: 0.2em;\n text-align: center;\n /* opacity: .8; */\n\n /* For safety - reset parent styles, that can break glyph codes */\n font-variant: normal;\n text-transform: none;\n\n /* fix buttons height, for twitter bootstrap */\n /* line-height: 1em; */\n\n /* Animation center compensation - margins should be symmetric */\n /* remove if not needed */\n margin-left: 0.2em;\n\n /* you can be more comfortable with increased icons size */\n /* font-size: 120%; */\n\n /* Font smoothing. That was taken from TWBS */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n\n /* Uncomment for 3D effect */\n /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */\n}\n\n.icon-2x::before {\n font-size: 2rem\n}\n\n.icon-archive::before { content: '\\e800' } /* '' */\n.icon-sharex::before { content: '\\e801' } /* '' */\n.icon-picture::before { content: '\\e802' } /* '' */\n.icon-th-list::before { content: '\\e803' } /* '' */\n.icon-trash::before { content: '\\e804' } /* '' */\n.icon-cancel::before { content: '\\e805' } /* '' */\n.icon-arrows-cw::before { content: '\\e806' } /* '' */\n.icon-plus::before { content: '\\e807' } /* '' */\n.icon-clipboard::before { content: '\\e808' } /* '' */\n.icon-login::before { content: '\\e809' } /* '' */\n.icon-home::before { content: '\\e80a' } /* '' */\n.icon-gauge::before { content: '\\e80b' } /* '' */\n.icon-video:before { content: '\\e80c'; } /* '' */\n.icon-help-circled::before { content: '\\e80d' } /* '' */\n.icon-github-circled::before { content: '\\e80e' } /* '' */\n.icon-pencil::before { content: '\\e80f' } /* '' */\n.icon-terminal::before { content: '\\e810' } /* '' */\n.icon-hammer::before { content: '\\e811' } /* '' */\n.icon-block::before { content: '\\e812' } /* '' */\n.icon-link::before { content: '\\e813' } /* '' */\n.icon-cog-alt::before { content: '\\e814' } /* '' */\n.icon-floppy::before { content: '\\e815' } /* '' */\n.icon-user-plus::before { content: '\\e816' } /* '' */\n.icon-privatebin::before { content: '\\e817' } /* '' */\n.icon-upload-cloud::before { content: '\\e819' } /* '' */\n.icon-th-large::before { content: '\\e81a' } /* '' */\n.icon-download::before { content: '\\e81b' } /* '' */\n.icon-gatsby::before { content: '\\e81c' } /* '' */\n.icon-filter::before { content: '\\f0b0' } /* '' */\n.icon-docs::before { content: '\\f0c5' } /* '' */\n.icon-doc-inv::before { content: '\\f15b' } /* '' */\n.icon-paper-plane::before { content: '\\f1d8' } /* '' */\n.icon-chrome::before { content: '\\f268' } /* '' */\n.icon-firefox::before { content: '\\f269' } /* '' */\n"]}
|
||||
{"version":3,"sources":["fontello.css"],"names":[],"mappings":"AAAA,WACE,oBAAuB,CACvB,kCAAqC,CACrC,4QAKyD,CACzD,eAAmB,CACnB,iBACF,CAaA,+CAEE,oBAAuB,CACvB,iBAAkB,CAClB,eAAmB,CACnB,UAAW,CACX,oBAAqB,CACrB,uBAAwB,CACxB,SAAU,CACV,iBAAmB,CACnB,iBAAkB,CAIlB,4BAAoB,CAApB,mBAAoB,CACpB,mBAAoB,CAOpB,gBAAkB,CAMlB,kCAAmC,CACnC,iCAIF,CAEA,gBACE,cACF,CAEA,qBAAwB,eAAiB,CACzC,oBAAuB,eAAiB,CACxC,qBAAwB,eAAiB,CACzC,qBAAwB,eAAiB,CACzC,mBAAsB,eAAiB,CACvC,oBAAuB,eAAiB,CACxC,uBAA0B,eAAiB,CAC3C,kBAAqB,eAAiB,CACtC,uBAA0B,eAAiB,CAC3C,mBAAsB,eAAiB,CACvC,kBAAqB,eAAiB,CACtC,mBAAsB,eAAiB,CACvC,mBAAqB,eAAkB,CACvC,0BAA6B,eAAiB,CAC9C,4BAA+B,eAAiB,CAChD,oBAAuB,eAAiB,CACxC,sBAAyB,eAAiB,CAC1C,oBAAuB,eAAiB,CACxC,mBAAsB,eAAiB,CACvC,kBAAqB,eAAiB,CACtC,qBAAwB,eAAiB,CACzC,oBAAuB,eAAiB,CACxC,uBAA0B,eAAiB,CAC3C,wBAA2B,eAAiB,CAC5C,0BAA6B,eAAiB,CAC9C,sBAAyB,eAAiB,CAC1C,sBAAyB,eAAiB,CAC1C,oBAAuB,eAAiB,CACxC,oBAAuB,eAAiB,CACxC,kBAAqB,eAAiB,CACtC,qBAAwB,eAAiB,CACzC,yBAA4B,eAAiB,CAC7C,oBAAuB,eAAiB,CACxC,qBAAwB,eAAiB","file":"fontello.css","sourcesContent":["@font-face {\n font-family: 'fontello';\n src: url('fontello.eot?_=1568894058');\n src:\n url('fontello.eot?_=1568894058#iefix') format('embedded-opentype'),\n url('fontello.woff2?_=1568894058') format('woff2'),\n url('fontello.woff?_=1568894058') format('woff'),\n url('fontello.ttf?_=1568894058') format('truetype'),\n url('fontello.svg?_=1568894058#fontello') format('svg');\n font-weight: normal;\n font-style: normal\n}\n\n/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */\n/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */\n/*\n@media screen and (-webkit-min-device-pixel-ratio:0) {\n @font-face {\n font-family: 'fontello';\n src: url('fontello.svg?_=1568894058#fontello') format('svg');\n }\n}\n*/\n\n[class^=\"icon-\"]::before,\n[class*=\" icon-\"]::before {\n font-family: \"fontello\";\n font-style: normal;\n font-weight: normal;\n speak: none;\n display: inline-block;\n text-decoration: inherit;\n width: 1em;\n margin-right: 0.2em;\n text-align: center;\n /* opacity: .8; */\n\n /* For safety - reset parent styles, that can break glyph codes */\n font-variant: normal;\n text-transform: none;\n\n /* fix buttons height, for twitter bootstrap */\n /* line-height: 1em; */\n\n /* Animation center compensation - margins should be symmetric */\n /* remove if not needed */\n margin-left: 0.2em;\n\n /* you can be more comfortable with increased icons size */\n /* font-size: 120%; */\n\n /* Font smoothing. That was taken from TWBS */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n\n /* Uncomment for 3D effect */\n /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */\n}\n\n.icon-2x::before {\n font-size: 2rem\n}\n\n.icon-archive::before { content: '\\e800' } /* '' */\n.icon-sharex::before { content: '\\e801' } /* '' */\n.icon-picture::before { content: '\\e802' } /* '' */\n.icon-th-list::before { content: '\\e803' } /* '' */\n.icon-trash::before { content: '\\e804' } /* '' */\n.icon-cancel::before { content: '\\e805' } /* '' */\n.icon-arrows-cw::before { content: '\\e806' } /* '' */\n.icon-plus::before { content: '\\e807' } /* '' */\n.icon-clipboard::before { content: '\\e808' } /* '' */\n.icon-login::before { content: '\\e809' } /* '' */\n.icon-home::before { content: '\\e80a' } /* '' */\n.icon-gauge::before { content: '\\e80b' } /* '' */\n.icon-video:before { content: '\\e80c'; } /* '' */\n.icon-help-circled::before { content: '\\e80d' } /* '' */\n.icon-github-circled::before { content: '\\e80e' } /* '' */\n.icon-pencil::before { content: '\\e80f' } /* '' */\n.icon-terminal::before { content: '\\e810' } /* '' */\n.icon-hammer::before { content: '\\e811' } /* '' */\n.icon-block::before { content: '\\e812' } /* '' */\n.icon-link::before { content: '\\e813' } /* '' */\n.icon-cog-alt::before { content: '\\e814' } /* '' */\n.icon-floppy::before { content: '\\e815' } /* '' */\n.icon-user-plus::before { content: '\\e816' } /* '' */\n.icon-privatebin::before { content: '\\e817' } /* '' */\n.icon-upload-cloud::before { content: '\\e819' } /* '' */\n.icon-th-large::before { content: '\\e81a' } /* '' */\n.icon-download::before { content: '\\e81b' } /* '' */\n.icon-gatsby::before { content: '\\e81c' } /* '' */\n.icon-filter::before { content: '\\f0b0' } /* '' */\n.icon-docs::before { content: '\\f0c5' } /* '' */\n.icon-doc-inv::before { content: '\\f15b' } /* '' */\n.icon-paper-plane::before { content: '\\f1d8' } /* '' */\n.icon-chrome::before { content: '\\f268' } /* '' */\n.icon-firefox::before { content: '\\f269' } /* '' */\n"]}
|
37
gulpfile.js
37
gulpfile.js
@ -8,6 +8,7 @@ const gulpif = require('gulp-if')
|
||||
const nodemon = require('gulp-nodemon')
|
||||
const postcss = require('gulp-postcss')
|
||||
const postcssPresetEnv = require('postcss-preset-env')
|
||||
const replace = require('gulp-replace')
|
||||
const sourcemaps = require('gulp-sourcemaps')
|
||||
const stylelint = require('gulp-stylelint')
|
||||
const terser = require('gulp-terser')
|
||||
@ -19,6 +20,14 @@ const dist = process.env.NODE_ENV === 'development'
|
||||
? './dist-dev'
|
||||
: './dist'
|
||||
|
||||
const postcssPlugins = [
|
||||
postcssPresetEnv()
|
||||
]
|
||||
|
||||
// Minify on production
|
||||
if (process.env.NODE_ENV !== 'development')
|
||||
postcssPlugins.push(cssnano())
|
||||
|
||||
/** TASKS: LINT */
|
||||
|
||||
gulp.task('lint:js', () => {
|
||||
@ -65,21 +74,25 @@ gulp.task('clean', gulp.parallel('clean:css', 'clean:js', 'clean:rest'))
|
||||
/** TASKS: BUILD */
|
||||
|
||||
gulp.task('build:css', () => {
|
||||
const plugins = [
|
||||
postcssPresetEnv()
|
||||
]
|
||||
|
||||
// Minify on production
|
||||
if (process.env.NODE_ENV !== 'development')
|
||||
plugins.push(cssnano())
|
||||
|
||||
return gulp.src('./src/**/*.css')
|
||||
return gulp.src('./src/**/*.css', {
|
||||
ignore: './src/libs/fontello/fontello.css'
|
||||
})
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(postcss(plugins))
|
||||
.pipe(postcss(postcssPlugins))
|
||||
.pipe(sourcemaps.write('.'))
|
||||
.pipe(gulp.dest(dist))
|
||||
})
|
||||
|
||||
gulp.task('build:fontello', () => {
|
||||
const version = require('./src/versions.json')[5]
|
||||
return gulp.src('./src/libs/fontello/fontello.css')
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(gulpif(version !== undefined, replace(/(fontello\.(eot|woff2?|woff|ttf|svg))/g, `$1?_=${version}`)))
|
||||
.pipe(postcss(postcssPlugins))
|
||||
.pipe(sourcemaps.write('.'))
|
||||
.pipe(gulp.dest(`${dist}/libs/fontello`))
|
||||
})
|
||||
|
||||
gulp.task('build:js', () => {
|
||||
return gulp.src('./src/**/*.js')
|
||||
.pipe(sourcemaps.init())
|
||||
@ -90,7 +103,9 @@ gulp.task('build:js', () => {
|
||||
.pipe(gulp.dest(dist))
|
||||
})
|
||||
|
||||
gulp.task('build', gulp.parallel('build:css', 'build:js'))
|
||||
gulp.task('build', gulp.parallel('build:css', 'build:fontello', 'build:js'))
|
||||
|
||||
/** TASKS: VERSION STRINGS */
|
||||
|
||||
gulp.task('exec:bump-versions', cb => {
|
||||
exec('node ./scripts/bump-versions.js 1', (error, stdout, stderr) => {
|
||||
|
@ -64,6 +64,7 @@
|
||||
"gulp-if": "^3.0.0",
|
||||
"gulp-nodemon": "^2.4.2",
|
||||
"gulp-postcss": "^8.0.0",
|
||||
"gulp-replace": "^1.0.0",
|
||||
"gulp-sourcemaps": "^2.6.5",
|
||||
"gulp-stylelint": "^9.0.0",
|
||||
"gulp-terser": "^1.2.0",
|
||||
|
@ -14,16 +14,21 @@ const self = {
|
||||
const location = process.argv[1].replace(process.cwd() + '/', '')
|
||||
const args = process.argv.slice(2)
|
||||
|
||||
const min = 1
|
||||
const max = 5
|
||||
|
||||
self.types = {}
|
||||
for (const arg of args) {
|
||||
const lower = arg.toLowerCase()
|
||||
if (lower === 'a') {
|
||||
self.types = { 1: '', 2: '', 3: '', 4: '' }
|
||||
self.types = {}
|
||||
for (let i = min; i <= max; i++)
|
||||
self.types[i] = ''
|
||||
break
|
||||
}
|
||||
const parsed = parseInt(lower)
|
||||
// Only accept 1 to 4
|
||||
if (!isNaN(parsed) && parsed >= 1 && parsed <= 4)
|
||||
if (!isNaN(parsed) && parsed >= min && parsed <= max)
|
||||
self.types[parsed] = ''
|
||||
}
|
||||
|
||||
@ -35,11 +40,12 @@ const self = {
|
||||
node ${location} <types>
|
||||
|
||||
types:
|
||||
Space separated list of types (accepts 1 to 4).
|
||||
Space separated list of types (accepts ${min} to ${max}).
|
||||
1: CSS and JS files (lolisafe core assets + fontello.css).
|
||||
2: Icons, images and config files (manifest.json, browserconfig.xml, etc).
|
||||
3: CSS and JS files (libs from /public/libs, such as bulma, lazyload, etc).
|
||||
4: Renders from /public/render/* directories (to be used with /src/js/misc/render.js).
|
||||
5: Fontello font files.
|
||||
a: Shortcut to update all types.
|
||||
`))
|
||||
|
||||
@ -70,7 +76,7 @@ const self = {
|
||||
const data = Object.assign(old, self.types)
|
||||
|
||||
// Stringify new versions
|
||||
const stringified = JSON.stringify(data, null, 2)
|
||||
const stringified = JSON.stringify(data, null, 2) + '\n'
|
||||
|
||||
// Write to file
|
||||
await self.writeFile(file, stringified)
|
||||
|
@ -19,13 +19,24 @@ Space separated list of types (accepts 1 to 4).
|
||||
2: Icons, images and config files (manifest.json, browserconfig.xml, etc).
|
||||
3: CSS and JS files (libs from /public/libs, such as bulma, lazyload, etc).
|
||||
4: Renders from /public/render/* directories (to be used with /src/js/misc/render.js).
|
||||
5: Fontello font files.
|
||||
a: Shortcut to update all types.
|
||||
```
|
||||
|
||||
By default, running `yarn build` will also run `node ./scripts/bump-versions.js 1`.
|
||||
|
||||
## Fontello
|
||||
|
||||
`fontello.css` itself will use type 1, but its font files will use type 5.
|
||||
|
||||
Gulp will automatically append the version string into the built `fontello.css` in `dist` directory when running `yarn build` (or `dist-dev` when running `yarn develop`).
|
||||
|
||||
To bump type 5, you would have to run `yarn bump-versions 5`.
|
||||
|
||||
## Cache-Control
|
||||
|
||||
Version strings will NOT be used when `cacheControl` in `config.js` is not enabled.
|
||||
|
||||
To begin with, version strings are only necessary when the assets are being cached indefinitely in browsers.
|
||||
|
||||
However, type 5 will still be appended to the built `fontello.css` if it exists in `versions.json` file.
|
||||
|
@ -115,7 +115,7 @@ page.onAxiosError = error => {
|
||||
return swal(`${error.response.status} ${statusText}`, description, 'error')
|
||||
}
|
||||
|
||||
page.checkIfPublic = onFailure => {
|
||||
page.checkIfPublic = () => {
|
||||
let renderShown = false
|
||||
return axios.get('api/check', {
|
||||
onDownloadProgress: () => {
|
||||
@ -133,7 +133,7 @@ page.checkIfPublic = onFailure => {
|
||||
page.chunkSize = parseInt(response.data.chunkSize)
|
||||
page.temporaryUploadAges = response.data.temporaryUploadAges
|
||||
page.fileIdentifierLength = response.data.fileIdentifierLength
|
||||
return page.preparePage(onFailure)
|
||||
return page.preparePage()
|
||||
}).catch(page.onInitError)
|
||||
}
|
||||
|
||||
|
14
src/libs/fontello/fontello.css
vendored
14
src/libs/fontello/fontello.css
vendored
@ -1,12 +1,12 @@
|
||||
@font-face {
|
||||
font-family: 'fontello';
|
||||
src: url('fontello.eot?iDzQ0dov5j');
|
||||
src: url('fontello.eot');
|
||||
src:
|
||||
url('fontello.eot?iDzQ0dov5j#iefix') format('embedded-opentype'),
|
||||
url('fontello.woff2?iDzQ0dov5j') format('woff2'),
|
||||
url('fontello.woff?iDzQ0dov5j') format('woff'),
|
||||
url('fontello.ttf?iDzQ0dov5j') format('truetype'),
|
||||
url('fontello.svg?iDzQ0dov5j#fontello') format('svg');
|
||||
url('fontello.eot#iefix') format('embedded-opentype'),
|
||||
url('fontello.woff2') format('woff2'),
|
||||
url('fontello.woff') format('woff'),
|
||||
url('fontello.ttf') format('truetype'),
|
||||
url('fontello.svg#fontello') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal
|
||||
}
|
||||
@ -17,7 +17,7 @@
|
||||
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
||||
@font-face {
|
||||
font-family: 'fontello';
|
||||
src: url('fontello.svg?iDzQ0dov5j#fontello') format('svg');
|
||||
src: url('fontello.svg#fontello') format('svg');
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"1": "1568894228",
|
||||
"1": "1568900156",
|
||||
"2": "1568894058",
|
||||
"3": "1568894058",
|
||||
"4": "1568894058"
|
||||
"4": "1568894058",
|
||||
"5": "1568894058"
|
||||
}
|
94
yarn.lock
94
yarn.lock
@ -703,6 +703,11 @@ binary-extensions@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65"
|
||||
integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==
|
||||
|
||||
binaryextensions@2:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/binaryextensions/-/binaryextensions-2.1.2.tgz#c83c3d74233ba7674e4f313cb2a2b70f54e94b7c"
|
||||
integrity sha512-xVNN69YGDghOqCCtA6FI7avYrr02mTJjOgB0/f1VPD3pJC8QEvjTKWc4epDx8AqxxA75NI0QpVM2gPJXUbE4Tg==
|
||||
|
||||
bl@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/bl/-/bl-3.0.0.tgz#3611ec00579fd18561754360b21e9f784500ff88"
|
||||
@ -1562,12 +1567,12 @@ decode-uri-component@^0.2.0:
|
||||
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
|
||||
integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=
|
||||
|
||||
decompress-response@^3.3.0:
|
||||
version "3.3.0"
|
||||
resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3"
|
||||
integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=
|
||||
decompress-response@^4.2.0:
|
||||
version "4.2.1"
|
||||
resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-4.2.1.tgz#414023cc7a302da25ce2ec82d0d5238ccafd8986"
|
||||
integrity sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==
|
||||
dependencies:
|
||||
mimic-response "^1.0.0"
|
||||
mimic-response "^2.0.0"
|
||||
|
||||
deep-extend@^0.6.0:
|
||||
version "0.6.0"
|
||||
@ -1802,15 +1807,20 @@ ecc-jsbn@~0.1.1:
|
||||
jsbn "~0.1.0"
|
||||
safer-buffer "^2.1.0"
|
||||
|
||||
editions@^1.3.3:
|
||||
version "1.3.4"
|
||||
resolved "https://registry.yarnpkg.com/editions/-/editions-1.3.4.tgz#3662cb592347c3168eb8e498a0ff73271d67f50b"
|
||||
integrity sha512-gzao+mxnYDzIysXKMQi/+M1mjy/rjestjg6OPoYTtI+3Izp23oiGZitsl9lPDPiTGXbcSIk1iJWhliSaglxnUg==
|
||||
|
||||
ee-first@1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
|
||||
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
|
||||
|
||||
electron-to-chromium@^1.3.247:
|
||||
version "1.3.260"
|
||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.260.tgz#ffd686b4810bab0e1a428e7af5f08c21fe7c1fa2"
|
||||
integrity sha512-wGt+OivF1C1MPwaSv3LJ96ebNbLAWlx3HndivDDWqwIVSQxmhL17Y/YmwUdEMtS/bPyommELt47Dct0/VZNQBQ==
|
||||
version "1.3.262"
|
||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.262.tgz#8022933e46e5a2c7b0fd1565d215872326520a7c"
|
||||
integrity sha512-YFr53qZWr2pWkiTUorWEhAweujdf0ALiUp8VkNa0WGtbMVR+kZ8jNy3VTCemLsA4sT6+srCqehNn8TEAD0Ngrw==
|
||||
|
||||
emoji-regex@^7.0.1:
|
||||
version "7.0.3"
|
||||
@ -1917,7 +1927,7 @@ escape-html@~1.0.3:
|
||||
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
|
||||
integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=
|
||||
|
||||
escape-string-regexp@^1.0.5:
|
||||
escape-string-regexp@^1.0.3, escape-string-regexp@^1.0.5:
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
|
||||
integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
|
||||
@ -2863,6 +2873,15 @@ gulp-postcss@^8.0.0:
|
||||
postcss-load-config "^2.0.0"
|
||||
vinyl-sourcemaps-apply "^0.2.1"
|
||||
|
||||
gulp-replace@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/gulp-replace/-/gulp-replace-1.0.0.tgz#b32bd61654d97b8d78430a67b3e8ce067b7c9143"
|
||||
integrity sha512-lgdmrFSI1SdhNMXZQbrC75MOl1UjYWlOWNbNRnz+F/KHmgxt3l6XstBoAYIdadwETFyG/6i+vWUSCawdC3pqOw==
|
||||
dependencies:
|
||||
istextorbinary "2.2.1"
|
||||
readable-stream "^2.0.1"
|
||||
replacestream "^4.0.0"
|
||||
|
||||
gulp-sourcemaps@^2.6.5:
|
||||
version "2.6.5"
|
||||
resolved "https://registry.yarnpkg.com/gulp-sourcemaps/-/gulp-sourcemaps-2.6.5.tgz#a3f002d87346d2c0f3aec36af7eb873f23de8ae6"
|
||||
@ -3662,6 +3681,15 @@ isstream@~0.1.2:
|
||||
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
|
||||
integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=
|
||||
|
||||
istextorbinary@2.2.1:
|
||||
version "2.2.1"
|
||||
resolved "https://registry.yarnpkg.com/istextorbinary/-/istextorbinary-2.2.1.tgz#a5231a08ef6dd22b268d0895084cf8d58b5bec53"
|
||||
integrity sha512-TS+hoFl8Z5FAFMK38nhBkdLt44CclNRgDHWeMgsV8ko3nDlr/9UI2Sf839sW7enijf8oKsZYXRvM8g0it9Zmcw==
|
||||
dependencies:
|
||||
binaryextensions "2"
|
||||
editions "^1.3.3"
|
||||
textextensions "2"
|
||||
|
||||
js-tokens@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
|
||||
@ -4183,10 +4211,10 @@ mimic-fn@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022"
|
||||
integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==
|
||||
|
||||
mimic-response@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b"
|
||||
integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==
|
||||
mimic-response@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-2.0.0.tgz#996a51c60adf12cb8a87d7fb8ef24c2f3d5ebb46"
|
||||
integrity sha512-8ilDoEapqA4uQ3TwS0jakGONKXVJqpy+RpM+3b7pLdOjghCrEiGp9SRkFbUHAmZW9vdnrENWHjaweIoTIJExSQ==
|
||||
|
||||
minimatch@^3.0.3, minimatch@^3.0.4:
|
||||
version "3.0.4"
|
||||
@ -4218,10 +4246,10 @@ minimist@^1.2.0:
|
||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
|
||||
integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=
|
||||
|
||||
minipass@^2.2.1, minipass@^2.3.5, minipass@^2.6.0:
|
||||
version "2.6.2"
|
||||
resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.6.2.tgz#c3075a22680b3b1479bae5915904cb1eba50f5c0"
|
||||
integrity sha512-38Jwdc8AttUDaQAIRX8Iaw3QoCDWjAwKMGeGDF9JUi9QCPMjH5qAQg/hdO8o1nC7Nmh1/CqzMg5FQPEKuKwznQ==
|
||||
minipass@^2.2.1, minipass@^2.6.0, minipass@^2.6.4:
|
||||
version "2.6.5"
|
||||
resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.6.5.tgz#1c245f9f2897f70fd4a219066261ce6c29f80b18"
|
||||
integrity sha512-ewSKOPFH9blOLXx0YSE+mbrNMBFPS+11a2b03QZ+P4LVrUHW/GAlqeYC7DBknDyMWkHzrzTpDhUvy7MUxqyrPA==
|
||||
dependencies:
|
||||
safe-buffer "^5.1.2"
|
||||
yallist "^3.0.0"
|
||||
@ -4547,7 +4575,7 @@ oauth-sign@~0.9.0:
|
||||
resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455"
|
||||
integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==
|
||||
|
||||
object-assign@4.X, object-assign@^4.1.0, object-assign@^4.1.1:
|
||||
object-assign@4.X, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
|
||||
integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=
|
||||
@ -6022,6 +6050,15 @@ replace-homedir@^1.0.0:
|
||||
is-absolute "^1.0.0"
|
||||
remove-trailing-separator "^1.1.0"
|
||||
|
||||
replacestream@^4.0.0:
|
||||
version "4.0.3"
|
||||
resolved "https://registry.yarnpkg.com/replacestream/-/replacestream-4.0.3.tgz#3ee5798092be364b1cdb1484308492cb3dff2f36"
|
||||
integrity sha512-AC0FiLS352pBBiZhd4VXB1Ab/lh0lEgpP+GGvZqbQh8a5cmXVoTe5EX/YeTFArnp4SRGTHh1qCHu9lGs1qG8sA==
|
||||
dependencies:
|
||||
escape-string-regexp "^1.0.3"
|
||||
object-assign "^4.0.1"
|
||||
readable-stream "^2.0.2"
|
||||
|
||||
request@^2.87.0:
|
||||
version "2.88.0"
|
||||
resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef"
|
||||
@ -6311,11 +6348,11 @@ simple-concat@^1.0.0:
|
||||
integrity sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=
|
||||
|
||||
simple-get@^3.0.3:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-3.0.3.tgz#924528ac3f9d7718ce5e9ec1b1a69c0be4d62efa"
|
||||
integrity sha512-Wvre/Jq5vgoz31Z9stYWPLn0PqRqmBDpFSdypAnHu5AvRVCYPRYGnvryNLiXu8GOBNDH82J2FRHUGMjjHUpXFw==
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-3.1.0.tgz#b45be062435e50d159540b576202ceec40b9c6b3"
|
||||
integrity sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==
|
||||
dependencies:
|
||||
decompress-response "^3.3.0"
|
||||
decompress-response "^4.2.0"
|
||||
once "^1.3.1"
|
||||
simple-concat "^1.0.0"
|
||||
|
||||
@ -6837,13 +6874,13 @@ tar-stream@^2.0.0:
|
||||
readable-stream "^3.1.1"
|
||||
|
||||
tar@^4, tar@^4.4.10:
|
||||
version "4.4.10"
|
||||
resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.10.tgz#946b2810b9a5e0b26140cf78bea6b0b0d689eba1"
|
||||
integrity sha512-g2SVs5QIxvo6OLp0GudTqEf05maawKUxXru104iaayWA09551tFCTI8f1Asb4lPfkBr91k07iL4c11XO3/b0tA==
|
||||
version "4.4.11"
|
||||
resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.11.tgz#7ac09801445a3cf74445ed27499136b5240ffb73"
|
||||
integrity sha512-iI4zh3ktLJKaDNZKZc+fUONiQrSn9HkCFzamtb7k8FFmVilHVob7QsLX/VySAW8lAviMzMbFw4QtFb4errwgYA==
|
||||
dependencies:
|
||||
chownr "^1.1.1"
|
||||
fs-minipass "^1.2.5"
|
||||
minipass "^2.3.5"
|
||||
minipass "^2.6.4"
|
||||
minizlib "^1.2.1"
|
||||
mkdirp "^0.5.0"
|
||||
safe-buffer "^5.1.2"
|
||||
@ -6885,6 +6922,11 @@ text-table@^0.2.0:
|
||||
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
|
||||
integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=
|
||||
|
||||
textextensions@2:
|
||||
version "2.5.0"
|
||||
resolved "https://registry.yarnpkg.com/textextensions/-/textextensions-2.5.0.tgz#e21d3831dafa37513dd80666dff541414e314293"
|
||||
integrity sha512-1IkVr355eHcomgK7fgj1Xsokturx6L5S2JRT5WcRdA6v5shk9sxWuO/w/VbpQexwkXJMQIa/j1dBi3oo7+HhcA==
|
||||
|
||||
through2-filter@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-3.0.0.tgz#700e786df2367c2c88cd8aa5be4cf9c1e7831254"
|
||||
|
Loading…
Reference in New Issue
Block a user