Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Lock committed Apr 23, 2019
0 parents commit 0144d5a
Show file tree
Hide file tree
Showing 46 changed files with 9,630 additions and 0 deletions.
76 changes: 76 additions & 0 deletions .github/CODE_OF_CONDUCT.md
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at zach.kalman@consensys.net. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
48 changes: 48 additions & 0 deletions .github/CONTRIBUTIONS.md
@@ -0,0 +1,48 @@
Contributing to Rimble UI
=========================================

When contributing, please follow the [Code of Conduct](CODE_OF_CONDUCT.md).

Issues
------

Feel free to submit issues and enhancement requests.

Contributing
------------

We follow the "fork-and-pull" Git workflow.

1. **Fork** the repo on GitHub
2. **Clone** the project to your own machine
3. **Commit** changes to your own branch
4. **Push** your work back up to your fork
5. Submit a **Pull request** and we will review your changes

Copyright and Licensing
-----------------------

All contributions to this codebase will be under the MIT License.

MIT License

Copyright (c) 2018-2019 ConsenSys

[View the full license](./../LICENSE.txt)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/pull_request_template.md
@@ -0,0 +1,6 @@
Fixes #

Changes proposed in the Pull Request:
-
-
-
3 changes: 3 additions & 0 deletions .gitignore
@@ -0,0 +1,3 @@
node_modules
*.log
dist
11 changes: 11 additions & 0 deletions .travis.yml
@@ -0,0 +1,11 @@
language: node_js
node_js:
- "11"
- "10"
- "8"
before_install:
- npm install -g lerna
- lerna bootstrap
install:
- yarn install
- yarn build
21 changes: 21 additions & 0 deletions LICENSE.txt
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 ConsenSys, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
117 changes: 117 additions & 0 deletions README.md
@@ -0,0 +1,117 @@
# Rimble Web3 Components

Monorepo for React components and utility library that help developers build web3 dapps faster with better UX.

## Requirements

[Node](https://nodejs.org/en/) - [OS-dependent install instructions](https://nodejs.org/en/)

[Yarn](https://yarnpkg.com/en/) - [OS-dependent install instructions](https://yarnpkg.com/en/docs/install)

[Lerna](https://lerna.js.org/) - `npm install -g lerna`

## Quick Start

Install all dependencies

`yarn install`

Bootstrap packages with lerna

`lerna bootstrap`

## Monorepo Scripts

Run linting on all packages

`lerna run lint`

Run tests on all packages

`lerna run test`

Compile libraries with Rollup

`yarn build`

Commit changes to libraries

`git commit -am “commit message”`

Publish updated packages to NPM

`lerna publish`

### For CI build environment

Remove existing compiled packages, lint and test

`lerna run check-packages`

### Monorepo structure

```text
├── node_modules
├── packages
│ ├── ConnectionBanner
│ │ ├── src
│ │ ├── test
│ │ ├── babel.config.js
│ │ ├── eslint.config.js
│ │ ├── jest.config.js
│ │ ├── prettier.config.js
│ │ ├── package.json
│ │ └── task -> ../../scripts/task
│ ├── NetworkIndicator
│ │ └── ... (same for all components)
│ ├── Utils
│ │ ├── src
│ │ ├── test
│ │ ├── babel.config.js
│ │ ├── eslint.config.js
│ │ ├── jest.config.js
│ │ ├── prettier.config.js
│ │ ├── package.json
│ │ └── task -> ../../scripts/task
│ └── ...
├── scripts
│ └── task
├── babel.config.js
├── eslint.config.js
├── jest.config.js
├── lerna.json
├── lint-staged.config.js
├── package.json
├── prettier.config.js
└── rollup.config.js
```

- Yarn handles dependencies
- Root package defines shared development tooling (lint, prettier, babel)
- Default base config files for each tool exist in root
- Config files are shared by all packages
- Each package is for a releasable component or library
- All packages share same structure and tooling
- Config files for each tool are import defaults from root
- Config files for any tool can be extended for individual package needs
- Symlinks to a common `task` script that defines how tools are invoked by lerna
- Each package is versioned independently via the `lerna publish` command
- Rollup transpiles via babel releasable packages
- Lerna handles multiple package tasks (test, lint, publish)

### Misc

To publish to a new package to NPM you must first manually create the package via the command line.
`npm publish --access public`

### Issues

[Open an issue](https://github.com/ConsenSys/rimble-web3-components/issues) for any bugs or feature requests

### Contributing

We are open source and welcome your contributions!

### License

MIT © [ConsenSys](https://github.com/ConsenSys)
11 changes: 11 additions & 0 deletions babel.config.js
@@ -0,0 +1,11 @@
module.exports = {
"presets": [
["@babel/preset-env", {
"modules": false
}],
"@babel/preset-react"
],
"plugins": [
["@babel/plugin-proposal-class-properties", { "loose": true }]
]
}
18 changes: 18 additions & 0 deletions eslint.config.js
@@ -0,0 +1,18 @@
module.exports = {
parser: 'babel-eslint',
extends: ['airbnb', 'prettier', 'prettier/react'],
plugins: ['react', 'prettier'],
rules: {
'react/jsx-filename-extension': [
1,
{
extensions: ['.js', 'jsx'],
},
],
'prettier/prettier': 'error',
'max-len': ['error', 80],
},
env: {
browser: true,
},
};
1 change: 1 addition & 0 deletions jest.config.js
@@ -0,0 +1 @@
module.exports = {};
6 changes: 6 additions & 0 deletions lerna.json
@@ -0,0 +1,6 @@
{
"lerna": "2.11.0",
"npmClient": "yarn",
"useWorkspaces": true,
"version": "independent"
}
3 changes: 3 additions & 0 deletions lint-staged.config.js
@@ -0,0 +1,3 @@
module.exports = {
'*.js': ['prettier --write', 'git add'],
};

0 comments on commit 0144d5a

Please sign in to comment.