Skip to content

Commit 1dc1558

Browse files
authored
fix: use Honkit and update dependencies (#78)
* chore: update deps && remove winston-color Remove colors.js * chore: use Honkit and update Deps * style: use prettier * chore: disable console warn
1 parent f8fd74b commit 1dc1558

28 files changed

+7565
-2330
lines changed

.babelrc

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
{
22
"presets": [
3-
"es2015"
4-
],
5-
"env": {
6-
"development": {
7-
"presets": [
8-
"jsdoc-to-assert",
9-
"power-assert"
10-
]
11-
}
12-
}
3+
"@babel/env"
4+
]
135
}

.eslintrc.js

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
module.exports = {
2-
"env": {
3-
"browser": true,
4-
"commonjs": true,
5-
"node": true,
6-
"es6": true,
7-
"mocha": true
2+
env: {
3+
browser: true,
4+
commonjs: true,
5+
node: true,
6+
es6: true,
7+
mocha: true
88
},
9-
"plugins": [
10-
"prettier"
11-
],
12-
"extends": [
13-
"eslint:recommended"
14-
],
15-
"parserOptions": {
16-
"sourceType": "module"
9+
plugins: ["prettier"],
10+
extends: ["eslint:recommended"],
11+
parserOptions: {
12+
sourceType: "module"
1713
},
18-
"rules": {
19-
"prettier/prettier": ["error", {
20-
"printWidth": 100,
21-
"tabWidth": 4
22-
}],
14+
rules: {
15+
"prettier/prettier": [
16+
"error",
17+
{
18+
singleQuote: false,
19+
printWidth: 120,
20+
tabWidth: 4,
21+
trailingComma: "none"
22+
}
23+
],
2324
"prefer-const": "error",
24-
"no-console": "warn",
25+
"no-console": 0,
2526
"no-extra-semi": 0,
2627
"no-mixed-spaces-and-tabs": 0
2728
}

.githooks/pre-commit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
npx --no-install lint-staged

.github/workflows/test.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: test
2+
on: [push, pull_request]
3+
jobs:
4+
test:
5+
name: "Test on Node.js ${{ matrix.node-version }}"
6+
runs-on: ubuntu-latest
7+
strategy:
8+
matrix:
9+
node-version: [12, 14, 16]
10+
steps:
11+
- name: checkout
12+
uses: actions/checkout@v2
13+
- name: setup Node.js ${{ matrix.node-version }}
14+
uses: actions/setup-node@v2
15+
with:
16+
node-version: ${{ matrix.node-version }}
17+
- name: Install
18+
run: yarn install
19+
- name: Test
20+
run: yarn test

.mocharc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"require": [
3+
"@babel/register"
4+
]
5+
}

.travis.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# gitbook-plugin-include-codeblock [![Build Status](https://travis-ci.org/azu/gitbook-plugin-include-codeblock.svg?branch=master)](https://travis-ci.org/azu/gitbook-plugin-include-codeblock)
1+
# gitbook-plugin-include-codeblock [![Actions Status: test](https://github.com/azu/gitbook-plugin-include-codeblock/workflows/test/badge.svg)](https://github.com/azu/gitbook-plugin-include-codeblock/actions?query=workflow%3A"test")
22

33
GitBook Plugin for including file.
44

examples/ace/package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,17 @@
44
"description": "gitbook-plugin-include-codeblock",
55
"private": true,
66
"scripts": {
7-
"prepublish": "gitbook install",
8-
"start": "gitbook serve",
9-
"build": "gitbook build",
10-
"test": "npm rm gitbook-plugin-include-codeblock && npm i && npm run build"
7+
"start": "honkit serve",
8+
"build": "honkit build",
9+
"test": "yarn install && npm run build"
1110
},
1211
"keywords": [
1312
"gitbook"
1413
],
1514
"author": "azu",
1615
"license": "MIT",
1716
"devDependencies": {
18-
"gitbook-cli": "2.3.0 || ^2.3.2",
17+
"honkit": "^3.6.23",
1918
"gitbook-plugin-include-codeblock": "file:../../"
2019
}
2120
}

examples/custom/package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,17 @@
44
"description": "gitbook-plugin-include-codeblock",
55
"private": true,
66
"scripts": {
7-
"prepublish": "gitbook install",
8-
"start": "gitbook serve",
9-
"build": "gitbook build",
10-
"test": "npm rm gitbook-plugin-include-codeblock && npm i && npm run build"
7+
"start": "honkit serve",
8+
"build": "honkit build",
9+
"test": "yarn install && npm run build"
1110
},
1211
"keywords": [
1312
"gitbook"
1413
],
1514
"author": "azu",
1615
"license": "MIT",
1716
"devDependencies": {
18-
"gitbook-cli": "2.3.0 || ^2.3.2",
17+
"honkit": "^3.6.23",
1918
"gitbook-plugin-include-codeblock": "file:../../"
2019
}
2120
}

0 commit comments

Comments
 (0)