Skip to content

Commit c3d0a72

Browse files
authored
Merge pull request #22 from Patternslib/depend-dev-new
Depend dev new
2 parents 11c31a8 + a516f9b commit c3d0a72

File tree

13 files changed

+78
-186
lines changed

13 files changed

+78
-186
lines changed

.commitlintrc.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

.eslintrc.js

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1 @@
1-
module.exports = {
2-
extends: ["eslint:recommended", "prettier"],
3-
root: true,
4-
env: {
5-
es6: "true",
6-
browser: true,
7-
node: true,
8-
jest: true,
9-
},
10-
parser: "@babel/eslint-parser",
11-
ignorePatterns: [],
12-
rules: {
13-
"no-debugger": 1,
14-
"no-duplicate-imports": 1,
15-
// Do keep due avoid unintendet consequences.
16-
"no-alert": 0,
17-
"no-control-regex": 0,
18-
"no-self-assign": 0,
19-
"no-useless-escape": 0,
20-
},
21-
globals: {
22-
spyOn: true, // eventually replace with jest.spyOn and then fix a ton of test failures.
23-
},
24-
};
1+
module.exports = require("@patternslib/dev/.eslintrc.js");

.github/workflows/test.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ jobs:
1111
name: test
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2
15-
- uses: actions/setup-node@v2
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-node@v3
1616
with:
17-
node-version: '14'
17+
node-version: '16'
1818
cache: 'yarn'
19-
- run: make check
19+
- run: |
20+
make install
21+
make check

.prettierrc.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

.release-it.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports = require("@patternslib/patternslib/.release-it.js");
1+
module.exports = require("@patternslib/dev/.release-it.js");

Makefile

Lines changed: 16 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,30 @@
1-
-include .env
2-
export
3-
4-
ESLINT ?= npx eslint
5-
YARN ?= npx yarn
6-
7-
8-
.PHONY: install
9-
stamp-yarn install:
10-
$(YARN) install
11-
# Install pre commit hook
12-
$(YARN) husky install
13-
touch stamp-yarn
14-
15-
16-
clean-dist:
17-
rm -Rf dist/
18-
19-
20-
.PHONY: clean
21-
clean: clean-dist
22-
rm -f stamp-yarn
23-
rm -Rf node_modules/
24-
25-
26-
eslint: stamp-yarn
27-
$(ESLINT) ./src
28-
29-
30-
.PHONY: check
31-
check:: stamp-yarn eslint
32-
$(YARN) run test
33-
34-
35-
.PHONY: bundle
36-
bundle: stamp-yarn
37-
$(YARN) run build
1+
##############
2+
## Please note
3+
##############
384

5+
# First, run ``make install``.
6+
# After that you have through Makefile extension all the other base targets available.
397

408
# If you want to release on GitHub, make sure to have a .env file with a GITHUB_TOKEN.
419
# Also see:
4210
# https://github.com/settings/tokens
4311
# and https://github.com/release-it/release-it/blob/master/docs/github-releases.md#automated
4412

4513

46-
release-zip: clean-dist bundle
47-
$(eval PACKAGE_NAME := $(subst @patternslib/,,$(shell node -p "require('./package.json').name")))
48-
$(eval PACKAGE_VERSION := $(shell node -p "require('./package.json').version"))
49-
@echo name is $(PACKAGE_NAME)
50-
@echo version is $(PACKAGE_VERSION)
51-
mkdir -p dist/$(PACKAGE_NAME)-bundle-$(PACKAGE_VERSION)
52-
-mv dist/* dist/$(PACKAGE_NAME)-bundle-$(PACKAGE_VERSION)
53-
cd dist/ && zip -r $(PACKAGE_NAME)-bundle-$(PACKAGE_VERSION).zip $(PACKAGE_NAME)-bundle-$(PACKAGE_VERSION)/
54-
55-
56-
.PHONY: release-major
57-
release-major: check
58-
npx release-it major && \
59-
make release-zip && \
60-
npx release-it --github.release --github.update --github.assets=dist/*.zip --no-github.draft --no-increment --no-git --no-npm && \
61-
git checkout CHANGES.md
62-
63-
.PHONY: release-minor
64-
release-minor: check
65-
npx release-it minor && \
66-
make release-zip && \
67-
npx release-it --github.release --github.update --github.assets=dist/*.zip --no-github.draft --no-increment --no-git --no-npm && \
68-
git checkout CHANGES.md
69-
70-
.PHONY: release-patch
71-
release-patch: check
72-
npx release-it patch && \
73-
make release-zip && \
74-
npx release-it --github.release --github.update --github.assets=dist/*.zip --no-github.draft --no-increment --no-git --no-npm && \
75-
git checkout CHANGES.md
14+
# Include base Makefile
15+
-include node_modules/@patternslib/dev/Makefile
7616

77-
.PHONY: prerelease-alpha
78-
prerelease-alpha: clean install
79-
npx release-it --preRelease=alpha && \
80-
make release-zip && \
81-
npx release-it --github.release --github.update --github.assets=dist/*.zip --no-github.draft --no-increment --no-git --no-npm && \
82-
git checkout CHANGES.md
83-
84-
.PHONY: prerelease-beta
85-
prerelease-beta: clean install
86-
npx release-it --preRelease=beta && \
87-
make release-zip && \
88-
npx release-it --github.release --github.update --github.assets=dist/*.zip --no-github.draft --no-increment --no-git --no-npm && \
89-
git checkout CHANGES.md
17+
# Define the GITHUB_TOKEN in the .env file for usage with release-it.
18+
-include .env
19+
export
9020

9121

92-
.PHONY: serve
93-
serve:: stamp-yarn
94-
$(YARN) run start
22+
.PHONY: install
23+
stamp-yarn install:
24+
npx yarn install
25+
# Install pre commit hook
26+
npx yarn husky install
27+
touch stamp-yarn
9528

9629

9730
#

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports = require("@patternslib/patternslib/babel.config.js");
1+
module.exports = require("@patternslib/dev/babel.config.js");

commitlint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require("@patternslib/dev/commitlint.config.js");

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports = require("@patternslib/patternslib/jest.config.js");
1+
module.exports = require("@patternslib/dev/jest.config.js");

package.json

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -20,39 +20,7 @@
2020
"@patternslib/patternslib": "*"
2121
},
2222
"devDependencies": {
23-
"@babel/core": "^7.18.5",
24-
"@babel/eslint-parser": "^7.18.2",
25-
"@babel/preset-env": "^7.18.2",
26-
"@commitlint/cli": "^17.0.2",
27-
"@commitlint/config-conventional": "^17.0.2",
28-
"@patternslib/patternslib": "^9.0.0-alpha.0",
29-
"@release-it/conventional-changelog": "^5.0.0",
30-
"babel-loader": "^8.2.5",
31-
"copy-webpack-plugin": "^11.0.0",
32-
"core-js": "3.22.8",
33-
"css-loader": "^6.7.1",
34-
"eslint": "^8.17.0",
35-
"eslint-config-prettier": "^8.5.0",
36-
"husky": "^8.0.1",
37-
"identity-obj-proxy": "^3.0.0",
38-
"imports-loader": "^4.0.0",
39-
"jest": "^28.1.1",
40-
"jest-environment-jsdom": "^28.1.1",
41-
"jest-watch-typeahead": "^1.1.0",
42-
"prettier": "^2.6.2",
43-
"regenerator-runtime": "^0.13.9",
44-
"release-it": "^15.0.0",
45-
"sass": "^1.52.3",
46-
"sass-loader": "^13.0.0",
47-
"style-loader": "^3.3.0",
48-
"terser-webpack-plugin": "^5.3.3",
49-
"timezone-mock": "^1.3.2",
50-
"webpack": "^5.73.0",
51-
"webpack-bundle-analyzer": "^4.4.2",
52-
"webpack-cli": "^4.10.0",
53-
"webpack-dev-server": "^4.9.2",
54-
"whybundled": "^2.0.0",
55-
"yarn": "^1.22.19"
23+
"@patternslib/dev": "^2.0.0"
5624
},
5725
"scripts": {
5826
"start": "NODE_ENV=development webpack serve --config webpack.config.js",

0 commit comments

Comments
 (0)