MyCrypto is an open-source, client-side tool for generating ether wallets, handling ERC-20 tokens, and interacting with the blockchain more easily. https://mycrypto.com
Go to file
William O'Beirne 7d5e590c42 Manifest and Favicons (#69)
* Move favicon stuff to static folder. Expand manifest.json. Link it all up in HTML.

* Undo index changes

* Remove unnecessary readme
2017-07-22 15:55:59 -05:00
common Manifest and Favicons (#69) 2017-07-22 15:55:59 -05:00
flow-typed Complete Generate/Create Wallet Flow (#38) 2017-07-16 16:02:13 -05:00
jest_config invalid pkey message 2017-07-04 16:19:04 +04:00
spec balance fetching (#41) 2017-07-13 16:02:39 -05:00
static Manifest and Favicons (#69) 2017-07-22 15:55:59 -05:00
webpack_config Fixed trying to improperly delete our dist folder. (#36) 2017-07-17 10:35:25 -05:00
.babelrc create babelcrc with flow support 2017-04-11 23:58:49 -05:00
.editorconfig update .editorconfig 2017-07-04 15:16:08 +04:00
.eslintrc.json Complete Generate/Create Wallet Flow (#38) 2017-07-16 16:02:13 -05:00
.flowconfig make flow work with aliasing 2017-05-25 02:39:58 +04:00
.gitignore add .idea to gitignore 2017-04-12 00:01:39 -05:00
.nvmrc Enforce node / npm versions, add package-lock.json (#57) 2017-07-18 19:41:17 -05:00
.travis.yml Enforce node / npm versions, add package-lock.json (#57) 2017-07-18 19:41:17 -05:00
Dockerfile Enforce node / npm versions, add package-lock.json (#57) 2017-07-18 19:41:17 -05:00
LICENSE Initial commit 2016-12-04 02:35:28 +01:00
README.md First attempt at CSS modules (#48) 2017-07-14 23:16:36 -05:00
docker-compose.yml Docker (#40) 2017-07-10 22:03:08 -05:00
package-lock.json Update flow-bin version to 0.50.0 (#67) 2017-07-21 13:49:30 -05:00
package.json Update flow-bin version to 0.50.0 (#67) 2017-07-21 13:49:30 -05:00

README.md

MyEtherWallet

MyEtherWallet (v4+)

Run:

npm run dev # run app in dev mode

Build:

npm run build # build app

It generates app in dist folder.

Test:

npm run test # run tests with Jest

Folder structure:

│
├── common - Your App
│   ├── actions - application actions
│   ├── api - Services and XHR utils(also custom form validation, see InputComponent from components/common)
│   ├── components - components according to "Redux philosophy"
│   ├── config - frontend config depending on REACT_WEBPACK_ENV
│   ├── containers - containers according to "Redux philosophy"
│   ├── reducers - application reducers
│   ├── routing - application routing
│   ├── index.jsx - entry
│   ├── index.html
├── static
├── webpack_config - Webpack configuration
├── jest_config - Jest configuration

Docker setup

You should already have docker and docker-compose setup for your platform as a pre-req.

docker-compose up

Style Guides and Philosophies

The following are guides for developers to follow for writing compliant code.

Styling

Legacy styles are housed under common/assets/styles and written with LESS. However, going forward, each styled component should create a a .scss file of the same name in the same folder, and import it like so:

import React from "react";

import "./MyComponent.scss";

export default class MyComponent extends React.component {
	render() {
		return (
			<div className="MyComponent">
				<div className="MyComponent-child">Hello!</div>
			</div>
		);
	}
}

These style modules adhere to SuitCSS naming convention:

.MyComponent {
	/* Styles */

	&-child {
		/* Styles */

		&.is-hidden {
			display: none;
		}
	}
}

All elements inside of a component should extend its parent class namespace, or create a new namespace (Potentially breaking that out into its own component.)

Variables and mixins can be imported from the files in common/styles:

@import "sass/colors";

code {
	color: $code-color;
}

Converting Styles

When working on a module that has styling in Less, try to do the following:

  • Screenshot the component in question
  • Create a new SCSS file in the same directory
  • Remove styling from LESS file, convert it to the SCSS file (Mostly s/@/$)
  • Convert class names to SuitCSS naming convention
  • Convert any utility classes from etherewallet-utilities.less into mixins
  • Convert as many element selectors to class name selectors as possible
  • Convert as many <br/> tags or &nbsp;s to margins
  • Ensure that there has been little to no deviation from screenshot