Skip to content

Commit f1c8d02

Browse files
committed
⚒ update build scripts
1 parent a88598a commit f1c8d02

File tree

8 files changed

+70
-42
lines changed

8 files changed

+70
-42
lines changed

.codecov.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
comment: off

.eslintignore

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
/docs/.vuepress/dist
1+
/.nyc_output
2+
/coverage
23
/node_modules
34
/index.*
5+
/test.*
6+
47
!.vuepress
8+
/docs/.vuepress/dist

.github/workflows/CI.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: CI
2+
on:
3+
push:
4+
branches: [master]
5+
pull_request:
6+
branches: [master]
7+
schedule:
8+
- cron: 0 0 * * 0
9+
10+
jobs:
11+
lint:
12+
name: Lint
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v1
17+
with:
18+
fetch-depth: 1
19+
- name: Install Node.js
20+
uses: actions/setup-node@v1
21+
with:
22+
node-version: 12
23+
- name: Install Packages
24+
run: npm install
25+
- name: Lint
26+
run: node run -s lint
27+
28+
test:
29+
name: Test
30+
strategy:
31+
matrix:
32+
node: [12, 10, 8, 6]
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v1
37+
with:
38+
fetch-depth: 1
39+
- name: Install Node.js ${{ matrix.node }}
40+
uses: actions/setup-node@v1
41+
with:
42+
node-version: ${{ matrix.node }}
43+
- name: Install Packages
44+
run: npm install
45+
- name: Build
46+
run: npm run -s build
47+
- name: Test
48+
run: npm run -s test:mocha
49+
- name: Send Coverage
50+
run: npm run -s codecov
51+
env:
52+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.nycrc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"include": ["src/**/*.js"],
3-
"require": ["esm"],
4-
"cache": true
3+
"reporter": ["lcov", "text-summary"],
4+
"require": ["esm"]
55
}

.travis.yml

-26
This file was deleted.

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![npm version](https://img.shields.io/npm/v/eslint-utils.svg)](https://www.npmjs.com/package/eslint-utils)
44
[![Downloads/month](https://img.shields.io/npm/dm/eslint-utils.svg)](http://www.npmtrends.com/eslint-utils)
5-
[![Build Status](https://travis-ci.org/mysticatea/eslint-utils.svg?branch=master)](https://travis-ci.org/mysticatea/eslint-utils)
5+
[![Build Status](https://github.com/mysticatea/eslint-utils/workflows/CI/badge.svg)](https://github.com/mysticatea/eslint-utils/actions)
66
[![Coverage Status](https://codecov.io/gh/mysticatea/eslint-utils/branch/master/graph/badge.svg)](https://codecov.io/gh/mysticatea/eslint-utils)
77
[![Dependency Status](https://david-dm.org/mysticatea/eslint-utils.svg)](https://david-dm.org/mysticatea/eslint-utils)
88

@@ -12,13 +12,13 @@ This package provides utility functions and classes for make ESLint custom rules
1212

1313
For examples:
1414

15-
- [getStaticValue](https://mysticatea.github.io/eslint-utils/api/ast-utils.html#getstaticvalue) evaluates static value on AST.
16-
- [PatternMatcher](https://mysticatea.github.io/eslint-utils/api/ast-utils.html#patternmatcher-class) finds a regular expression pattern as handling escape sequences.
17-
- [ReferenceTracker](https://mysticatea.github.io/eslint-utils/api/scope-utils.html#referencetracker-class) checks the members of modules/globals as handling assignments and destructuring.
15+
- [getStaticValue](https://eslint-utils.mysticatea.dev/api/ast-utils.html#getstaticvalue) evaluates static value on AST.
16+
- [PatternMatcher](https://eslint-utils.mysticatea.dev/api/ast-utils.html#patternmatcher-class) finds a regular expression pattern as handling escape sequences.
17+
- [ReferenceTracker](https://eslint-utils.mysticatea.dev/api/scope-utils.html#referencetracker-class) checks the members of modules/globals as handling assignments and destructuring.
1818

1919
## 📖 Usage
2020

21-
See [documentation](https://mysticatea.github.io/eslint-utils/).
21+
See [documentation](https://eslint-utils.mysticatea.dev/).
2222

2323
## 📰 Changelog
2424

docs/.vuepress/config.js

-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
"use strict"
2-
31
module.exports = {
4-
base: "/eslint-utils/",
52
title: "eslint-utils",
63
description: "Utilities for ESLint plugins and custom rules.",
74
serviceWorker: true,
8-
ga: "UA-12936571-6",
95

106
themeConfig: {
117
repo: "mysticatea/eslint-utils",

package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"esm": "^3.0.55",
2323
"espree": "^5.0.1",
2424
"mocha": "^5.2.0",
25+
"npm-run-all": "^4.1.5",
2526
"nyc": "^13.0.1",
2627
"opener": "^1.4.3",
2728
"rimraf": "^2.6.2",
@@ -35,16 +36,16 @@
3536
"build": "rollup -c",
3637
"clean": "rimraf .nyc_output coverage index.*",
3738
"codecov": "nyc report -r lcovonly && codecov",
38-
"coverage": "nyc report -r lcov && opener ./coverage/lcov-report/index.html",
39+
"coverage": "opener ./coverage/lcov-report/index.html",
3940
"docs:build": "vuepress build docs",
4041
"docs:watch": "vuepress dev docs",
4142
"lint": "eslint src test",
42-
"pretest": "npm run -s lint && npm run -s build",
43-
"test": "nyc mocha --reporter dot \"test/*.js\"",
43+
"test": "run-s lint build test:mocha",
44+
"test:mocha": "nyc mocha --reporter dot \"test/*.js\"",
4445
"preversion": "npm test && npm run -s build",
4546
"postversion": "git push && git push --tags",
4647
"prewatch": "npm run -s clean",
47-
"watch": "warun \"{src,test}/**/*.js\" -- nyc --reporter lcov mocha --reporter dot \"test/*.js\""
48+
"watch": "warun \"{src,test}/**/*.js\" -- npm run -s test:mocha"
4849
},
4950
"repository": {
5051
"type": "git",

0 commit comments

Comments
 (0)