Skip to content

Commit

Permalink
chore: Prepare 2.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
y-lohse committed May 16, 2021
1 parent 6a8f3ab commit a2f31f1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 deletions.
30 changes: 20 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ to provide an implementation of ink in JavaScript, compliant with the reference
implementation.

If you feel that ink is missing a feature, we recommend that you bring it up in
the [main repository] first, or alternatively, in the official [Discord server].
the [main repository] first, or alternatively, in the official [discord server].

[main repository]: https://github.com/inkle/ink
[Discord server]: https://discord.gg/inkle
[discord server]: https://discord.gg/inkle

## Rules & Conventions when porting code from C# #
## Rules & Conventions when porting code from C#

1. Do not port comments from the C# codebase, but do add `inkjs`-centric comment
when it make sense. For example, it's important to document when `inkjs`
Expand All @@ -46,16 +46,16 @@ _To be added._

### Style guide

_inkjs_ uses [Prettier] and [ESLint] to ensure code consistency. We recommend
_inkjs_ uses [prettier] and [esLint] to ensure code consistency. We recommend
that you run prettier either on save or before submitting your PR. Our CI lints
every PR submitted, so make sure your code passes validation. Two NPM tasks
can help you:

- `lint` runs the linter
- `lint:fix` fixes lint errors and warnings automatically

[Prettier]: https://prettier.io/
[ESLint]: https://eslint.org/
[prettier]: https://prettier.io/
[eslint]: https://eslint.org/

### Porting tests & writing new specs

Expand All @@ -70,11 +70,11 @@ minified resulting JavaScript file.
- `test:typescript` runs the TypeScript test suite;
- `test:javascript` runs the JavaScript test suite;
- `test:javascript:dist` runs the test suite against the modern distributable
JavaScript file.
JavaScript file.
- `test:javascript:legacy` runs the test suite against the legacy distributable
JavaScript file.
JavaScript file.
- `test:compileFiles` compiles the fixtures required by the test case (requires
inklecate to be available in `$PATH`)
inklecate to be available in `$PATH`)

`test:compileFiles` needs to be run again every time new tests are added or when
porting a new version of the runtime. The fixtures should always be compiled
Expand All @@ -89,4 +89,14 @@ _To be added._

#### Writing new specs

_To be added._
_To be added._

## Releasing a new version

The repository is set up to automatically publish a new version to [npm](https://www.npmjs.com/package/inkjs) whenever [a new release is created through Github](https://github.com/y-lohse/inkjs/releases). The corresponding Github workflow can be found [here](https://github.com/y-lohse/inkjs/blob/master/.github/workflows/npm-publish.yml). The secret npm token is stored via the Github UI — if it needs to be updated, get in touch with @y-lohse 😀!

To actually release a new version:

1. Update the `version` field in the package.json to the version you wish to publish
2. Update the compatibility table in the README file
3. Create a new release through Github. Use the same version number as in the package.json file, prefixed with `v` (eg. `v1.2.3` if the package.json `version` field is `1.2.3`).
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,4 @@ var result = EvaluateFunction("my_ink_function", ["arg1", "arg2"], true);
| 0.8.2 | 1.8.0 – 1.9.0 |
| 0.8.3 | 1.10.0 – 1.10.5 |
| 0.9.0 | 1.11.0 |
| 1.0.0 | 2.0.0 |
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "inkjs",
"version": "1.11.0",
"version": "2.0.0",
"description": "A javascript port of inkle's ink scripting language (http://www.inklestudios.com/ink/)",
"main": "dist/ink-es2015.js",
"types": "ink.d.ts",
Expand Down Expand Up @@ -49,4 +49,4 @@
"tslint": "6.1.3",
"typescript": "4.2.2"
}
}
}

0 comments on commit a2f31f1

Please sign in to comment.