Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
Lerna and webpack updates (#914)
Browse files Browse the repository at this point in the history
* Cleanup install:dev command

* Update package-lock.json

* Update lock files

* Add all packages to lerna

* Convert to ES6 modules

* Move devDependencies to root and unify linting

* Fix origin-js webpack config

* Add eslint files

* Update lock files

* Update packages.json files

* Remove webpack serving from origin-js

* Fixes to deployment dockerfiles

* Update lock files

* Build and package fixes

* Stream build output

* Update lock files

* Add production env var

* Add universal lint to TravisCI

* Remove JS formatting from origin-js in favour of universal

* Set node version in linting test

* Appease linter

* Temporarily remove caching from TravisCI

* Revert "Temporarily remove caching from TravisCI"

This reverts commit 6d9fc7c.

* CI test

* CI test

* Only install devDependencies of root for linter

* CI test

* Add common dependency install

* Fix scoping

* Fix Travis error

* Comment out DApp tests

* Cleanup origin-dapp tests

* Update lock files

* Upgrade babel polyfill

* Rearrange dependencies

* Fix test issue

* Cleanup docs and deploy script

* Remove deployment doc

* Cleanup old style secrets

* Fix syntax of .travis.yml

* Update linting

* Cleanup linting

* Add missing plugin

* Add missing package

* Fix ipfs-proxy test

* Fix test errors

* Fix tests

* Add missing package

* Update lock files

* Remove website Docker compose setup

* Cleanup old messaging ipfs container

* Remove screenshot

* Update Docker Compose config

* Fixes for origin-box

* Add comment

* Add lint command to discovery

* Fix faucet dependencies

* Move contributing file to top level

* Documentation cleanup

* Update origin-box docs

* Docs update

* More tests

* Appease linter

* Fixes for notifications

* Notifications container and updates

* Container tweaks

* Update lock files

* Tweak doc

* Tweak container copy

* Test including built contracts

* Revert "Test including built contracts"

This reverts commit 285a190.

* Change webpack config

* Update lock files

* Add build step to event-listener containers

* Update lock files

* Make listener happy with ES6 export

* Mount host dist for origin-js into event-listener

* Container fixes

* Update origin-js readme

* Alter event-listener startup command in origin-box

* Fix broken event-listener dockerfile

* Toggle production NODE_ENV for dapp

* Fix event-listener container

* Container tweaks and commenting

* Add contributing text to root readme

* Change file casing

* Fix linting

* Fix babel references

* Update README.md files

* Add build and dev option to origin-messaging and update to babel 7

* Remove origin-dapp from .eslintignore

* Add scoping to npm run dev command

* Update messaging containers for new comands

* Update lock files

* Development event-listener fixes

* Add VAPID key generation if not provided

* Fix VAPID key generation

* Remove install script

* Clean up networks for postgresql

* Container fixes and CORS support for origin-discovery

* Remove extra semicolon

* Package upgrades

* Update lock files

* Remove unnecessary var

* Update lock files

* Lock file regen

* Update lock files

* Make linter happy

* Fix tests

* Fix dev start command

* Revert GraphQL upgrade due to test failure

* Fix origin-discovery lock file

* Fix fs calls

* Change to `npm start`

* Fix babel references
  • Loading branch information
Tom Linton authored Nov 13, 2018
1 parent 1a8db4f commit b4c0b52
Show file tree
Hide file tree
Showing 136 changed files with 61,683 additions and 86,038 deletions.
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/node_modules/*
origin-contracts/*
**/build/*
**/dist/*
71 changes: 71 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"root": true,
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"impliedStrict": true
}
},
"globals": {
"web3": true,
"originTest": true
},
"env": {
"browser": true,
"node": true,
"es6": true,
"mocha": true
},
"plugins": [
"react"
],
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"rules": {
"computed-property-spacing": [
"error"
],
"jsx-quotes": [
"error"
],
"key-spacing": [
"error"
],
"no-case-declarations": [
"off"
],
"no-console": [
"off"
],
"no-var": [
"error"
],
"object-curly-spacing": [
"error",
"always"
],
"prefer-const": [
"error"
],
"quotes": [
"error",
"single",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
],
"react/no-deprecated": "off",
"react/no-children-prop": "off",
"react/prop-types": "off",
"semi": [
"error",
"never"
]
}
}
158 changes: 112 additions & 46 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,118 @@
---
git:
depth: 3
matrix:
include:
- name: "origin-contracts / js / dapp unit tests"
language: node_js
cache:
npm: true
directories:
- origin-contracts/node_modules
- origin-dapp/node_modules
- origin-js/node_modules
before_cache:
- rm -rf origin-contracts/node_modules/.cache
- rm -rf origin-dapp/node_modules/.cache
- rm -rf origin-js/node_modules/.cache
node_js: 10
- name: "ipfs-proxy tests"
language: node_js
node_js: 10
cache:
npm: true
directories:
- ipfs-proxy/node_modules
before_cache:
- rm -rf ipfs-proxy/node_modules/.cache
install:
- npm install --ignore-scripts
- npm run bootstrap -- --scope ipfs-proxy
script:
- lerna run lint --scope ipfs-proxy
- lerna run test --scope ipfs-proxy

- name: "Origin-discovery unit tests"
language: node_js
cache:
npm: true
directories:
- origin-contracts/node_modules
- origin-dapp/node_modules
- origin-js/node_modules
- origin-discovery/node_modules
before_cache:
- rm -rf origin-contracts/node_modules/.cache
- rm -rf origin-dapp/node_modules/.cache
- rm -rf origin-js/node_modules/.cache
- rm -rf origin-discovery/node_modules/.cache
node_js: 10
addons:
postgresql: 9.6
services:
- postgresql
env:
- DATABASE_URL=postgres://postgres@localhost/travis_ci_test
before_script:
- psql -c 'create database travis_ci_test;' -U postgres
- cd origin-discovery
- npm run migrate
- name: "origin-bridge tests"
language: python
python: 3.6
before_script:
- cd origin-bridge
- pip install -r requirements.txt
script:
- pytest --flakes --codestyle

- name: "Bridge server unit tests"
language: python
python: 3.6
before_script:
- cd origin-bridge
- pip install -r requirements.txt
script:
- pytest --flakes --codestyle
- name: "origin-contracts tests"
language: node_js
node_js: 10
cache:
npm: true
directories:
- origin-contracts/node_modules
before_cache:
- rm -rf origin-contracts/node_modules/.cache
install:
- npm install --ignore-scripts
- npm run bootstrap -- --scope origin-contracts
script:
- lerna run test --scope origin-contracts

- name: "origin-dapp tests"
language: node_js
node_js: 10
install:
- npm install --ignore-scripts
script:
- lerna run lint --scope origin-dapp

- name: "origin-discovery tests"
language: node_js
node_js: 10
cache:
npm: true
directories:
- origin-contracts/node_modules
- origin-js/node_modules
- origin-discovery/node_modules
before_cache:
- rm -rf origin-contracts/node_modules/.cache
- rm -rf origin-js/node_modules/.cache
- rm -rf origin-discovery/node_modules/.cache
addons:
postgresql: 9.6
services:
- postgresql
env:
- DATABASE_URL=postgres://postgres@localhost/travis_ci_test
before_script:
- psql -c 'create database travis_ci_test;' -U postgres
- lerna run migrate --scope origin-discovery
install:
- npm install --ignore-scripts
- npm run bootstrap -- --scope origin-contracts
- npm run bootstrap -- --scope origin
- npm run bootstrap -- --scope origin-discovery
script:
- lerna run lint --scope origin-discovery
- lerna run test --scope origin-discovery

- name: "origin-js tests"
language: node_js
node_js: 10
cache:
npm: true
directories:
- origin-contracts/node_modules
- origin-js/node_modules
before_cache:
- rm -rf origin-contracts/node_modules/.cache
- rm -rf origin-js/node_modules/.cache
install:
- npm install --ignore-scripts
- npm run bootstrap -- --scope origin-contracts
- npm run bootstrap -- --scope origin
script:
- lerna run lint --scope origin
- lerna run test --scope origin

- name: "origin-messaging tests"
language: node_js
node_js: 10
install:
- npm install --ignore-scripts
script:
- lerna run lint --scope origin-messaging

- name: "origin-notifications tests"
language: node_js
node_js: 10
install:
- npm install --ignore-scripts
script:
- lerna run lint --scope origin-notifications
8 changes: 4 additions & 4 deletions origin-js/CONTRIBUTING.md → CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Contributing to Origin.js
# Contributing to Origin

Thanks for helping out! 👍

Before you summit a PR, you'll want to make sure that:

1. Any changes are tested.
2. All tests pass. (See each package's readme for instructions on testing that package.)
3. The formatting is correct. Just run `npm run format` in a package folder.
2. All tests pass. Run `npm run test` from the root of the repository to run all packages tests or run `lerna run test --scope <package_name>` to run the tests for a single package.
3. The formatting is correct. Run `npm run lint` from the root of the repository.

If this is a new feature, make sure you've discussed it with [our #engineering channel on Discord](https://www.originprotocol.com/discord).

Expand All @@ -17,4 +17,4 @@ We use [NPM style](https://docs.npmjs.com/misc/coding-style), as automated by th

### Coding style: Solidity

We use two space indents. Just copy the surrounding style and use your good judgement.
We use two space indents. Just copy the surrounding style and use your good judgement.
Loading

0 comments on commit b4c0b52

Please sign in to comment.