Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
9 changes: 7 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,14 @@ commands:
sudo apt-get update
sudo apt-get install -y libreoffice-common libreoffice-java-common libreoffice-impress default-jre

- run:
name: Hash patches
command: md5sum patches/* > ~/.patches.hash

- restore_cache:
keys:
- v3-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package-lock.json" }}-{{ .Branch }}
- v3-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package-lock.json" }}-{{ checksum "~/.patches.hash" }}-{{ .Branch }}
- v3-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package-lock.json" }}-{{ checksum "~/.patches.hash" }}-
- v3-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package-lock.json" }}-
- v3-dependencies-{{ .Environment.CIRCLE_JOB }}-

Expand All @@ -43,7 +48,7 @@ commands:
- steps: << parameters.postinstall >>

- save_cache:
key: v3-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package-lock.json" }}-{{ .Branch }}
key: v3-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package-lock.json" }}-{{ checksum "~/.patches.hash" }}-{{ .Branch }}
paths:
- ~/.npm

Expand Down
38 changes: 36 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,31 @@ We are following [**the contributing guideline of Marp team projects**][team-con

## Table of contents

- [Marp team contributing guideline][team-contributing-guideline]
- [Marp team contributing guideline ↗️][team-contributing-guideline]
- [Development](#development)
- [Installation](#installation)
- [Build and watch](#build-and-watch)
- [Use built version](#use-built-version)
- [Testing](#testing)
- [Debug](#debug)

## Development

### Installation

```bash
npm install
npx patch-package
```

Running [`npx patch-package`](https://github.com/ds300/patch-package) after `npm install` is required to apply patches for development dependencies. See also [the documentation of patches](../patches/README.md) for details.

> [!NOTE]
>
> `patch-package` recommends to [add `postinstall` script to `package.json` to run it automatically after `npm install`](https://github.com/ds300/patch-package?tab=readme-ov-file#set-up). However, Marp CLI does not use it because it will run also when installing CLI by users.

### Build and watch

```bash
# Build (Bundle and minify)
npm run build
Expand All @@ -30,7 +49,7 @@ Use `./marp-cli.js` instead of `marp` command.
./marp-cli.js --help
```

### Standalone binary
#### Standalone binary

Standalone binaries created by [pkg](https://github.com/zeit/pkg) will output to `./bin` directory.

Expand All @@ -43,6 +62,21 @@ npm run build:standalone
./bin/marp-cli-linux --help
```

### Testing

```bash
# Run all tests
npm run test

# Run tests with code coverage
npm run test:coverage

# Run test for specific file(s)
npm run test -- ./test/marp-cli.ts
```

You need to install [Google Chrome](https://www.google.com/chrome/), [Mozilla Firefox](https://www.mozilla.org/firefox/), and [LibreOffice](https://www.libreoffice.org/download/download-libreoffice/) for running all tests.

## Debug

If you have any trouble with Marp CLI, `--debug` (`-d`) option will help you to find the cause of the problem.
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Changed

- Server mode: Connect to proxied watch notifier WebSocket server instead of `localhost` ([#513](https://github.com/marp-team/marp-cli/issues/513), [#664](https://github.com/marp-team/marp-cli/pull/664))
- Upgrade Jest to v30 ([#669](https://github.com/marp-team/marp-cli/pull/669))

### Fixed

Expand Down
Loading