Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: use preconstruct for production building #59

Merged
merged 3 commits into from
May 17, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx multi-semantic-release
run: |
pnpm preconstruct build
npx multi-semantic-release
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ cross-package behavior, such as release automation.
**Releases and tags:** Github Actions uses [multi-semantic-release](https://github.com/dhoulb/multi-semantic-release) to automatically generate semvers based on commit history for each package in the repository. Multiple tags
are generated for a single commit if it updates multiple packages.

The packages are themselves distributed each from its own `dist/` folder, but
that folder is built by `preconstruct build` run in the workspace root at release time.

## Persistent URLs

Documentation: https://w3id.org/docmaps
Expand Down
6 changes: 6 additions & 0 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"presets": [
"@babel/preset-typescript",
"@babel/preset-env"
]
}
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@
"rdf-validate-shacl": "^0.4.5"
},
"devDependencies": {
"@babel/core": "^7.21.8",
"@babel/preset-env": "^7.21.5",
"@babel/preset-typescript": "^7.21.5",
"@preconstruct/cli": "^2.6.4",
"multi-semantic-release": "^3.0.2"
},
"preconstruct": {
"packages": [
"packages/*"
]
}
}
5 changes: 3 additions & 2 deletions packages/ts-etl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"version": "0.1.2",
"description": "ETL tool for Docmaps",
"type": "module",
"main": "dist/index.js",
"main": "dist/docmaps-etl.cjs.js",
"module": "dist/docmaps-etl.esm.js",
"scripts": {
"test": "ava",
"clean": "rm -rf dist/",
Expand All @@ -12,7 +13,7 @@
"start": "node --loader=ts-node/esm --experimental-specifier-resolution=node --nolazy -r ts-node/register/transpile-only src/cli.ts",
"lint": "npx eslint .",
"lint:fix": "npx eslint --fix .",
"prepare": "tsc --declaration",
"prepare": "ava test/unit/",
"build": "tsc"
},
"bin": {
Expand Down
4 changes: 2 additions & 2 deletions packages/ts-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ For Code of Conduct, see the repository-wide [CODE_OF_CONDUCT.md](/CODE_OF_CONDU

For info about local development of this repository, see [CONTRIBUTING.md](CONTRIBUTING.md).

## Releases
## Builds & Releases

Packages are hosted on NPM and automated by senmantic-release (see repository root for more info).
Packages are hosted on NPM and automated by preconstruct and semantic-release (see repository root for more info).

## Current next steps

Expand Down
7 changes: 4 additions & 3 deletions packages/ts-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@
"homepage": "https://github.com/Docmaps-Project/docmaps/tree/main/packages/ts-sdk",
"description": "",
"type": "module",
"main": "dist/index.js",
"main": "dist/docmaps-sdk.cjs.js",
"module": "dist/docmaps-sdk.esm.js",
"types": "dist/index.d.ts",
"scripts": {
"test": "ava",
"debug": "node --loader=ts-node/esm --experimental-specifier-resolution=node --nolazy -r ts-node/register/transpile-only --inspect-brk src/debuggable.ts",
"lint": "npx eslint .",
"lint:fix": "npx eslint --fix .",
"clean": "rm -rf dist/",
"clean": "rm -rf dist/ node_modules/",
"build": "tsc",
"prepare": "tsc --declaration"
"prepare": "ava src/test/"
},
"keywords": [],
"author": "",
Expand Down
1 change: 1 addition & 0 deletions packages/ts-sdk/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "@tsconfig/node-lts-strictest-esm/tsconfig.json",
"compilerOptions": {
"module": "esnext",
"isolatedModules": true,
"target": "ES2020",
"esModuleInterop": true,
"moduleResolution": "node",
Expand Down
Loading