Skip to content

Commit

Permalink
⚒ update build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
mysticatea committed Oct 20, 2019
1 parent a88598a commit f1c8d02
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 42 deletions.
1 change: 1 addition & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
comment: off
6 changes: 5 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/docs/.vuepress/dist
/.nyc_output
/coverage
/node_modules
/index.*
/test.*

!.vuepress
/docs/.vuepress/dist
52 changes: 52 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: 0 0 * * 0

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: 12
- name: Install Packages
run: npm install
- name: Lint
run: node run -s lint

test:
name: Test
strategy:
matrix:
node: [12, 10, 8, 6]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Install Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Install Packages
run: npm install
- name: Build
run: npm run -s build
- name: Test
run: npm run -s test:mocha
- name: Send Coverage
run: npm run -s codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4 changes: 2 additions & 2 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"include": ["src/**/*.js"],
"require": ["esm"],
"cache": true
"reporter": ["lcov", "text-summary"],
"require": ["esm"]
}
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

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

For examples:

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

## 📖 Usage

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

## 📰 Changelog

Expand Down
4 changes: 0 additions & 4 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
"use strict"

module.exports = {
base: "/eslint-utils/",
title: "eslint-utils",
description: "Utilities for ESLint plugins and custom rules.",
serviceWorker: true,
ga: "UA-12936571-6",

themeConfig: {
repo: "mysticatea/eslint-utils",
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"esm": "^3.0.55",
"espree": "^5.0.1",
"mocha": "^5.2.0",
"npm-run-all": "^4.1.5",
"nyc": "^13.0.1",
"opener": "^1.4.3",
"rimraf": "^2.6.2",
Expand All @@ -35,16 +36,16 @@
"build": "rollup -c",
"clean": "rimraf .nyc_output coverage index.*",
"codecov": "nyc report -r lcovonly && codecov",
"coverage": "nyc report -r lcov && opener ./coverage/lcov-report/index.html",
"coverage": "opener ./coverage/lcov-report/index.html",
"docs:build": "vuepress build docs",
"docs:watch": "vuepress dev docs",
"lint": "eslint src test",
"pretest": "npm run -s lint && npm run -s build",
"test": "nyc mocha --reporter dot \"test/*.js\"",
"test": "run-s lint build test:mocha",
"test:mocha": "nyc mocha --reporter dot \"test/*.js\"",
"preversion": "npm test && npm run -s build",
"postversion": "git push && git push --tags",
"prewatch": "npm run -s clean",
"watch": "warun \"{src,test}/**/*.js\" -- nyc --reporter lcov mocha --reporter dot \"test/*.js\""
"watch": "warun \"{src,test}/**/*.js\" -- npm run -s test:mocha"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit f1c8d02

Please sign in to comment.