chore: update dependencies

pull/113/head
dessant 5 years ago
parent 83f1263a60
commit 3e42f6188f

@ -1 +1 @@
8.11.3
10.15.3

@ -4,7 +4,6 @@ const {lstatSync, readdirSync, readFileSync, writeFileSync} = require('fs');
const {ensureDirSync} = require('fs-extra');
const gulp = require('gulp');
const gulpSeq = require('gulp-sequence');
const htmlmin = require('gulp-htmlmin');
const svgmin = require('gulp-svgmin');
const babel = require('gulp-babel');
@ -15,7 +14,6 @@ const jsonMerge = require('gulp-merge-json');
const jsonmin = require('gulp-jsonmin');
const svg2png = require('svg2png');
const imagemin = require('gulp-imagemin');
const dedent = require('dedent');
const targetEnv = process.env.TARGET_ENV || 'firefox';
const isProduction = process.env.NODE_ENV === 'production';
@ -37,32 +35,35 @@ gulp.task('js:webpack', function(done) {
});
});
gulp.task('js:babel', function() {
return gulp
gulp.task('js:babel', function(done) {
gulp
.src(['src/content/**/*.js'], {base: '.'})
.pipe(babel())
.pipe(gulp.dest(distDir));
done();
});
gulp.task('js', ['js:webpack', 'js:babel']);
gulp.task('js', gulp.parallel('js:webpack', 'js:babel'));
gulp.task('html', function() {
return gulp
gulp.task('html', function(done) {
gulp
.src('src/**/*.html', {base: '.'})
.pipe(gulpif(isProduction, htmlmin({collapseWhitespace: true})))
.pipe(gulp.dest(distDir));
done();
});
gulp.task('css', function() {
return gulp
gulp.task('css', function(done) {
gulp
.src(['src/solve/style.css'], {
base: '.'
})
.pipe(postcss())
.pipe(gulp.dest(distDir));
done();
});
gulp.task('icons', async function() {
gulp.task('icons', async function(done) {
ensureDirSync(`${distDir}/src/icons/app`);
const iconSvg = readFileSync('src/icons/app/icon.svg');
const appIconSizes = [16, 19, 24, 32, 38, 48, 64, 96, 128];
@ -75,16 +76,17 @@ gulp.task('icons', async function() {
gulp
.src(`${distDir}/src/icons/**/*.png`, {base: '.'})
.pipe(imagemin())
.pipe(gulp.dest(''));
.pipe(gulp.dest('.'));
}
gulp
.src('node_modules/ext-contribute/src/assets/*.svg')
.pipe(gulpif(isProduction, svgmin()))
.pipe(gulp.dest(`${distDir}/src/contribute/assets`));
done();
});
gulp.task('fonts', function() {
gulp.task('fonts', function(done) {
gulp
.src('src/fonts/roboto.css', {base: '.'})
.pipe(postcss())
@ -92,9 +94,10 @@ gulp.task('fonts', function() {
gulp
.src('node_modules/typeface-roboto/files/roboto-latin-@(400|500|700).woff2')
.pipe(gulp.dest(`${distDir}/src/fonts/files`));
done();
});
gulp.task('locale', function() {
gulp.task('locale', function(done) {
const localesRootDir = path.join(__dirname, 'src/_locales');
const localeDirs = readdirSync(localesRootDir).filter(function(file) {
return lstatSync(path.join(localesRootDir, file)).isDirectory();
@ -102,10 +105,13 @@ gulp.task('locale', function() {
localeDirs.forEach(function(localeDir) {
const localePath = path.join(localesRootDir, localeDir);
gulp
.src([
path.join(localePath, 'messages.json'),
path.join(localePath, `messages-${targetEnv}.json`)
])
.src(
[
path.join(localePath, 'messages.json'),
path.join(localePath, `messages-${targetEnv}.json`)
],
{allowEmpty: true}
)
.pipe(
jsonMerge({
fileName: 'messages.json',
@ -124,10 +130,11 @@ gulp.task('locale', function() {
.pipe(gulpif(isProduction, jsonmin()))
.pipe(gulp.dest(path.join(distDir, '_locales', localeDir)));
});
done();
});
gulp.task('manifest', function() {
return gulp
gulp.task('manifest', function(done) {
gulp
.src('src/manifest.json')
.pipe(
jsonMerge({
@ -157,38 +164,49 @@ gulp.task('manifest', function() {
)
.pipe(gulpif(isProduction, jsonmin()))
.pipe(gulp.dest(distDir));
done();
});
gulp.task('license', function() {
gulp.task('license', function(done) {
let year = 2018;
const currentYear = new Date().getFullYear();
if (year !== currentYear) {
year = `${year}-${currentYear}`;
}
const notice = dedent`
Buster: Captcha Solver for Humans
Copyright (c) ${year} Armin Sebastian
const notice = `Buster: Captcha Solver for Humans
Copyright (c) ${year} Armin Sebastian
This software is released under the terms of the GNU General Public License v3.0.
See the LICENSE file for further information.
`;
This software is released under the terms of the GNU General Public License v3.0.
See the LICENSE file for further information.
`;
writeFileSync(`${distDir}/NOTICE`, notice);
gulp.src(['LICENSE']).pipe(gulp.dest(distDir));
done();
});
gulp.task('copy', function() {
gulp.task('copy', function(done) {
gulp
.src('node_modules/ext-contribute/src/assets/*.@(jpg|png)')
.pipe(gulp.dest(`${distDir}/src/contribute/assets`));
done();
});
gulp.task(
'build',
gulpSeq(
gulp.series(
'clean',
['js', 'html', 'css', 'icons', 'fonts', 'locale', 'manifest', 'license'],
gulp.parallel(
'js',
'html',
'css',
'icons',
'fonts',
'locale',
'manifest',
'license'
),
'copy'
)
);
@ -215,4 +233,4 @@ gulp.task('inspect', function(done) {
);
});
gulp.task('default', ['build']);
gulp.task('default', gulp.series('build'));

@ -25,9 +25,9 @@
"exec": "run-s build:firefox start",
"exec:prod": "run-s build:prod:firefox start",
"inspect": "cross-env NODE_ENV=production gulp inspect",
"update": "ncu --upgrade --upgradeAll && yarn",
"update": "ncu --upgrade && yarn",
"push": "git push --follow-tags origin master",
"release": "standard-version && yarn push"
"release": "standard-version"
},
"browserslist": [
"Chrome >= 55",
@ -36,60 +36,58 @@
"Opera >= 42"
],
"dependencies": {
"@material/theme": "^0.30.0",
"@material/typography": "^0.28.0",
"@material/theme": "^1.1.0",
"@material/typography": "^1.0.0",
"audiobuffer-to-wav": "^1.0.0",
"bowser": "^2.1.0",
"ext-components": "dessant/ext-components#^0.1.6",
"ext-contribute": "dessant/ext-contribute#^0.1.6",
"storage-versions": "dessant/storage-versions#^0.2.4",
"bowser": "^2.4.0",
"ext-components": "dessant/ext-components#^0.2.1",
"ext-contribute": "dessant/ext-contribute#^0.2.1",
"storage-versions": "dessant/storage-versions#^0.2.5",
"typeface-roboto": "^0.0.54",
"uuid": "^3.3.2",
"vue": "^2.5.17",
"webextension-polyfill": "^0.3.1"
"vue": "^2.6.10",
"webextension-polyfill": "^0.4.0"
},
"devDependencies": {
"@babel/core": "^7.0.0-rc.1",
"@babel/preset-env": "^7.0.0-rc.1",
"autoprefixer": "^9.1.1",
"babel-loader": "^8.0.0-beta.4",
"@babel/core": "^7.4.5",
"@babel/preset-env": "^7.4.5",
"autoprefixer": "^9.5.1",
"babel-loader": "^8.0.6",
"babel-plugin-lodash": "^3.3.4",
"babel-preset-minify": "^0.4.3",
"babel-preset-minify": "^0.5.0",
"babel-preset-stage-0": "^6.24.1",
"cross-env": "^5.2.0",
"css-loader": "^1.0.0",
"cssnano": "^4.0.5",
"dedent": "^0.7.0",
"del": "^3.0.0",
"fs-extra": "^7.0.0",
"gulp": "^3.9.1",
"gulp-babel": "^8.0.0-beta.2",
"gulp-htmlmin": "^4.0.0",
"css-loader": "^2.1.1",
"cssnano": "^4.1.10",
"del": "^4.1.1",
"fs-extra": "^8.0.1",
"gulp": "^4.0.2",
"gulp-babel": "^8.0.0",
"gulp-htmlmin": "^5.0.1",
"gulp-if": "^2.0.2",
"gulp-imagemin": "^4.1.0",
"gulp-jsonmin": "^1.1.0",
"gulp-imagemin": "^5.0.3",
"gulp-jsonmin": "^1.2.0",
"gulp-merge-json": "^1.3.1",
"gulp-postcss": "^8.0.0",
"gulp-sequence": "^1.0.0",
"gulp-svgmin": "^1.2.4",
"gulp-svgmin": "^2.2.0",
"lodash-webpack-plugin": "^0.11.5",
"mini-css-extract-plugin": "^0.4.1",
"node-sass": "4.7.2",
"npm-check-updates": "^2.14.2",
"mini-css-extract-plugin": "^0.6.0",
"node-sass": "4.12.0",
"npm-check-updates": "^3.1.9",
"npm-run-all": "^4.1.5",
"postcss-loader": "^3.0.0",
"prettier": "^1.15.3",
"prettier": "^1.17.1",
"recursive-readdir": "^2.2.2",
"sass-loader": "^7.1.0",
"sharp": "^0.20.5",
"standard-version": "^4.4.0",
"sharp": "^0.22.1",
"standard-version": "^6.0.1",
"svg2png": "^4.1.1",
"vue-loader": "^15.3.0",
"vue-template-compiler": "^2.5.17",
"web-ext": "^2.8.0",
"webpack": "^4.16.5",
"webpack-bundle-analyzer": "^2.13.1",
"webpack-cli": "^3.1.0"
"vue-loader": "^15.7.0",
"vue-template-compiler": "^2.6.10",
"web-ext": "^3.0.0",
"webpack": "^4.32.2",
"webpack-bundle-analyzer": "^3.3.2",
"webpack-cli": "^3.3.2"
},
"private": true
}

@ -65,7 +65,7 @@
:label="getText('optionTitle_witSpeechApiLang')">
</v-select>
<v-button
:stroked="true"
:outlined="true"
:disabled="!witSpeechApiLang"
@click="addWitSpeechApi">
{{ getText('buttonText_addApi') }}
@ -304,11 +304,6 @@ body {
overflow: visible !important;
}
.mdc-select__menu {
top: 0 !important;
left: inherit !important;
}
.mdc-switch {
margin-right: 12px;
}
@ -321,15 +316,15 @@ body {
.section-title,
.section-desc {
@include mdc-theme-prop('color', 'text-primary-on-light');
@include mdc-theme-prop(color, text-primary-on-light);
}
.section-title {
@include mdc-typography('title');
@include mdc-typography(headline6);
}
.section-desc {
@include mdc-typography('body1');
@include mdc-typography(body2);
padding-top: 8px;
}
@ -354,12 +349,11 @@ body {
.wit-add-api {
display: flex;
align-items: center;
height: 56px;
}
.wit-add-api > button {
align-self: end;
margin-left: 36px;
margin-left: 24px;
white-space: nowrap;
}
.client-bownload {
@ -368,8 +362,8 @@ body {
.download-desc,
.download-error {
@include mdc-theme-prop('color', 'text-primary-on-light');
@include mdc-typography('body1');
@include mdc-theme-prop(color, text-primary-on-light);
@include mdc-typography(body2);
min-width: 300px;
}

@ -228,11 +228,11 @@ body {
.title,
.desc,
.manifest-desc {
@include mdc-theme-prop('color', 'text-primary-on-light');
@include mdc-theme-prop(color, text-primary-on-light);
}
.title {
@include mdc-typography('title');
@include mdc-typography(headline6);
margin-top: 48px;
}
@ -241,13 +241,13 @@ body {
}
.desc {
@include mdc-typography('body1');
@include mdc-typography(body2);
margin-top: 24px;
margin-bottom: 24px;
}
.manifest-desc {
@include mdc-typography('caption');
@include mdc-typography(caption);
margin-top: 12px;
margin-bottom: 4px;
}

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save