Skip to content

Commit a4fa573

Browse files
authored
Merge pull request #11 from Patternslib/depend-dev
Depend dev
2 parents b23cc23 + 0bf2b95 commit a4fa573

18 files changed

+10160
-177
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: 7 additions & 5 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@v1
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-node@v3
1616
with:
17-
node-version: '14'
18-
- run: npm install yarn
19-
- run: make check
17+
node-version: '16'
18+
cache: 'yarn'
19+
- run: |
20+
make install
21+
make check

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ node_modules/
55
stamp-yarn
66
stats.json
77
yarn-error.log
8-
yarn.lock

.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: 20 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,30 @@
1-
-include .env
2-
export
3-
4-
ESLINT ?= npx eslint
5-
YARN ?= npx yarn
6-
7-
8-
stamp-yarn:
9-
$(YARN) install
10-
# Install pre commit hook
11-
$(YARN) husky install
12-
touch stamp-yarn
13-
14-
15-
clean-dist:
16-
rm -Rf dist/
17-
18-
19-
.PHONY: clean
20-
clean: clean-dist
21-
rm -f stamp-yarn
22-
rm -Rf node_modules/
1+
##############
2+
## Please note
3+
##############
234

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

25-
eslint: stamp-yarn
26-
$(ESLINT) ./src
8+
# If you want to release on GitHub, make sure to have a .env file with a GITHUB_TOKEN.
9+
# Also see:
10+
# https://github.com/settings/tokens
11+
# and https://github.com/release-it/release-it/blob/master/docs/github-releases.md#automated
2712

2813

29-
.PHONY: check
30-
check:: stamp-yarn eslint
31-
$(YARN) run test
14+
# Include base Makefile
15+
-include node_modules/@patternslib/dev/Makefile
3216

33-
34-
.PHONY: bundle
35-
bundle: stamp-yarn
36-
$(YARN) run build
37-
38-
39-
.PHONY: release-major
40-
release-major: check
41-
npx release-it major --dry-run --ci && \
42-
npx release-it major --ci && \
43-
npx release-it --github.release --github.update --no-github.draft --no-increment --no-git --no-npm --ci && \
44-
git checkout CHANGES.md
45-
46-
47-
.PHONY: release-minor
48-
release-minor: check
49-
npx release-it minor --dry-run --ci && \
50-
npx release-it minor --ci && \
51-
npx release-it --github.release --github.update --no-github.draft --no-increment --no-git --no-npm --ci && \
52-
git checkout CHANGES.md
53-
54-
55-
.PHONY: release-patch
56-
release-patch: check
57-
npx release-it patch --dry-run --ci && \
58-
npx release-it patch --ci && \
59-
npx release-it --github.release --github.update --no-github.draft --no-increment --no-git --no-npm --ci && \
60-
git checkout CHANGES.md
17+
# Define the GITHUB_TOKEN in the .env file for usage with release-it.
18+
-include .env
19+
export
6120

6221

63-
.PHONY: serve
64-
serve:: stamp-yarn
65-
$(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
6628

6729

6830
#

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");

index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Webpack entry point for module federation.
2+
import "@patternslib/patternslib/webpack/module_federation";
3+
// The next import needs to be kept with brackets, otherwise we get this error:
4+
// "Shared module is not available for eager consumption."
5+
import("./bundle-config");

0 commit comments

Comments
 (0)