Skip to content

Commit 5545b65

Browse files
authored
build: Migrate to Packemon. (#23)
* Add dep. * Add dts. * Add workflow.
1 parent 808d46e commit 5545b65

File tree

7 files changed

+839
-58
lines changed

7 files changed

+839
-58
lines changed

.github/workflows/build.yml

+8
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,11 @@ jobs:
2222
# Our fake git commit system doesnt work in GH jobs
2323
# - run: yarn run jest
2424
- run: yarn run lint
25+
build:
26+
name: Build
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v2
30+
- uses: actions/setup-node@v2
31+
- run: yarn install --immutable
32+
- run: yarn run build

.gitignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ logs/
1010
.yarnclean
1111

1212
# Directories
13-
_book/
1413
coverage/
14+
dts/
1515
esm/
1616
lib/
1717
node_modules/
@@ -29,7 +29,6 @@ node_modules/
2929
babel.config.js
3030
jest.config.js
3131
prettier.config.js
32-
tsconfig.json
3332
webpack.config.js
3433

3534
# Yarn

.npmignore

-38
This file was deleted.

package.json

+17-4
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,25 @@
77
"beemo",
88
"preset"
99
],
10-
"main": "./index.js",
11-
"types": "./lib/index.d.ts",
10+
"main": "./lib/index.js",
11+
"types": "./dts/index.d.ts",
1212
"engines": {
13-
"node": ">=12.17.0"
13+
"node": ">=12.17.0",
14+
"npm": ">=6.13.0"
1415
},
1516
"repository": "https://github.com/beemojs/conventional-changelog-beemo",
1617
"author": "Miles Johnson",
1718
"license": "MIT",
19+
"files": [
20+
"dts/**/*.d.ts",
21+
"index.js",
22+
"lib/**/*.{js,map}",
23+
"src/**/*.{ts,tsx,json}",
24+
"templates/**/*"
25+
],
1826
"scripts": {
1927
"prepare": "beemo create-config",
20-
"build": "beemo typescript",
28+
"build": "packemon build --addEngines --declaration standard --declarationConfig tsconfig.build.json",
2129
"check": "yarn run type && yarn run test && yarn run lint",
2230
"coverage": "yarn run jest --coverage",
2331
"lint": "beemo eslint",
@@ -35,11 +43,16 @@
3543
"@types/shelljs": "^0.8.8",
3644
"conventional-changelog-core": "^4.2.2",
3745
"conventional-recommended-bump": "^6.1.0",
46+
"packemon": "^1.14.0",
3847
"shelljs": "^0.8.4"
3948
},
4049
"funding": {
4150
"type": "ko-fi",
4251
"url": "https://ko-fi.com/milesjohnson"
4352
},
53+
"packemon": {
54+
"format": "lib",
55+
"platform": "node"
56+
},
4457
"packageManager": "[email protected]"
4558
}

tsconfig.build.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "dts"
5+
},
6+
"include": ["src/**/*"]
7+
}

tsconfig.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"$schema": "https://json.schemastore.org/tsconfig",
3+
"display": "Beemo",
4+
"compilerOptions": {
5+
"allowJs": false,
6+
"allowSyntheticDefaultImports": true,
7+
"declaration": false,
8+
"esModuleInterop": true,
9+
"experimentalDecorators": false,
10+
"forceConsistentCasingInFileNames": true,
11+
"isolatedModules": true,
12+
"lib": [
13+
"esnext"
14+
],
15+
"module": "esnext",
16+
"moduleResolution": "node",
17+
"noEmitOnError": true,
18+
"noImplicitOverride": true,
19+
"noImplicitReturns": true,
20+
"pretty": true,
21+
"removeComments": false,
22+
"resolveJsonModule": false,
23+
"skipLibCheck": true,
24+
"sourceMap": false,
25+
"strict": true,
26+
"target": "es2020"
27+
}
28+
}

0 commit comments

Comments
 (0)