Skip to content

Commit 345879a

Browse files
authored
feat: redo ES build with Rollup; use Prettier (#80)
* feat: use prettier; revert webpack version * feat: move to rollup
1 parent e9c5a04 commit 345879a

22 files changed

+4166
-6155
lines changed

.eslintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"extends": [
88
"eslint:recommended"
99
],
10+
"ignorePatterns": ["**/dist/*.min.*"],
1011
"parserOptions": {
1112
"ecmaVersion": 6,
1213
"sourceType": "script"

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ about: Suggest an idea or use case
44
title: Feature
55
labels: feature request
66
assignees: ''
7-
87
---
98

109
### Use case for the feature
10+
1111
<!-- please describe precisely where it is useful -->
1212

1313
### Examples or links
14+
1415
<!-- please specify or remove -->

.github/ISSUE_TEMPLATE/update.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ about: Some data need an update? Please specify the changes
44
title: Data update
55
labels: update
66
assignees: ''
7-
87
---
98

109
### Data changes
10+
1111
<!-- please describe required changes to be made, as strict as possible -->
1212

1313
### Links & sources
14+
1415
Here is a valid source for this change:
16+
1517
<!-- urls -->

.github/workflows/nodejs.yml

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,36 +20,35 @@ on:
2020

2121
jobs:
2222
build:
23-
2423
runs-on: ubuntu-latest
2524

2625
strategy:
2726
matrix:
2827
node-version: [14, 12, 10]
2928

3029
steps:
31-
- uses: actions/checkout@v2
32-
33-
- name: Use Node.js ${{ matrix.node-version }}
34-
uses: actions/setup-node@v1
35-
with:
36-
node-version: ${{ matrix.node-version }}
37-
38-
- uses: actions/cache@v2
39-
with:
40-
path: ~/.npm
41-
key: ${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('./package-lock.json') }}
42-
restore-keys: |
43-
${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('./package-lock.json') }}
44-
45-
- name: NPM install
46-
run: npm ci --prefer-offline --no-audit --no-optional --ignore-scripts
47-
env:
48-
CI: true
49-
50-
- name: Build & Test
51-
run: npm run build --if-present
52-
# Test is intentionally glued with `build` script
53-
# - run: npm test
54-
env:
55-
CI: true
30+
- uses: actions/checkout@v2
31+
32+
- name: Use Node.js ${{ matrix.node-version }}
33+
uses: actions/setup-node@v1
34+
with:
35+
node-version: ${{ matrix.node-version }}
36+
37+
- uses: actions/cache@v2
38+
with:
39+
path: ~/.npm
40+
key: ${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('./package-lock.json') }}
41+
restore-keys: |
42+
${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('./package-lock.json') }}
43+
44+
- name: NPM install
45+
run: npm ci --prefer-offline --no-audit --no-optional --ignore-scripts
46+
env:
47+
CI: true
48+
49+
- name: Build & Test
50+
run: npm run build --if-present
51+
# Test is intentionally glued with `build` script
52+
# - run: npm test
53+
env:
54+
CI: true

.github/workflows/phpunit.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ on:
88
branches:
99
- master
1010
paths:
11-
- ".github/workflows/*.yml"
12-
- "data/**"
13-
- "dist/*.php"
14-
- "test/*.php"
15-
- "*.js"
16-
- "*.json"
17-
- "*.ts"
18-
- "!.editorconfig"
19-
- "!.travis.yml"
20-
- "!**LICENSE*"
21-
- "!**README*"
11+
- '.github/workflows/*.yml'
12+
- 'data/**'
13+
- 'dist/*.php'
14+
- 'test/*.php'
15+
- '*.js'
16+
- '*.json'
17+
- '*.ts'
18+
- '!.editorconfig'
19+
- '!.travis.yml'
20+
- '!**LICENSE*'
21+
- '!**README*'
2222

2323
jobs:
2424
phpunit:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*.lock
77

88
coverage
9+
.eslintcache
910
.phpunit.cache
1011

1112
composer.phar

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ test/
88
.editorconfig
99
.eslintrc.json
1010
.git*
11+
.prettierrc*
1112
.travis.yml
1213

1314
bower.json

.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
coverage/*
2+
3+
*.json
4+
5+
*.min.*
6+
*.test.*

.prettierrc.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"arrowParens": "always",
3+
"endOfLine": "lf",
4+
"printWidth": 100,
5+
"trailingComma": "es5",
6+
"tabWidth": 2,
7+
"semi": false,
8+
"singleQuote": true
9+
}

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: node_js
22
node_js:
3-
- "14"
4-
- "12"
5-
- "10"
3+
- '14'
4+
- '12'
5+
- '10'
66
os:
77
- linux

0 commit comments

Comments
 (0)