Skip to content

Commit

Permalink
Merge pull request #10 from Patternslib/webpack5
Browse files Browse the repository at this point in the history
Webpack5
  • Loading branch information
thet authored Nov 17, 2021
2 parents 3c641a4 + c2d193f commit 8becf21
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 97 deletions.
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
dist/
.DS_Store
node_modules
.env
dist/
node_modules/
stamp-yarn
stats.json
yarn-error.log
yarn.lock
1 change: 1 addition & 0 deletions .release-it.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("@patternslib/patternslib/.release-it.js");
36 changes: 0 additions & 36 deletions .release-it.json

This file was deleted.

15 changes: 12 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
-include .env
export

ESLINT ?= npx eslint
YARN ?= npx yarn

Expand Down Expand Up @@ -36,19 +39,25 @@ bundle: stamp-yarn
.PHONY: release-major
release-major: check
npx release-it major --dry-run --ci && \
npx release-it major --ci
npx release-it major --ci && \
npx release-it --github.release --github.update --no-github.draft --no-increment --no-git --no-npm --ci && \
git checkout CHANGES.md


.PHONY: release-minor
release-minor: check
npx release-it minor --dry-run --ci && \
npx release-it minor --ci
npx release-it minor --ci && \
npx release-it --github.release --github.update --no-github.draft --no-increment --no-git --no-npm --ci && \
git checkout CHANGES.md


.PHONY: release-patch
release-patch: check
npx release-it patch --dry-run --ci && \
npx release-it patch --ci
npx release-it patch --ci && \
npx release-it --github.release --github.update --no-github.draft --no-increment --no-git --no-npm --ci && \
git checkout CHANGES.md


.PHONY: serve
Expand Down
13 changes: 1 addition & 12 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
module.exports = {
presets: [
[
"@babel/preset-env",
{
useBuiltIns: "entry",
corejs: 3,
},
],
],
plugins: ["@babel/plugin-proposal-optional-chaining"],
};
module.exports = require("@patternslib/patternslib/babel.config.js");
76 changes: 36 additions & 40 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,54 +5,50 @@
"license": "MIT",
"main": "./src/pat-content-mirror.js",
"dependencies": {
"@patternslib/patternslib": "^5.1.2"
"@patternslib/patternslib": "^6.0.1"
},
"devDependencies": {
"@babel/core": "^7.14.6",
"@babel/eslint-parser": "^7.14.5",
"@babel/plugin-proposal-optional-chaining": "^7.14.5",
"@babel/preset-env": "^7.14.5",
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"@release-it/conventional-changelog": "^3.0.1",
"@testing-library/jest-dom": "^5.14.1",
"babel-loader": "^8.2.2",
"clean-webpack-plugin": "^3.0.0",
"copy-webpack-plugin": "^6.4.1",
"core-js": "3.19.0",
"css-loader": "^5.2.6",
"duplicate-package-checker-webpack-plugin": "^3.0.0",
"eslint": "^7.28.0",
"@babel/core": "^7.16.0",
"@babel/eslint-parser": "^7.16.3",
"@babel/plugin-proposal-optional-chaining": "^7.16.0",
"@babel/preset-env": "^7.16.0",
"@commitlint/cli": "^15.0.0",
"@commitlint/config-conventional": "^15.0.0",
"@release-it/conventional-changelog": "^3.3.0",
"@testing-library/jest-dom": "^5.15.0",
"babel-loader": "^8.2.3",
"copy-webpack-plugin": "^10.0.0",
"core-js": "3.19.1",
"css-loader": "^6.5.0",
"eslint": "^8.2.0",
"eslint-config-prettier": "^8.3.0",
"expose-loader": "^1.0.3",
"file-loader": "^6.2.0",
"husky": "^6.0.0",
"expose-loader": "^3.0.0",
"husky": "^7.0.4",
"identity-obj-proxy": "^3.0.0",
"imports-loader": "^1.2.0",
"jest": "^27.0.4",
"jest-watch-typeahead": "^0.6.4",
"prettier": "^2.3.1",
"raw-loader": "^4.0.1",
"regenerator-runtime": "^0.13.5",
"release-it": "^14.9.0",
"sass": "^1.34.1",
"sass-loader": "^10.1.1",
"style-loader": "^2.0.0",
"svg-inline-loader": "^0.8.2",
"terser-webpack-plugin": "^4.2.3",
"webpack": "^4.43.0",
"webpack-bundle-analyzer": "^3.9.0",
"webpack-cli": "^4.7.0",
"webpack-dev-server": "^3.11.2",
"imports-loader": "^3.1.0",
"inspectpack": "^4.7.1",
"jest": "^27.3.1",
"jest-watch-typeahead": "^1.0.0",
"prettier": "^2.4.1",
"regenerator-runtime": "^0.13.9",
"release-it": "^14.11.7",
"sass": "^1.43.4",
"sass-loader": "^12.3.0",
"style-loader": "^3.3.0",
"terser-webpack-plugin": "^5.2.5",
"timezone-mock": "^1.2.2",
"webpack": "^5.64.1",
"webpack-bundle-analyzer": "^4.4.2",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "^4.5.0",
"webpack-modernizr-loader": "^5.0.0",
"whybundled": "^2.0.0",
"yarn": "^1.22.10"
"yarn": "^1.22.17"
},
"scripts": {
"start": "webpack serve --config webpack.config.js --mode=development",
"watch": "webpack --config webpack.config.js --watch --mode=development",
"build": "webpack --config webpack.config.js --mode=production",
"build:stats": "webpack --config webpack.config.js --mode=development --json > stats.json",
"start": "NODE_ENV=development webpack serve --config webpack.config.js",
"build": "NODE_ENV=production webpack --config webpack.config.js",
"build:stats": "NODE_ENV=production webpack --config webpack.config.js --json > stats.json",
"test": "jest"
},
"browserslist": {
Expand Down
10 changes: 6 additions & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ const path = require("path");
const patternslib_config = require("@patternslib/patternslib/webpack/webpack.config.js");

module.exports = async (env, argv) => {
const config = patternslib_config(env, argv);

config.entry = {
bundle: path.resolve(__dirname, "bundle-config.js"),
let config = {
entry: {
bundle: path.resolve(__dirname, "bundle-config.js"),
},
};

config = patternslib_config(env, argv, config);
config.output.path = path.resolve(__dirname, "dist/");

return config;
Expand Down

0 comments on commit 8becf21

Please sign in to comment.