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

Migrate from Lerna to npm workspaces #570

Merged
merged 12 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from 11 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
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:

- name: build and publish
run: |
export NODE_OPTIONS="--max_old_space_size=6144"
npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
npm version --no-git-tag-version --yes --exact ${{ steps.timestamp.outputs.stamp }}
npx lerna version --no-git-tag-version --yes --exact ${{ steps.timestamp.outputs.stamp }}
npx lerna exec --ignore dingus -- npm publish --access public --ignore-scripts --tag=unstable 2>&1
npm version --workspaces --include-workspace-root --no-git-tag-version --yes --exact ${{ steps.timestamp.outputs.stamp }}
npm publish --workspaces --access public --tag=unstable 2>&1
5 changes: 2 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ jobs:
run: |
export NODE_OPTIONS="--max_old_space_size=6144"
npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
npm version --no-git-tag-version --yes --exact ${{ github.event.release.tag_name }}
npx lerna version --no-git-tag-version --yes --exact ${{ github.event.release.tag_name }}
npx lerna exec --ignore dingus -- npm publish --access public ${{ steps.tag.outputs.tag }} 2>&1
npm version --workspaces --include-workspace-root --no-git-tag-version --yes --exact ${{ github.event.release.tag_name }}
npm publish --workspaces --access public ${{ steps.tag.outputs.tag }} 2>&1

- name: Create PR to increment version
uses: peter-evans/create-pull-request@v3
Expand Down
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,17 @@
</a>
</p>

### Visit the [TemplateMark Dingus](https://templatemark-dingus.netlify.app)

## Introduction

A transformation and parsing framework for converting markdown content to HTML, Slate (for rich-text editing) and other structured document object models (DOMs).
A transformation and parsing framework for converting markdown content to HTML, PDF, DOCX, Slate (for rich-text editing) and other structured document object models (DOMs).

![Transformations](./packages/markdown-transform/transformations.png)

## Structure of the Code Repository

Top level repository (markdown-transform), with sub packages. Each sub-package is published as an independent npm module using `lerna`:
Top level repository (markdown-transform), with sub packages. Each sub-package is published as an independent npm module using `npm workspaces`:
* [markdown-cli](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-cli) : command line utilities
* [markdown-transform](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-transform) : High-level API to transform markdown into different formats
* [markdown-transform](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-transform) : High-level API to transform files into different formats
* [markdown-common](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-common) : converts between markdown strings and the CommonMark DOM
* [markdown-cicero](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-cicero) : converts between the CommonMark DOM and the CiceroMark DOM
* [markdown-template](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-template) : converts between JSON data + markdown strings and TemplateMark
Expand All @@ -37,7 +35,6 @@ Top level repository (markdown-transform), with sub packages. Each sub-package i
* [markdown-docx](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-docx) : converts a DOCX file to the CiceroMark DOM
* [markdown-it-cicero](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-it-cicero) : markdown-it plugin for contracts and CiceroMark
* [markdown-it-template](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-it-template) : markdown-it plugin for templates and TemplateMark
* [dingus](https://github.com/accordproject/markdown-transform/tree/main/packages/dingus) : published tool to edit markdown as HTML or a DOM

### CommonMark DOM

Expand Down Expand Up @@ -82,9 +79,7 @@ markus --help

### For developers

To install for development, in the project directory, you will need to first install [lerna](https://lerna.js.org):
```
npm install -g lerna@^3.20.2
npm install
```

Expand All @@ -94,7 +89,7 @@ Then run:
npm run test
```

Invokes _lerna_ to run the test suite.
Uses npm workspaces to run the test suite.

---

Expand Down
Loading