Skip to content

Commit

Permalink
Split code blocks of installation instructions (#611)
Browse files Browse the repository at this point in the history
Co-authored-by: Ifiok Jr <ifiokotung@gmail.com>
  • Loading branch information
StefKors and ifiokjr committed Aug 31, 2020
1 parent 881b70b commit 6c6a6f7
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:

- name: check versions are valid
if: github.event.pull_request
run: pnpm ci:version:changeset
run: pnpm ci:version:check

- name: create versions
uses: changesets/action@master
Expand Down
7 changes: 4 additions & 3 deletions docs/guide/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ Rather than installing multiple scoped packages, the `remirror` package is a gat
Use the installation instruction outlined below, depending on the package manager used in your project.

```bash
# yarn
yarn add remirror@next @remirror/pm@next
```

# pnpm
```bash
pnpm add remirror@next @remirror/pm@next
```

# npm
```bash
npm install remirror@next @remirror/pm@next
```

Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@
"checks:disable": "rimraf ./.config.json",
"checks:enable": "cpy support/.config.sample.json ./ --rename=\".config.json\"",
"checks:release": "run-s checks build test:e2e",
"ci:version": "run-s symlink:root ci:version:changeset ci:version:date ci:version:repo fix:prettier ci:version:install",
"ci:version": "run-s ci:version:changeset ci:version:date ci:version:repo fix:prettier ci:version:install",
"ci:version:changeset": "changeset version",
"ci:version:check": "run-s ci:version:pr ci:version:changeset ci:version:repo",
"ci:version:date": "node support/scripts/changelog-dates.js",
"ci:version:install": "unset CI && pnpm install --frozen-lockfile=false",
"ci:version:pr": "node support/scripts/enable-pr-changeset.js",
"ci:version:repo": "unset CI && run-s fix:repo update:workspace",
"clean": "pnpm if-clean git clean -- -fdx --exclude=.config.json --exclude=node_modules --exclude=**/node_modules",
"clean:all": "git clean -fdX --exclude='.config.json'",
Expand Down
30 changes: 30 additions & 0 deletions support/scripts/enable-pr-changeset.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* This script edits the `/.changeset/config.json` file so that it doesn't need
* the GITHUB_TOKEN to be available in order to build the changeset.
*
* This allows PR's which don't have access to the `GITHUB_TOKEN` to still pass.
*
* @packageDocumentation
*/

const writeJson = require('write-json-file');
const chalk = require('chalk');
const { baseDir } = require('./helpers');

async function main() {
if (!process.env.CI) {
console.log(
chalk`{red Attempted to edit the changeset config in a non CI environment.} Exiting...`,
);

return;
}

const changesetConfig = require('../../.changeset/config.json');
delete changesetConfig.changelog;
await writeJson(baseDir('.changeset', 'config.json'), changesetConfig);

console.log(chalk`{green Successfully updated the CI configuration. }`);
}

main();

1 comment on commit 6c6a6f7

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Published on https://remirror.io as production
🚀 Deployed on https://5f4c9bf383248de2eff6b721--remirror.netlify.app

Please sign in to comment.