Skip to content

Commit b3f4475

Browse files
committed
Freshened up configuration and boilerplate
Signed-off-by: Jaid <jaid.jsx@gmail.com>
1 parent d082e50 commit b3f4475

File tree

13 files changed

+11045
-10313
lines changed

13 files changed

+11045
-10313
lines changed

.babelrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: ["jaid"]
3+
}

.browserslistrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node 10
2+
node 11
3+
not dead

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
dist/
3+
test/fixtures/

.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: "jaid"
3+
}

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
.env
33

44
# Node packages
5-
node_modules/
5+
node_modules
66

77
# npm
88
package-lock.json
@@ -22,8 +22,8 @@ yarn.lock
2222
yarn-error.log
2323

2424
# Generated or temporary content
25-
dist/
26-
temp/
25+
dist
26+
temp
2727

2828
# IDEs
2929
/.vscode/

.travis.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,41 @@
11
language: node_js
22
node_js: [node, lts/*]
3-
os: [linux, osx] # Windows doesn't work currently, I should try again in May 2019 (If I didn't, remind me please!)
43
cache:
54
npm: true
5+
before_script:
6+
- npm add --global pover
7+
script:
8+
- pover install
9+
- pover build:dev
10+
- pover build:prod
11+
- pover test
612
jobs:
713
include:
814
- stage: Deploy
915
before_deploy:
1016
- npm run build:prod
1117
- export PKG_NAME=$(node -e "console.log(require('./dist/package/production/package').name)")
1218
- export PKG_VERSION=$(node -e "console.log(require('./dist/package/production/package').version)")
19+
- "[[ -d dist/homepage/$PKG_NAME/$PKG_VERSION ]] && npm run test:coverage && cp -r dist/homepage/$PKG_NAME/$PKG_VERSION page && cp -r dist/jest/coverage/lcov-report page/coverage || true"
1320
- cd dist/package/production
1421
- zip -9 --recurse-paths ../../${PKG_NAME}_v$PKG_VERSION.zip **
1522
- zip -9 --recurse-paths ../../${PKG_NAME}_v${PKG_VERSION}_min.zip ** --exclude \*.d.ts --exclude readme.* --exclude \*.map
1623
- cd ../../..
1724
deploy:
1825
- provider: pages
19-
local_dir: dist/homepage/$PKG_NAME/$PKG_VERSION
26+
local_dir: page
2027
fqdn: $PKG_NAME.jaid.codes
2128
skip_cleanup: true
2229
github_token: $GITHUB_TOKEN # Permissions: public_repo, repo:status, repo_deployment
30+
on: { condition: -d pages }
2331
- provider: releases
2432
file_glob: true
2533
file:
34+
- license.*
2635
- dist/package/production/package.json
27-
- dist/package/production/license.*
2836
- dist/package/production/*.d.ts
2937
- "dist/*.zip"
3038
skip_cleanup: true
31-
name: $PKG_NAME $PKG_VERSION
3239
api_key: $GITHUB_TOKEN # Permissions: public_repo, repo:status, repo_deployment
3340
on: { tags: true }
3441
- provider: script

jest.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
testEnvironment: "node",
3+
coverageDirectory: "dist/jest/coverage",
4+
collectCoverageFrom: ["src/**"],
5+
testPathIgnorePatterns: [
6+
"/node_modules/",
7+
"/dist/",
8+
],
9+
moduleNameMapper: {
10+
"^root": "<rootDir>",
11+
"^src": "<rootDir>/src",
12+
"^lib": "<rootDir>/src/lib",
13+
},
14+
}

0 commit comments

Comments
 (0)