Skip to content

Commit

Permalink
[build-config] move to monorepo root (#11)
Browse files Browse the repository at this point in the history
* [build-config] move to monorepo root

* [lint-staged] testing

* [@babel/runtime] move to package level

* [build-config] update travis.yml for root build

* [lint] generate prettier config before linting

* [build-config] ^0.0.24

* [jest] add test:watch script

* [translation] remove package scripts

* [core] set author

* [core] add .eslintrc for root overrides

* [root] fix lint + prettier scripts

* [travis][jest] try --no-cache --debug

* [travis][jest] try running jest directly

* build-config@^0.0.25 to fix jest

* travis and test script to non-debug mode

* [travis] lerna bootstrap instead of installing 2x

* [npmrc] package-lock=false

* [travis] lerna bootstrap in script not install

* [travis] install and run tests per-package

* yarn workspaces are magical
  • Loading branch information
williaster authored and zhaoyongjie committed Nov 25, 2021
1 parent a1773ea commit a06a31f
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
.eslintrc.js
.idea
.npm
.npmrc
.prettierignore
.yarnclean

Expand Down
1 change: 1 addition & 0 deletions superset-frontend/temporary_superset_ui/superset-ui/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,8 @@ install:
- npm install
- npm install -g codecov

env:
- PACKAGE=superset-ui-core

script:
- cd ./packages/$PACKAGE
- yarn install
- yarn run lint
- yarn run test

after_script:
Expand Down
47 changes: 40 additions & 7 deletions superset-frontend/temporary_superset_ui/superset-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@
"description": "Superset UI",
"private": true,
"scripts": {
"build": "lerna run build",
"lint": "lerna run lint",
"lint:fix": "lerna run lint:fix",
"build": "yarn run build:cjs && yarn run build:esm",
"build:cjs": "NODE_ENV=production beemo babel ./src --out-dir lib/ --minify --workspaces=*",
"build:esm": "NODE_ENV=production beemo babel ./src --out-dir esm/ --esm --minify --workspaces=*",
"lint": "beemo create-config prettier && beemo eslint \"./packages/*/{src,test}/**/*.{js,jsx}\"",
"jest": "beemo jest --color --coverage",
"prepare-release": "git checkout master && git pull --rebase origin master && lerna bootstrap && yarn run test",
"prerelease": "yarn run build",
"prepare-release": "git checkout master && git pull --rebase origin master && lerna bootstrap && yarn run lint && yarn run test",
"pretest": "yarn run lint",
"prettier": "beemo prettier \"./packages/*/{src,test}/**/*.{js,jsx,json,md}\"",
"release": "yarn run prepare-release && lerna publish",
"test": "lerna run test"
"test": "yarn run jest",
"test:watch": "beemo create-config jest && jest --watch"
},
"repository": "https://github.com/apache-superset/superset-ui.git",
"keywords": [
Expand All @@ -27,13 +32,41 @@
],
"license": "Apache-2.0",
"devDependencies": {
"@data-ui/build-config": "^0.0.25",
"husky": "^1.1.2",
"lerna": "^3.2.1",
"lint-staged": "^7.3.0",
"yarn": "^1.9.4"
},
"engines": {
"node": ">=8.10.0"
},
"publishConfig": {
"access": "public"
"beemo": {
"module": "@data-ui/build-config",
"drivers": [
"babel",
"eslint",
{
"driver": "jest",
"env": {
"NODE_ENV": "test"
}
},
"prettier"
]
},
"workspaces": [
"./packages/*"
],
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"./packages/*/{src,test}/**/*.{js,jsx,json,md}": [
"yarn run prettier --write",
"git add"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"rules": {
"prefer-promise-reject-errors": "off"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,6 @@
"esm",
"lib"
],
"scripts": {
"build:cjs": "beemo babel ./src --out-dir lib/ --minify",
"build:esm": "beemo babel ./src --out-dir esm/ --esm --minify",
"build": "yarn run build:cjs && yarn run build:esm",
"dev": "beemo babel --watch ./src --out-dir esm/ --esm",
"jest": "beemo jest --color --coverage",
"eslint": "beemo eslint \"./{src,test}/**/*.{js,jsx,json,md}\"",
"lint": "yarn run prettier && yarn run eslint",
"lint:fix": "yarn run prettier --write && yarn run eslint --fix",
"test": "yarn run jest",
"prettier": "beemo prettier \"./{src,test}/**/*.{js,jsx,json,md}\"",
"prepublish": "yarn run build"
},
"repository": {
"type": "git",
"url": "git+https://github.com/apache-superset/superset-ui.git"
Expand All @@ -32,40 +19,20 @@
"core",
"data"
],
"author": "",
"author": "Superset",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/apache-superset/superset-ui/issues"
},
"homepage": "https://github.com/apache-superset/superset-ui#readme",
"devDependencies": {
"@data-ui/build-config": "^0.0.23",
"fetch-mock": "^6.5.2",
"node-fetch": "^2.2.0"
},
"dependencies": {
"@babel/runtime": "^7.1.2",
"whatwg-fetch": "^2.0.4"
},
"beemo": {
"module": "@data-ui/build-config",
"drivers": [
"babel",
"eslint",
{
"driver": "jest",
"env": {
"NODE_ENV": "test"
}
},
"prettier"
],
"eslint": {
"rules": {
"prefer-promise-reject-errors": "off"
}
}
},
"publishConfig": {
"access": "public"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,6 @@
"esm",
"lib"
],
"scripts": {
"build:cjs": "beemo babel ./src --out-dir lib/ --minify",
"build:esm": "beemo babel ./src --out-dir esm/ --esm --minify",
"build": "yarn run build:cjs && yarn run build:esm",
"dev": "beemo babel --watch ./src --out-dir esm/ --esm",
"jest": "beemo jest --color --coverage",
"eslint": "beemo eslint \"./{src,test}/**/*.{js,jsx,md}\"",
"lint": "yarn run prettier && yarn run eslint",
"lint:fix": "yarn run prettier --write && yarn run eslint --fix",
"test": "yarn run jest",
"prettier": "beemo prettier \"./{src,test}/**/*.{js,jsx,json,md}\"",
"prepublish": "yarn run build"
},
"repository": {
"type": "git",
"url": "git+https://github.com/apache-superset/superset-ui.git"
Expand Down

0 comments on commit a06a31f

Please sign in to comment.