Skip to content

Commit e5b7a85

Browse files
committed
Instructions in readme
1 parent ca539ea commit e5b7a85

File tree

2 files changed

+112
-2
lines changed

2 files changed

+112
-2
lines changed

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2011-present, Modus Create, Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+91-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
1-
# Modus React Application Scaffolding
1+
# Modus React (MORe) Application Scaffolding
22

33
Monorepo containing setup for a best-practice React application scaffolding
44

5-
### Installing
5+
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
6+
[![MIT Licensed](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/your/your-project/blob/master/LICENSE)
7+
[![Powered by Modus_Create](https://img.shields.io/badge/powered_by-Modus_Create-blue.svg?longCache=true&style=flat&logo=data:image/svg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uNzAxIDEzLjE1MiA3LjU5MyAyNy4xNiA4LjQ1IDQxLjcxNC01MC4xMzMgNC40Ni05MC40MzMgNDMuMDgtOTcuNDQzIDkyLjQzem01NC4yNzgtNjguMTA1YzEyLjc5NC04LjEyNyAyNy41NjctMTMuNDA3IDQzLjQ1Mi0xNC45MTEtLjI0NyA4Mi45NTctNjcuNTY3IDE1MC4xMzItMTUwLjU4MiAxNTAuMTMyLTIuODQ2IDAtNS42NzMtLjA4OC04LjQ4LS4yNDNhMTU5LjM3OCAxNTkuMzc4IDAgMCAwIDguMTk4LTQyLjExOGMuMDk0IDAgLjE4Ny4wMDguMjgyLjAwOCA1NC41NTcgMCA5OS42NjUtNDAuMzczIDEwNy4xMy05Mi44Njh6IiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz4KPC9zdmc+)](https://moduscreate.com)
8+
9+
## Goal: 0-config Best-Practice React Scaffolding
10+
11+
The goal of Modus-React (MORe) is to enable teams to use best-practice React scaffolding without having to worry about the config.
12+
13+
Although influenced by Create-React-App (CRA), this setup is different in a way that it gives more flexibility in some areas and takes away in others in an effort to promote healthy architectural patterns.
14+
15+
CRA is notorious for making it hard add customizations to Webpack or Babel without ejecting. MORe exposes configuration files to make it easier to extend.
16+
17+
MORe encourages specific design patterns that are enterprise-friendly. We discourage using hip new libraries in favor of proven industry-standard techniques.
18+
19+
## Installing
620

721
```bash
822
npm i @modus/babel-preset-react @modus/eslint-config-modus @modus/more --registry=https://npm.modus.app/
@@ -12,6 +26,8 @@ Then use [sample project](../sample) as a basis for setting up `package.json`, `
1226

1327
**TODO:** use `modus` CLI to do that automatically
1428

29+
## Using
30+
1531
### ENV variables
1632

1733
You can use environment variables to configure build scripts.
@@ -35,6 +51,25 @@ You can override any of these variables with `.env` files. We support these form
3551

3652
The order of inclusion means that anything in `.env` will override content in e.g. `.env.development.local`.
3753

54+
### Extending Webpack
55+
56+
MORe processes a built in Webpack configuration. If your project has a `webpack.config.js` file in root, the build process will include it and pass the default config to it.
57+
58+
Make sure your configuration exports a function. The default configuration will be passed as an JavaScript object to the argument.
59+
60+
##### Example:
61+
62+
```js
63+
// webpack.config.js
64+
65+
module.exports = defaultConfig => {
66+
return {
67+
...defaultConfig,
68+
stats: false,
69+
};
70+
};
71+
```
72+
3873
### DLLs
3974

4075
DLLs precompile libraries to save time for development builds and re-builds.
@@ -69,3 +104,57 @@ HTML templates can consume variables. Variables are defined in `meta` property o
69104
<body></body>
70105
</html>
71106
```
107+
108+
## Development
109+
110+
Make sure you have Lerna installed.
111+
112+
```sh
113+
npm i -g lerna
114+
lerna bootstrap
115+
```
116+
117+
This is a monorepo with all packages needed for a successful React Application scaffolding.
118+
119+
### Adding dependencies
120+
121+
```sh
122+
lerna add some-package --scope @modus/more
123+
```
124+
125+
You can use the same command to add monorepo packages to one another (similar to `npm link`)
126+
127+
```sh
128+
lerna add @modus/eslint-config-modus --scope @modus/more
129+
```
130+
131+
### Publishing
132+
133+
The project is currently published to Modus internal npm repo [https://npm.modus.app](https://npm.modus.app). This will change once we have a stable project.
134+
135+
```sh
136+
lerna publish
137+
```
138+
139+
## Contributing
140+
141+
Take a look at the [project board](https://github.com/ModusCreateOrg/modus-react/projects/1) and see if there's anything you can help with. Once you find an item you could work on, please take ownership of the backlog item.
142+
143+
1. Create a fork
144+
2. Create a WIP PR asap and reference (e.g. #4) the backlog item you're working on.
145+
3. Complete work and tag reviewers
146+
4. Let us know in Slack when you start and finish or when you need any help
147+
148+
# Modus Create
149+
150+
[Modus Create](https://moduscreate.com) is a digital product consultancy. We use a distributed team of the best talent in the world to offer a full suite of digital product design-build services; ranging from consumer facing apps, to digital migration, to agile development training, and business transformation.
151+
152+
[![Modus Create](https://res.cloudinary.com/modus-labs/image/upload/h_80/v1533109874/modus/logo-long-black.png)](https://moduscreate.com)
153+
154+
This project is part of [Modus Labs](https://labs.moduscreate.com).
155+
156+
[![Modus Labs](https://res.cloudinary.com/modus-labs/image/upload/h_80/v1531492623/labs/logo-black.png)](https://labs.moduscreate.com)
157+
158+
# Licensing
159+
160+
This project is [MIT licensed](./LICENSE).

0 commit comments

Comments
 (0)