3.2.0 • Published 17 days ago

gitbook-plugin-js-console v3.2.0

Weekly downloads
30
License
MIT
Repository
github
Last release
17 days ago

gitbook-plugin-js-console

GitBook plugin that provide interactive JavaScript console.

Dependencies:

Install

Install with npm:

npm install gitbook-plugin-js-console

Usage

put "js-console" to your book.json

{
  "gitbook": ">=3.0.0",
  "plugins": [
    "js-console"
  ]
}

Add <!-- js-console --> or class="gitbook-plugin-js-console" node before/after of CodeBlock.

<!-- js-console -->
```js
1 + 2;
```

Add <!-- js-console:{ "state": "open" } --> and this console is opened by default.

<!-- js-console:{ "state": "open" } -->
```js
1 + 2;
```

Add <!-- js-console:{ "type": "module" } --> and this console will execute the code as ECMAScript Module.

:memo: Current limitation: ES Modules mode does not return value

<!-- js-console:{ "type": "module" } -->
```js
await 1; // Module allow Top-Level await
```

For more details, See website.

Changelog

See Releases page.

Running tests

Install devDependencies and Run npm test:

npm i -d && npm test

Contributing

Pull requests and stars are always welcome.

For bugs and feature requests, please create an issue.

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

License

MIT © azu

3.2.0

17 days ago

3.1.0

11 months ago

3.0.4

2 years ago

3.0.3

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.0.5

5 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.4.2

6 years ago

1.4.1

6 years ago

1.4.0

7 years ago

1.3.2

8 years ago

1.3.1

8 years ago

1.3.0

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.1

8 years ago