Skip to content

Commit

Permalink
Upgrade dependencies and build tweaks
Browse files Browse the repository at this point in the history
Fixes #148, fixes #150, fixes #151, fixes #157, fixes #163
  • Loading branch information
kepi committed Mar 22, 2021
1 parent 263a76d commit c8e6c1a
Show file tree
Hide file tree
Showing 6 changed files with 2,306 additions and 3,141 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ inc/jPicker/images/Thumbs.db
dist
node_modules
yarn-error.log
.log/*
.log/*
size-plugin.json
42 changes: 21 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
"main": "index.js",
"scripts": {
"watch": "rimraf dist && webpack --config webpack/webpack.dev.js --watch",
"build": "webpack --config webpack/webpack.prod.js",
"build-dev": "webpack --config webpack/webpack.dev.js",
"build:prod": "webpack --config webpack/webpack.prod.js",
"build:dev": "webpack --config webpack/webpack.dev.js",
"clean": "rimraf dist",
"zip": "unlink ../archives/EyeDropper_${npm_package_version}.zip; cd dist && bestzip ../../archives/EyeDropper_${npm_package_version}.zip *",
"zip-dev": "unlink ../archives/EyeDropper_${npm_package_version}_dev.zip; cd dist && bestzip ../../archives/EyeDropper_${npm_package_version}_dev.zip *",
"zip:prod": "unlink ../archives/EyeDropper_${npm_package_version}.zip; cd dist && bestzip ../../archives/EyeDropper_${npm_package_version}.zip *",
"zip:dev": "unlink ../archives/EyeDropper_${npm_package_version}_dev.zip; cd dist && bestzip ../../archives/EyeDropper_${npm_package_version}_dev.zip *",
"test": "jest",
"deploy": "yarn run clean && yarn run test && yarn run build && yarn run zip",
"deploy-dev": "yarn run clean && yarn run test && yarn run build-dev && yarn run zip-dev"
"deploy:prod": "yarn run clean && yarn run test && yarn run build:prod && yarn run zip:prod",
"deploy:dev": "yarn run clean && yarn run test && yarn run build:dev && yarn run zip:dev"
},
"author": "Ondra Kudlík (Kepi)",
"license": "MIT",
Expand All @@ -21,26 +21,26 @@
"url": "https://github.com/kepi/chromeEyeDropper.git"
},
"devDependencies": {
"@types/chrome": "0.0.104",
"@types/jest": "^25.2.1",
"@types/chrome": "0.0.133",
"@types/jest": "^26.0.21",
"@types/jquery": "^3.3.35",
"@typescript-eslint/eslint-plugin": "^2.28.0",
"@typescript-eslint/parser": "^2.28.0",
"@typescript-eslint/eslint-plugin": "^4.18.0",
"@typescript-eslint/parser": "^4.18.0",
"bestzip": "^2.1.5",
"copy-webpack-plugin": "^5.1.1",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.1",
"copy-webpack-plugin": "^8.0.0",
"eslint": "^7.22.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-prettier": "^3.1.3",
"jest": "^25.4.0",
"jest": "^26.6.3",
"prettier": "^2.0.4",
"replace-in-file-webpack-plugin": "^1.0.6",
"rimraf": "^3.0.2",
"terser-webpack-plugin": "^3.0.1",
"ts-jest": "^25.4.0",
"ts-loader": "^7.0.0",
"typescript": "^3.8.3",
"webpack": "^4.42.1",
"webpack-cli": "^3.3.11",
"webpack-merge": "^4.2.2"
"size-plugin": "^2.0.2",
"ts-jest": "^26.5.4",
"ts-loader": "^8.0.18",
"typescript": "^4.2.3",
"webpack": "^5.27.1",
"webpack-cli": "^4.5.0",
"webpack-merge": "^5.7.3"
}
}
7 changes: 6 additions & 1 deletion webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const webpack = require('webpack')
const path = require('path')
const CopyPlugin = require('copy-webpack-plugin')
const ReplaceInFileWebpackPlugin = require('replace-in-file-webpack-plugin')
const SizePlugin = require('size-plugin')
const srcDir = '../src/'

module.exports = {
Expand Down Expand Up @@ -36,9 +37,13 @@ module.exports = {
extensions: ['.ts', '.tsx', '.js'],
},
plugins: [
new SizePlugin(),
// exclude locale files in moment
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
new CopyPlugin([{ from: '.', to: '../' }], { context: 'public' }),
new CopyPlugin({
patterns: [{ from: '.', to: '../', context: 'public/' }],
}),

new ReplaceInFileWebpackPlugin([
{
dir: 'dist',
Expand Down
2 changes: 1 addition & 1 deletion webpack/webpack.dev.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const merge = require('webpack-merge')
const { merge } = require('webpack-merge')
const common = require('./webpack.common.js')
const webpack = require('webpack')

Expand Down
3 changes: 1 addition & 2 deletions webpack/webpack.prod.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const merge = require('webpack-merge')
const { merge } = require('webpack-merge')
const common = require('./webpack.common.js')
const webpack = require('webpack')
const TerserPlugin = require('terser-webpack-plugin')
Expand All @@ -16,7 +16,6 @@ module.exports = merge(common, {
new TerserPlugin({
extractComments: true,
terserOptions: {
extractComments: 'all',
compress: {
drop_console: true,
},
Expand Down
Loading

0 comments on commit c8e6c1a

Please sign in to comment.