Skip to content

Commit

Permalink
Use Lerna (jaegertracing#209)
Browse files Browse the repository at this point in the history
* Prep the repo for separately developed components
* Fix uberinternal yarn.lock issues
* Upgrade react to 16.3.2
* Update readme to account for on Lerna changes

Signed-off-by: Joe Farro <joef@uber.com>

Signed-off-by: vvvprabhakar <vvvprabhakar@gmail.com>
  • Loading branch information
tiffon committed May 11, 2018
1 parent 60e7286 commit 4c49827
Show file tree
Hide file tree
Showing 252 changed files with 1,330 additions and 220 deletions.
9 changes: 4 additions & 5 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
[ignore]
# node_module packages that have a .flowconfig in conflict with this file
<PROJECT_ROOT>/node_modules/uber-licence
<PROJECT_ROOT>/node_modules/redux-form
<PROJECT_ROOT>/node_modules/react-motion
<PROJECT_ROOT>/node_modules/draft-js
.*/node_modules/uber-licence/.*
.*/node_modules/redux-form/.*
.*/node_modules/react-motion/.*
.*/node_modules/draft-js/.*

[include]

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ coverage
.DS_Store
npm-debug.log
.vscode
yarn-error.log
12 changes: 5 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
language: node_js
node_js:
- '6'
cache:
directories:
- node_modules
cache: yarn
script:
- npm run lint
- npm run coverage
- npm run build
- yarn lint
- yarn coverage
- yarn build
after_success:
- npm install -g codecov
- yarn global add codecov
- codecov
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ git clone https://github.com/jaegertracing/jaeger-ui.git
cd jaeger-ui
```

Use the recommended npm and Node versions: (defined in [.nvmrc](./.nvmrc) file):
Use the recommended Node versions: (defined in [.nvmrc](./.nvmrc) file):

```
nvm use
```

Install dependencies via `npm` or `yarn`:
Install dependencies via `yarn`:

```
npm install
yarn install
# or
yarn
```
Expand All @@ -46,25 +46,25 @@ ssh -fN -L 16686:$BACKEND_HOST:$BACKEND_PORT $BACKEND_PORT
Start the development server with hot loading:

```
npm start
cd packages/jaeger-ui && yarn start
```

#### Commands

| Command | Description |
| --------------- | ----------------------------------------------------------- |
| `npm start` | Starts development server with hot reloading and api proxy. |
| `npm test` | Runs all the tests |
| `npm run lint` | Lint the project (eslint, prettier, flow) |
| `npm run build` | Runs production build. Outputs files to `/dist`. |
| Command | Description |
| ------------------------------------- | ------------------------------------------------------------------- |
| `cd packages/jaeger-ui && yarn start` | Starts development server with hot reloading and api proxy. |
| `yarn test` | Run all the tests |
| `yarn lint` | Lint the project (eslint, prettier, flow) |
| `yarn build` | Runs production build. Outputs files to `packages/jaeger-ui/build`. |

## Build

Running build will output all the static files to the `./dist` folder:
Running build will output all the static files to the `packages/jaeger-ui/build` folder:

```
npm install
npm run build
yarn install
yarn build
```

## UI Configuration
Expand Down
7 changes: 7 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"lerna": "2.10.2",
"packages": ["packages/*"],
"version": "independent",
"npmClient": "yarn",
"useWorkspaces": true
}
109 changes: 13 additions & 96 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,7 @@
{
"name": "jaeger-ui",
"version": "0.0.1",
"main": "src/index.js",
"license": "MIT",
"proxy": {
"/api": {
"target": "http://localhost:16686",
"logLevel": "silent",
"secure": false,
"changeOrigin": true,
"ws": true,
"xfwd": true
}
},
"homepage": ".",
"private": true,
"devDependencies": {
"babel-eslint": "^7.2.3",
"babel-plugin-import": "^1.6.3",
"bluebird": "^3.5.0",
"enzyme": "^3.2.0",
"enzyme-adapter-react-16": "^1.1.0",
"enzyme-to-json": "^3.3.0",
"eslint": "^4.5.0",
"eslint-config-airbnb": "^15.1.0",
"eslint-config-prettier": "^2.3.0",
Expand All @@ -31,86 +12,22 @@
"eslint-plugin-react": "^7.2.1",
"glow": "^1.2.2",
"husky": "^0.14.3",
"less-vars-to-js": "^1.2.1",
"lint-staged": "^4.0.3",
"prettier": "^1.10.2",
"react-app-rewire-less": "^2.1.0",
"react-app-rewired": "^1.4.0",
"react-scripts": "^1.0.11",
"react-test-renderer": "^15.6.1",
"sinon": "^3.2.1"
},
"dependencies": {
"antd": "^3.0.3",
"chance": "^1.0.10",
"classnames": "^2.2.5",
"combokeys": "^3.0.0",
"cytoscape": "^3.2.1",
"cytoscape-dagre": "^2.0.0",
"d3-scale": "^1.0.6",
"dagre": "^0.7.4",
"deep-freeze": "^0.0.1",
"flow-bin": "^0.64.0",
"fuzzy": "^0.1.3",
"global": "^4.3.2",
"history": "^4.6.3",
"is-promise": "^2.1.0",
"isomorphic-fetch": "^2.2.1",
"jest": "^21.2.1",
"json-markup": "^1.1.0",
"lodash": "^4.17.4",
"logfmt": "^1.2.0",
"moment": "^2.18.1",
"prop-types": "^15.5.10",
"query-string": "^5.0.0",
"raven-js": "^3.22.1",
"react": "^16.0.0",
"react-dimensions": "^1.3.0",
"react-dom": "^16.0.0",
"react-ga": "^2.4.1",
"react-helmet": "^5.1.3",
"react-icons": "^2.2.7",
"react-metrics": "^2.3.2",
"react-redux": "^5.0.6",
"react-router-dom": "^4.1.2",
"react-router-redux": "5.0.0-alpha.6",
"react-virtualized-select": "^3.1.0",
"react-vis": "^1.7.2",
"react-vis-force": "^0.3.1",
"recompose": "^0.25.0",
"redux": "^3.7.2",
"redux-actions": "^2.2.1",
"redux-async-middleware": "^0.0.0",
"redux-form": "^7.0.3",
"redux-promise-middleware": "^4.3.0",
"reselect": "^3.0.1",
"store": "^2.0.12",
"tween-functions": "^1.2.0",
"u-basscss": "2.0.0"
"lerna": "^2.10.2",
"lint-staged": "^7.0.4",
"prettier": "^1.10.2"
},
"workspaces": ["packages/*"],
"scripts": {
"start": "react-app-rewired start",
"start:ga-debug":
"REACT_APP_GA_DEBUG=1 REACT_APP_VSN_STATE=$(./scripts/get-tracking-version.js) react-app-rewired start",
"build": "REACT_APP_VSN_STATE=$(./scripts/get-tracking-version.js) react-app-rewired build",
"eject": "react-scripts eject",
"test": "CI=1 react-app-rewired test --env=jsdom --color",
"test-dev": "react-app-rewired test --env=jsdom",
"coverage": "npm run test -- --coverage",
"lint": "npm run eslint && npm run prettier && npm run flow && npm run check-license",
"eslint": "eslint src",
"build": "lerna run build",
"check-license": "./scripts/check-license.sh",
"prettier": "prettier --write 'src/**/*.{css,js,json,md}' '*.{css,js,json,md}'",
"coverage": "lerna run coverage",
"eslint": "eslint 'scripts/*.js' 'packages/*/src/**/*.js' 'packages/*/*.js'",
"flow": "glow",
"precommit": "lint-staged"
},
"jest": {
"collectCoverageFrom": [
"src/**/*.js",
"!src/utils/DraggableManager/demo/*.js",
"!src/utils/test/**/*.js",
"!src/demo/**/*.js"
]
"lint": "npm run eslint && npm run prettier && npm run flow && npm run check-license",
"precommit": "lint-staged",
"prettier":
"prettier --write '{.,scripts}/*.{js,json,md}' 'packages/*/src/**/*.{css,js,json,md}' 'packages/*/*.{css,js,json,md}'",
"test": "lerna run test"
},
"prettier": {
"printWidth": 110,
Expand Down
File renamed without changes.
File renamed without changes.
95 changes: 95 additions & 0 deletions packages/jaeger-ui/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"name": "jaeger-ui",
"version": "0.0.1",
"main": "src/index.js",
"license": "MIT",
"proxy": {
"/api": {
"target": "http://localhost:16686",
"logLevel": "silent",
"secure": false,
"changeOrigin": true,
"ws": true,
"xfwd": true
}
},
"homepage": ".",
"devDependencies": {
"babel-plugin-import": "^1.6.3",
"bluebird": "^3.5.0",
"enzyme": "^3.2.0",
"enzyme-adapter-react-16": "^1.1.0",
"enzyme-to-json": "^3.3.0",
"less-vars-to-js": "^1.2.1",
"react-app-rewire-less": "^2.1.0",
"react-app-rewired": "^1.4.0",
"react-scripts": "^1.0.11",
"react-test-renderer": "^15.6.1",
"sinon": "^3.2.1"
},
"dependencies": {
"antd": "^3.0.3",
"chance": "^1.0.10",
"classnames": "^2.2.5",
"combokeys": "^3.0.0",
"cytoscape": "^3.2.1",
"cytoscape-dagre": "^2.0.0",
"d3-scale": "^1.0.6",
"dagre": "^0.7.4",
"deep-freeze": "^0.0.1",
"flow-bin": "^0.64.0",
"fuzzy": "^0.1.3",
"global": "^4.3.2",
"history": "^4.6.3",
"is-promise": "^2.1.0",
"isomorphic-fetch": "^2.2.1",
"jest": "^21.2.1",
"json-markup": "^1.1.0",
"lodash": "^4.17.4",
"logfmt": "^1.2.0",
"moment": "^2.18.1",
"prop-types": "^15.5.10",
"query-string": "^5.0.0",
"raven-js": "^3.22.1",
"react": "^16.3.0",
"react-dimensions": "^1.3.0",
"react-dom": "^16.3.0",
"react-ga": "^2.4.1",
"react-helmet": "^5.1.3",
"react-icons": "^2.2.7",
"react-metrics": "^2.3.2",
"react-redux": "^5.0.6",
"react-router-dom": "^4.1.2",
"react-router-redux": "5.0.0-alpha.6",
"react-virtualized-select": "^3.1.0",
"react-vis": "^1.7.2",
"react-vis-force": "^0.3.1",
"recompose": "^0.25.0",
"redux": "^3.7.2",
"redux-actions": "^2.2.1",
"redux-async-middleware": "^0.0.0",
"redux-form": "^7.0.3",
"redux-promise-middleware": "^4.3.0",
"reselect": "^3.0.1",
"store": "^2.0.12",
"tween-functions": "^1.2.0",
"u-basscss": "2.0.0"
},
"scripts": {
"build": "REACT_APP_VSN_STATE=$(../../scripts/get-tracking-version.js) react-app-rewired build",
"coverage": "npm run test -- --coverage",
"start:ga-debug":
"REACT_APP_GA_DEBUG=1 REACT_APP_VSN_STATE=$(../../scripts/get-tracking-version.js) react-app-rewired start",
"start": "react-app-rewired start",
"test-dev": "react-app-rewired test --env=jsdom",
"test": "CI=1 react-app-rewired test --env=jsdom --color"
},
"jest": {
"collectCoverageFrom": [
"src/**/*.js",
"!src/utils/DraggableManager/demo/*.js",
"!src/utils/test/**/*.js",
"!src/demo/**/*.js"
]
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/check-license.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

licRes=$(
for file in $(find src -type f -iregex '.*\.[cj]ss*$' ! -path '*/thrift_gen/*'); do
for file in $(find scripts packages/*/src -type f -iregex '.*\.[cj]ss*$' ! -path '*/thrift_gen/*'); do
head -n3 "${file}" | grep -Eq "(Copyright|generated|GENERATED)" || echo " ${file}"
done;)
if [ -n "${licRes}" ]; then
Expand Down
1 change: 0 additions & 1 deletion src/components/SearchTracePage/SearchResults/react-vis.css

This file was deleted.

Loading

0 comments on commit 4c49827

Please sign in to comment.