-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 🎸 Unified build and release process via rollup and lerna
- Loading branch information
Showing
107 changed files
with
920 additions
and
917 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,26 @@ | ||
language: node_js | ||
node_js: | ||
- "14" | ||
|
||
notifications: | ||
email: false | ||
|
||
install: | ||
- npm install | ||
script: | ||
- npm test | ||
- npm run audit | ||
- npm run doc | ||
- npm run lint | ||
|
||
jobs: | ||
include: | ||
- name: "Unit Tests" | ||
script: npm test | ||
- name: "Audit" | ||
script: npm audit || echo \"audit found some vulnerabilities.\" | ||
- name: "Docs" | ||
script: npm run doc | ||
- name: "Lint" | ||
script: npm run lint | ||
- if: tag =~ ^v # Run only for tags | ||
stage: "deploy" | ||
script: | ||
- echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" >> $HOME/.npmrc 2> /dev/null | ||
- npm run release:publish | ||
skip_cleanup: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
to: packages/<%= h.changeCase.paramCase(name) %>/jest.config.js | ||
--- | ||
const base = require("../../jest.config.base.js"); | ||
|
||
module.exports = { | ||
...base | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
to: packages/<%= h.changeCase.paramCase(name) %>/rollup.config.js | ||
--- | ||
import common from '../../rollup.config.common'; | ||
|
||
export default Object.assign( | ||
{}, | ||
common, | ||
{ | ||
external: [], | ||
output: { | ||
file: 'dist/main.js', | ||
format: 'cjs', | ||
exports: 'named' | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module.exports = { | ||
bail: true, | ||
verbose: true, | ||
testRegex: "(/src(/?[^/]*){0,5}/__tests__/).*Spec\\.jsx?$", | ||
modulePaths: [ | ||
"<rootDir>/" | ||
], | ||
transform: { | ||
"\\.jsx?": "<rootDir>/../../preprocess.js" | ||
}, | ||
testEnvironment: "node" | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module.exports = { | ||
verbose: true, | ||
projects: | ||
[ | ||
"<rootDir>/packages/*/jest.config.js" | ||
], | ||
coverageThreshold: { | ||
global: { | ||
functions: 65, | ||
lines: 75, | ||
statements: 75 | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
{ | ||
"lerna": "2.8.0", | ||
"packages": [ | ||
"packages/*" | ||
], | ||
"command": { | ||
"bootstrap": { | ||
"npmClientArgs": ["--no-package-lock"] | ||
} | ||
}, | ||
"version": "independent" | ||
} | ||
{ | ||
"packages": [ | ||
"packages/*" | ||
], | ||
"command": { | ||
"version": { | ||
"message": "chore(release): publish" | ||
}, | ||
"publish": { | ||
"conventionalCommits": true, | ||
"preid": "rc" | ||
}, | ||
"bootstrap": { | ||
"npmClientArgs": ["--no-package-lock"] | ||
} | ||
}, | ||
"version": "independent" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,74 @@ | ||
{ | ||
"version": "1.0.0", | ||
"scripts": { | ||
"test": "node_modules/.bin/lerna run test", | ||
"lint": "node_modules/.bin/lerna run lint && node_modules/.bin/eslint './gulp/**/*.{js,jsx}' --fix", | ||
"doc": "node_modules/.bin/lerna run doc", | ||
"audit": "node_modules/.bin/lerna run audit", | ||
"build": "node_modules/.bin/lerna run build", | ||
"postinstall": "node_modules/.bin/lerna bootstrap --no-ci && node_modules/.bin/lerna run build" | ||
"commit": "git-cz", | ||
"test": "jest --coverage --no-watchman --config=jest.config.js", | ||
"lint": "lerna run lint && node_modules/.bin/eslint './gulp/**/*.{js,jsx}' --fix", | ||
"doc": "lerna run doc", | ||
"audit": "lerna run audit", | ||
"postinstall": "lerna bootstrap --no-ci", | ||
"release": "lerna version", | ||
"release:publish": "lerna publish from-git --yes" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.9.0", | ||
"@babel/plugin-transform-modules-commonjs": "^7.9.0", | ||
"@babel/preset-react": "^7.9.4", | ||
"@commitlint/cli": "^8.3.5", | ||
"@commitlint/config-conventional": "^8.3.4", | ||
"@ima/core": "^17.6.0", | ||
"@ima/gulp-task-loader": "^17.4.0", | ||
"@ima/plugin-script-loader": "1.0.0", | ||
"@rollup/plugin-babel": "^5.0.2", | ||
"@rollup/plugin-commonjs": "^12.0.0", | ||
"@rollup/plugin-json": "^4.0.3", | ||
"@rollup/plugin-node-resolve": "^8.0.0", | ||
"@rollup/plugin-replace": "^2.3.2", | ||
"babel-eslint": "^10.1.0", | ||
"babel-preset-jest": "^25.2.6", | ||
"cz-conventional-changelog": "^3.2.0", | ||
"del": "^5.1.0", | ||
"enzyme": "3.10.0", | ||
"enzyme-adapter-react-16": "^1.15.1", | ||
"enzyme-to-json": "^3.4.3", | ||
"eslint": "6.8.0", | ||
"eslint-config-prettier": "6.10.1", | ||
"eslint-plugin-jasmine": "4.1.0", | ||
"eslint-plugin-jest": "23.8.2", | ||
"eslint-plugin-prettier": "3.1.2", | ||
"eslint-plugin-jasmine": "^4.1.0", | ||
"eslint-plugin-jest": "^23.8.2", | ||
"eslint-plugin-prettier": "^3.1.1", | ||
"eslint-plugin-react": "7.19.0", | ||
"gulp": "4.0.2", | ||
"git-cz": "^4.6.0", | ||
"gulp": "^4.0.2", | ||
"gulp-babel": "8.0.0", | ||
"gulp-cached": "^1.1.1", | ||
"gulp-change": "^1.0.2", | ||
"gulp-jsdoc3": "^3.0.0", | ||
"gulp-remember": "^1.0.1", | ||
"gulp-rename": "^2.0.0", | ||
"@ima/gulp-task-loader": "^17.4.0", | ||
"husky": "^4.2.5", | ||
"jest": "^25.2.7", | ||
"lerna": "^3.20.2", | ||
"prettier": "^2.0.4", | ||
"react": "^16.13.0", | ||
"react-dom": "^16.13.0", | ||
"rollup": "^2.11.2", | ||
"rollup-plugin-peer-deps-external": "^2.2.2", | ||
"to-mock": "^1.6.2" | ||
}, | ||
"dependencies": {} | ||
"commitlint": { | ||
"extends": [ | ||
"@commitlint/config-conventional" | ||
] | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"commit-msg": "bash -c \"if [[ `git rev-parse --abbrev-ref HEAD` =~ ^(master)$ ]] ; then commitlint -E HUSKY_GIT_PARAMS ; fi\"" | ||
} | ||
}, | ||
"dependencies": {}, | ||
"config": { | ||
"commitizen": { | ||
"path": "./node_modules/cz-conventional-changelog" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
.idea/ | ||
.vscode/ | ||
.history/ | ||
src/ | ||
doc/ | ||
coverage/ | ||
.gitignore | ||
gulpfile.js | ||
jest.conf.json | ||
preprocess.js | ||
npm-debug.log | ||
README.md | ||
LICENSE.md | ||
.idea/ | ||
.vscode/ | ||
.history/ | ||
src/ | ||
doc/ | ||
coverage/ | ||
.gitignore | ||
gulpfile.js | ||
jest.config.js | ||
preprocess.js | ||
npm-debug.log | ||
README.md | ||
LICENSE.md |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const base = require("../../jest.config.base.js"); | ||
|
||
module.exports = { | ||
...base | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import common from '../../rollup.config.common'; | ||
|
||
export default Object.assign( | ||
{}, | ||
common, | ||
{ | ||
output: { | ||
file: 'dist/main.js', | ||
format: 'cjs', | ||
exports: 'named' | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
.idea/ | ||
.vscode/ | ||
.history/ | ||
src/ | ||
doc/ | ||
coverage/ | ||
.gitignore | ||
gulpfile.js | ||
jest.conf.json | ||
preprocess.js | ||
npm-debug.log | ||
README.md | ||
LICENSE.md | ||
.idea/ | ||
.vscode/ | ||
.history/ | ||
src/ | ||
doc/ | ||
coverage/ | ||
.gitignore | ||
gulpfile.js | ||
jest.config.js | ||
preprocess.js | ||
npm-debug.log | ||
README.md | ||
LICENSE.md |
Oops, something went wrong.