Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

Update readme and remove unnecessary items from package.json #17

Merged
merged 1 commit into from
Oct 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @superset-ui
# @superset-ui

[![Build Status](https://img.shields.io/travis/com/apache-superset/superset-ui.svg?style=flat-square
)](https://travis-ci.com/apache-superset/superset-ui)
Expand Down Expand Up @@ -44,22 +44,21 @@ superset-ui/
...
```

For easiest development
### Installation

1. clone this repo
2. install the root npm modules including lerna and yarn
3. have lerna install package dependencies and manage the symlinking between packages for you
2. have lerna install package dependencies and manage the symlinking between packages for you

```sh
git clone ...superset-ui && cd superset-ui
npm install
lerna bootstrap
npm run bootstrap
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is okay but yarn is a root dep, and most of the scripts are run with yarn run ....

This might not be as important locally / in the docs, but this seems to be important for the travis build right now. learna bootstrap fails when run in the travis env which I found last week. it seems like travis uses it's own flavor of npm which gets called if you call lerna bootstrap, and it fails the build without a lock file, which we don't have or want. I enabled yarn workspaces for the build-config, and they actually also can do between-package sym linking like lerna bootstrap, so it does what we want.

With the new SIP for moving away from npm we might have to re-think this, but wanted to give more context as to why yarn is around. I'll leave it to you if you want to use npm or yarn here, like I said for docs it probably doesn't matter.

Copy link
Contributor Author

@kristw kristw Oct 31, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. Thanks for the context. My intention was that I was gonna npm install -g lerna and then saw it as devDependencies here so I added the bootstrap script so I can use the local lerna, plus I just create the generator-superset and want to call lerna bootstrap at the end of scaffolding. It is possible that user may not have global lerna so calling the local version is more sure.

I usually use npm run xxx and yarn xxx interchangeably. The yarn workspace thing sounds interesting though. It would be great to either use that or lerna, just not both.

```

### Builds, linting, and testing

Each package defines its own build config, linting, and testing. You can have lerna run commands
across all packages using the syntax `lerna exec test` from the root `@superset/monorepo` root
across all packages using the syntax `npm run test` (or `npm run test:watch` for watch mode) from the root `@superset/monorepo` root
directory.

### Publishing
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Superset UI",
"private": true,
"scripts": {
"bootstrap": "lerna bootstrap",
"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=*",
Expand Down
16 changes: 0 additions & 16 deletions packages/superset-ui-translation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,11 @@
},
"homepage": "https://github.com/apache-superset/superset-ui#readme",
"devDependencies": {
"@data-ui/build-config": "^0.0.23",
"jest-mock-console": "^0.4.0"
},
"dependencies": {
"@babel/runtime": "^7.1.2",
"jed": "^1.1.1"
},
"beemo": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why didn't I remove these?! thanks.

"module": "@data-ui/build-config",
"drivers": [
"babel",
"eslint",
{
"driver": "jest",
"env": {
"NODE_ENV": "test"
}
},
"prettier"
]
},
"publishConfig": {
"access": "public"
}
Expand Down