Skip to content

Commit 9aa0a6b

Browse files
committed
refactor: migrate to workspace monorepo
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
1 parent b718129 commit 9aa0a6b

43 files changed

Lines changed: 12952 additions & 38477 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.eslintrc.json

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

.github/workflows/__shared-ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@b4883995e100e291a1fed68678d47a560328ed08 # 0.24.0
1717
with:
1818
linter-env: |
19-
FILTER_REGEX_EXCLUDE=lib/**/*,docs/build/**/*
19+
FILTER_REGEX_EXCLUDE=packages/theme/lib/**/*,packages/docs/build/**/*
2020
VALIDATE_JSCPD=false
2121
VALIDATE_TYPESCRIPT_ES=false
2222
VALIDATE_TYPESCRIPT_PRETTIER=false
@@ -29,7 +29,7 @@ jobs:
2929
with:
3030
build: |
3131
{
32-
"artifact": ["lib", "docs/build"]
32+
"artifact": ["packages/theme/lib", "packages/docs/build"]
3333
}
3434
3535
package-theme:
@@ -46,6 +46,7 @@ jobs:
4646
path: .
4747

4848
- name: Create package tarball
49+
working-directory: packages/theme
4950
run: |
5051
npm pack --pack-destination ${{ runner.temp }}/
5152

.github/workflows/main-ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ jobs:
4646
with:
4747
name: package-tarball
4848
path: .
49+
4950
- name: Publish CLI to npm
5051
run: |
51-
npm publish hoverkraft-docusaurus-theme-*.tgz --provenance --access public --dry-run
52+
npm publish hoverkraft-docusaurus-theme-*.tgz --provenance --access public --dry-run --latest
5253
env:
5354
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5455

@@ -67,5 +68,5 @@ jobs:
6768
- id: deployment
6869
uses: hoverkraft-tech/ci-github-publish/actions/deploy/github-pages@6d9e5d48da1a80c085e8ed867d680a5e99b28217 # 0.8.0
6970
with:
70-
build-path: docs/build
71+
build-path: packages/docs/build
7172
build-artifact-name: build

.gitignore

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
# Dependencies
22
node_modules/
3-
docs/node_modules/
3+
packages/*/node_modules/
44
npm-debug.log*
55
yarn-debug.log*
66
yarn-error.log*
77

88
# Build output
9-
lib/
10-
dist/
11-
build/
12-
docs/build/
13-
docs/.docusaurus
9+
packages/theme/lib/
10+
packages/docs/build/
11+
packages/docs/.docusaurus
1412

1513
# IDE
1614
.vscode/

Makefile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,22 @@ help: ## Show help message
99
include .env
1010

1111
prepare: ## Prepare stack to run
12-
npm install
13-
cd docs && npm install
12+
pnpm install
1413

1514
start: ## Start application in dev mode
16-
cd docs && npm run start
15+
pnpm --filter hoverkraft-theme-docs run start
1716

1817
lint: ## Run linters
19-
npm run lint -- $(filter-out $@,$(MAKECMDGOALS))
18+
pnpm --filter @hoverkraft/docusaurus-theme run lint -- $(filter-out $@,$(MAKECMDGOALS))
2019
$(call run_linter,)
2120

2221
lint-fix: ## Run linters
23-
npm run lint:fix
22+
pnpm --filter @hoverkraft/docusaurus-theme run lint:fix
2423
$(MAKE) linter-fix
2524

2625
build: ## Build libs and applications
27-
npm run build
28-
cd docs && npm run build
26+
pnpm --filter @hoverkraft/docusaurus-theme run build
27+
pnpm --filter hoverkraft-theme-docs run build
2928

3029
ci: ## Run tests in CI mode
3130
$(MAKE) prepare

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,20 @@ This theme provides:
4949
To contribute to this theme:
5050

5151
1. Clone the repository
52-
2. Install dependencies: `npm install`
53-
3. Build the theme: `npm run build`
54-
4. Test your changes in a Docusaurus project
52+
2. Install dependencies: `pnpm install`
53+
3. Build the theme: `pnpm --filter @hoverkraft/docusaurus-theme run build`
54+
4. Test your changes locally (optional): `pnpm --filter hoverkraft-theme-docs run start`
5555

5656
### Building
5757

5858
```bash
59-
npm run build
59+
pnpm run build
6060
```
6161

6262
### Watch mode for development
6363

6464
```bash
65-
npm run build:watch
65+
pnpm --filter @hoverkraft/docusaurus-theme run build:watch
6666
```
6767

6868
## License

docs/.docusaurus/docusaurus-plugin-content-docs/default/__mdx-loader-dependency.json

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

docs/.docusaurus/docusaurus-plugin-content-pages/default/__plugin.json

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

0 commit comments

Comments
 (0)