Skip to content

Commit f682edb

Browse files
authored
chore: update project config (#397)
* chore: update project config * test: fix bin location
1 parent 65b1138 commit f682edb

File tree

8 files changed

+46
-12
lines changed

8 files changed

+46
-12
lines changed

.circleci/config.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
version: 2
2+
jobs:
3+
build:
4+
docker:
5+
# specify the version you desire here
6+
- image: "circleci/node:latest"
7+
8+
working_directory: ~/fisker
9+
10+
steps:
11+
- checkout
12+
13+
- run:
14+
name: Install dependencies
15+
command: yarn
16+
17+
- run:
18+
name: Build dist
19+
command: yarn build
20+
21+
- store_artifacts:
22+
path: ./dist
23+
destination: dist

.eslintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ node_modules/**
1414
**/third-party/**
1515

1616
# build file
17-
lib/**
1817
dist/**
1918
**/*.min.*
2019

.github/workflows/continuous-integration.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ jobs:
4141
- 13.x
4242
- 12.x
4343
- 10.x
44+
# exclude:
45+
# - PLATFORM: macos-latest
46+
# NODE: 12.x
47+
# - PLATFORM: windows-latest
48+
# NODE: 12.x
4449

4550
name: Test on node ${{ matrix.NODE }} and ${{ matrix.PLATFORM }}
4651

@@ -70,7 +75,14 @@ jobs:
7075
env:
7176
DISPLAY: :99
7277

73-
- name: Upload Coverage
78+
- name: Upload Coverage Parallel
7479
uses: coverallsapp/github-action@master
7580
with:
7681
github-token: ${{ secrets.GITHUB_TOKEN }}
82+
parallel: true
83+
84+
- name: Upload Coverage Finished
85+
uses: coverallsapp/github-action@master
86+
with:
87+
github-token: ${{ secrets.GITHUB_TOKEN }}
88+
parallel-finished: true

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,4 @@ typings/
9393
.dynamodb/
9494

9595
# project ignore files
96-
/bin
97-
/lib
96+
dist/

.prettierignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ node_modules/**
1414
**/third-party/**
1515

1616
# build file
17-
lib/**
1817
dist/**
1918
**/*.min.*
2019

@@ -26,4 +25,3 @@ dist/**
2625
coverage/**
2726

2827
# project glob
29-

package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "left-phalange",
33
"version": "1.1.4",
44
"description": "Convert data between CommonJS, ESModule, INI, JSON, JSON5, TOML, YAML",
5-
"main": "lib/index.js",
5+
"main": "dist/index.js",
66
"repository": "fisker/left-phalange",
77
"author": {
88
"name": "fisker Cheung",
@@ -20,11 +20,11 @@
2020
],
2121
"license": "MIT",
2222
"files": [
23-
"bin"
23+
"dist"
2424
],
2525
"bin": {
26-
"left-phalange": "bin/cli",
27-
"lp": "bin/cli"
26+
"left-phalange": "dist/cli",
27+
"lp": "dist/cli"
2828
},
2929
"dependencies": {
3030
"ansi-colors": "4.1.1",
@@ -40,6 +40,8 @@
4040
}
4141
},
4242
"scripts": {
43+
"clean": "run-p clean:*",
44+
"clean:js": "del-cli dist",
4345
"build": "run-p build:*",
4446
"build:js": "rollup --config",
4547
"dist": "run-p dist:*",
@@ -72,6 +74,7 @@
7274
"ava": "2.4.0",
7375
"c8": "6.0.1",
7476
"cz-conventional-changelog": "3.0.2",
77+
"del-cli": "3.0.0",
7578
"eslint": "6.6.0",
7679
"esm": "3.2.25",
7780
"execa": "3.2.0",

rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const external = ['path', 'fs', ...Object.keys(dependencies)]
1010
export default {
1111
input: 'src/index.js',
1212
output: {
13-
file: 'bin/cli',
13+
file: 'dist/cli',
1414
format: 'cjs',
1515
banner: '#!/usr/bin/env node',
1616
},

test/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77

88
const packageJson = require('../package.json')
99

10-
execa.commandSync('chmod +x ../bin/cli', {
10+
execa.commandSync('chmod +x ../dist/cli', {
1111
cwd: __dirname,
1212
})
1313

0 commit comments

Comments
 (0)