Skip to content

Commit

Permalink
feat: reimplementation
Browse files Browse the repository at this point in the history
- Support arguments in tag plugins as renderer options
- Support front-matter as renderer options
- Support _config.yml as renderer options
- Requires Node 10.13+, drop Node 8
- chore(deps): update katex from 0.6.0 to 0.12.0
- chore(deps): add mathjax
- chore(deps): update hexo-util from 1.0.0 to 2.2.0
- chore(dev-deps): update eslint from 6.1.0 to 7.5.0
- chore(dev-deps): update eslint-config-hexo from 3.0.0 to 4.1.0
- chore(deps): update mocha from 6.1.2 to 8.0.1
- chore(deps): remove html-entities
- chore(dev-deps): remove chai-as-promised, cpx, hexo-fs, npm-run-all & rimraf
- ci(travis): add Windows
- ci: add GitHub Actions
  • Loading branch information
curbengh committed Jul 27, 2020
1 parent e33ae5b commit 7d35cbb
Show file tree
Hide file tree
Showing 54 changed files with 708 additions and 764 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
coverage/
tmp/
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "hexo"
}
6 changes: 0 additions & 6 deletions .eslintrc.json

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Linter

on: [push, pull_request]

jobs:
linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Cache NPM dependencies
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-npm-cache
restore-keys: |
${{ runner.OS }}-npm-cache
- name: Install Dependencies
run: npm install
- name: Lint
run: |
npm run eslint
env:
CI: true
30 changes: 30 additions & 0 deletions .github/workflows/tester.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Tester

on: [push, pull_request]

jobs:
tester:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: ['10.x', '12.x', '14.x']
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache NPM dependencies
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.os }}-npm-cache
restore-keys: ${{ runner.os }}-npm-cache
- name: Install Dependencies
run: npm install
- name: Test
run: npm run test
env:
CI: true
7 changes: 4 additions & 3 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

.DS_Store
node_modules/
lib/
test/site/
package-lock.json
*.orig
tmp/
*.log
7 changes: 7 additions & 0 deletions .mocharc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
color: true
reporter: spec
ui: bdd
full-trace: true
exit: true
require:
- "chai/register-should"
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
15 changes: 13 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
os:
- linux
- windows

language: node_js

node_js:
- "8"
- "10"
- "node"
- "12"
- "14"

script:
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then
npm run eslint;
fi
- npm run test
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019-2020 Hexo

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 7d35cbb

Please sign in to comment.