Move UI deps into main plugin package.json

Also move UI test scripts into main plugin
Also move testing explanation to main plugin README.
This commit is contained in:
Dan Finlay 2016-04-13 15:46:39 -07:00
parent d814a45dff
commit a27677a87c
4 changed files with 58 additions and 76 deletions

View File

@ -34,7 +34,7 @@ You now have the plugin, and can click 'inspect views: background plugin' to vie
### Developing the UI
To enjoy the live-reloading that `gulp dev` offers while working on the `metamask-ui` or `web3-provider-engine` dependencies:
To enjoy the live-reloading that `gulp dev` offers while working on the `web3-provider-engine` or other dependencies:
1. Clone the dependency locally.
2. `npm install` in its folder.
@ -42,7 +42,22 @@ To enjoy the live-reloading that `gulp dev` offers while working on the `metamas
4. Run `npm link $DEP_NAME` in this project folder.
5. Next time you `gulp dev` it will watch the dependency for changes as well!
### Deploying the UI
### Running Tests
Currently the tests are split between two suites (we recently merged the UI into the main plugin repository). There are two different test suites to be concerned with:
Plugin tests, `npm test`.
UI tests, `npm run testUi`.
You can also run both of these with continuously watching processes, via `npm run watch` and `npm run watchUi`.
#### UI Testing Particulars
Requires `mocha` installed. Run `npm install -g mocha`.
You can either run the test suite once with `npm testUi`, or you can reload on file changes, by running `mocha watch ui/test/**/**`.
### Deploying the UI
You must be authorized already on the Metamask plugin.

View File

@ -6,34 +6,71 @@
"scripts": {
"start": "gulp dev",
"test": "mocha --require test/helper.js --compilers js:babel-register --recursive",
"watch": "mocha watch --compilers js:babel-register --recursive"
"watch": "mocha watch --compilers js:babel-register --recursive",
"testUi": "mocha ui/test/**/*test.js",
"watchUi": "mocha watch ui/test/**/*test.js"
},
"browserify": {
"transform": [
[
"babelify",
{
"presets": [
"es2015"
]
}
],
"brfs"
]
},
"dependencies": {
"async": "^1.5.2",
"clone": "^1.0.2",
"copy-to-clipboard": "^2.0.0",
"debounce": "^1.0.0",
"dnode": "^1.2.2",
"end-of-stream": "^1.1.0",
"eth-lightwallet": "^2.2.2",
"eth-store": "^1.1.0",
"ethereumjs-tx": "^1.0.0",
"ethereumjs-util": "^1.3.5",
"ethereumjs-util": "^2.6.0",
"faux-jax": "git+https://github.com/kumavis/faux-jax.git#c3648de04804f3895c5b4972750cae5b51ddb103",
"hat": "0.0.3",
"inject-css": "^0.1.1",
"metamask-logo": "^1.1.5",
"metamask-ui": "^1.5.0",
"multiplex": "^6.7.0",
"pojo-migrator": "^2.1.0",
"pumpify": "^1.3.4",
"react": "^15.0.1",
"react-addons-css-transition-group": "^15.0.1",
"react-dom": "^15.0.1",
"react-hyperscript": "^2.4.0",
"readable-stream": "^2.0.5",
"react": "^0.14.3",
"react-addons-css-transition-group": "^0.14.7",
"react-dom": "^0.14.3",
"react-hyperscript": "^2.2.2",
"react-redux": "^4.0.3",
"redux": "^3.0.5",
"redux-logger": "^2.3.1",
"redux-thunk": "^1.0.2",
"textarea-caret": "^3.0.1",
"three.js": "^0.73.2",
"through2": "^2.0.1",
"web3": "^0.15.1",
"web3-provider-engine": "^7.2.1",
"xtend": "^4.0.1"
},
"devDependencies": {
"brfs": "^1.4.3",
"babel-preset-es2015": "^6.6.0",
"babelify": "^7.2.0",
"babel-register": "^6.7.2",
"beefy": "^2.1.5",
"browserify": "^13.0.0",
"chai": "^3.5.0",
"deep-freeze-strict": "^1.1.1",
"del": "^2.2.0",
"gulp": "github:gulpjs/gulp#4.0",
"gulp-livereload": "^3.8.1",
@ -45,8 +82,10 @@
"jshint-stylish": "~0.1.5",
"lodash.assign": "^4.0.6",
"mocha": "^2.4.5",
"mocha-jsdom": "^1.1.0",
"mocha-sinon": "^1.1.5",
"sinon": "^1.17.3",
"uglifyify": "^3.0.1",
"vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "^1.1.0",
"watchify": "^3.7.0"

View File

@ -1,14 +0,0 @@
## Installation
```
git clone git@github.com:MetaMask/metamask-ui.git
cd metamask-ui
npm install
grunt dev
```
## Testing
Requires `mocha` installed. Run `npm install -g mocha`.
You can either run the test suite once with `npm test`, or you can reload on file changes, by running `mocha watch test/**/**`.

View File

@ -1,58 +0,0 @@
{
"name": "metamask-ui",
"version": "1.5.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "mocha test/**/*test.js",
"watch": "mocha watch test/**/*test.js",
"start": "beefy example.js:bundle.js --live --open",
"build": "browserify example.js -g uglifyify -o bundle.js"
},
"author": "",
"license": "ISC",
"devDependencies": {
"beefy": "^2.1.5",
"chai": "^3.5.0",
"deep-freeze-strict": "^1.1.1",
"jsdom": "^8.1.0",
"mocha": "^2.4.5",
"mocha-jsdom": "^1.1.0",
"sinon": "^1.17.3",
"uglifyify": "^3.0.1"
},
"browserify": {
"transform": [
[
"babelify",
{
"presets": [
"es2015"
]
}
],
"brfs"
]
},
"dependencies": {
"babel-preset-es2015": "^6.3.13",
"babelify": "^7.2.0",
"brfs": "^1.4.2",
"browserify": "^12.0.1",
"copy-to-clipboard": "^1.1.1",
"debounce": "^1.0.0",
"ethereumjs-util": "^2.6.0",
"inject-css": "^0.1.1",
"metamask-logo": "^1.1.3",
"react": "^0.14.3",
"react-addons-css-transition-group": "^0.14.7",
"react-dom": "^0.14.3",
"react-hyperscript": "^2.2.2",
"react-redux": "^4.0.3",
"redux": "^3.0.5",
"redux-logger": "^2.3.1",
"redux-thunk": "^1.0.2",
"textarea-caret": "^3.0.1",
"xtend": "^4.0.1"
}
}