Skip to content

Commit 89358ff

Browse files
committed
Run prettier on all readme's
1 parent 006e6a1 commit 89358ff

File tree

11 files changed

+150
-107
lines changed

11 files changed

+150
-107
lines changed

CODE_OF_CONDUCT.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
# Contributor Covenant Code of Conduct
2+
23
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
4+
35
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
6+
47
**Table of Contents**
58

6-
- [Contributor Covenant Code of Conduct](#contributor-covenant-code-of-conduct)
7-
- [Our Pledge](#our-pledge)
8-
- [Our Standards](#our-standards)
9-
- [Our Responsibilities](#our-responsibilities)
10-
- [Scope](#scope)
11-
- [Enforcement](#enforcement)
12-
- [Attribution](#attribution)
9+
* [Contributor Covenant Code of Conduct](#contributor-covenant-code-of-conduct)
10+
* [Our Pledge](#our-pledge)
11+
* [Our Standards](#our-standards)
12+
* [Our Responsibilities](#our-responsibilities)
13+
* [Scope](#scope)
14+
* [Enforcement](#enforcement)
15+
* [Attribution](#attribution)
1316

1417
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
1518

@@ -36,7 +39,7 @@ include:
3639
Examples of unacceptable behavior by participants include:
3740

3841
* The use of sexualized language or imagery and unwelcome sexual attention or
39-
advances
42+
advances
4043
* Trolling, insulting/derogatory comments, and personal or political attacks
4144
* Public or private harassment
4245
* Publishing others' private information, such as a physical or electronic
@@ -84,4 +87,4 @@ This Code of Conduct is adapted from the [Contributor Covenant][homepage], versi
8487
available at [http://contributor-covenant.org/version/1/4][version]
8588

8689
[homepage]: http://contributor-covenant.org
87-
[version]: http://contributor-covenant.org/version/1/4/
90+
[version]: http://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
# How to Contribute to Backpack
2+
23
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
4+
35
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
6+
47
**Table of Contents**
58

6-
- [How to Contribute to Backpack](#how-to-contribute-to-backpack)
7-
- [Getting started](#getting-started)
8-
- [Using Lerna](#using-lerna)
9-
- [Support](#support)
9+
* [How to Contribute to Backpack](#how-to-contribute-to-backpack)
10+
* [Getting started](#getting-started)
11+
* [Using Lerna](#using-lerna)
12+
* [Support](#support)
1013

1114
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
1215

1316
## Getting started
14-
First fork the project to your GitHub account. Then clone it, checkout a new branch, and install the dependencies.
17+
18+
First fork the project to your GitHub account. Then clone it, checkout a new branch, and install the dependencies.
1519

1620
```bash
1721
git clone https://github.com/YOUR_USERNAME/backpack.git
@@ -33,12 +37,12 @@ npm run dev
3337

3438
Next, I open up `packages/backpack-core/webpack.config.js` in my editor and make some changes to the webpack configuration focusing on development mode.
3539

36-
To try out these local changes, I would need to:
37-
38-
- Kill the running example (i.e. `CMD + c`)
39-
- Rerun it to pickup changes (i.e. `npm run dev`)
40+
To try out these local changes, I would need to:
4041

41-
That's it.
42+
* Kill the running example (i.e. `CMD + c`)
43+
* Rerun it to pickup changes (i.e. `npm run dev`)
44+
45+
That's it.
4246

4347
## Using Lerna
4448

@@ -47,17 +51,14 @@ When moving between branches, it's a good idea to work with a fresh install.
4751
In your project's root run the following:
4852

4953
```bash
50-
./node_modules/bin/lerna clean
54+
./node_modules/bin/lerna clean
5155
./node_modules/bin/lerna bootstrap
5256
```
5357

5458
This will clean out, reinstall, rebuild, and symlink all of the `examples` and `packages` properly.
5559

56-
5760
## Support
5861

59-
- Join the #backpack channel in our public Slack group. Sign up at [https://palmer.chat](https://palmer.chat/)
60-
- File an issue on GitHub
61-
- Tweet to or DM [@jaredpalmer](https://twitter.com/jaredpalmer)
62-
63-
62+
* Join the #backpack channel in our public Slack group. Sign up at [https://palmer.chat](https://palmer.chat/)
63+
* File an issue on GitHub
64+
* Tweet to or DM [@jaredpalmer](https://twitter.com/jaredpalmer)

README.md

Lines changed: 44 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,32 @@ Backpack is minimalistic build system for Node.js. Inspired by Facebook's [creat
77

88
**Backpack comes with the "battery-pack included":**
99

10-
- Latest ES6 features (including module syntax, async/await, object rest spread)
11-
- SUPER friendly, human readable error messages
12-
- Live reload (on saves, add/delete file, etc.)
13-
- Zero-config, one dependency.
10+
* Latest ES6 features (including module syntax, async/await, object rest spread)
11+
* SUPER friendly, human readable error messages
12+
* Live reload (on saves, add/delete file, etc.)
13+
* Zero-config, one dependency.
1414

15-
HOWEVER, you can configure Backpack to your project's needs by extending [the underlying Webpack 2 configuration](#custom-configuration).
15+
HOWEVER, you can configure Backpack to your project's needs by extending [the underlying Webpack 2 configuration](#custom-configuration).
1616

1717
**PLEASE READ:** If you're thinking of using Backpack with React.js, you should use [Razzle](https://github.com/jaredpalmer/razzle) instead. It is a project purpose-built for SSR React with an almost identical API.
1818

1919
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
20+
2021
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
22+
2123
**Table of Contents**
2224

23-
- [How to use](#how-to-use)
24-
- [Custom configuration](#custom-configuration)
25-
- [Customizing webpack config](#customizing-webpack-config)
26-
- [Customizing babel config](#customizing-babel-config)
27-
- [Building for Production](#building-for-production)
28-
- [CLI Commands](#cli-commands)
29-
- [`backpack dev`](#backpack-dev)
30-
- [`backpack build`](#backpack-build)
31-
- [FAQ](#faq)
32-
- [Inspiration](#inspiration)
33-
- [Authors](#authors)
25+
* [How to use](#how-to-use)
26+
* [Custom configuration](#custom-configuration)
27+
* [Customizing webpack config](#customizing-webpack-config)
28+
* [Customizing babel config](#customizing-babel-config)
29+
* [Building for Production](#building-for-production)
30+
* [CLI Commands](#cli-commands)
31+
* [`backpack dev`](#backpack-dev)
32+
* [`backpack build`](#backpack-build)
33+
* [FAQ](#faq)
34+
* [Inspiration](#inspiration)
35+
* [Authors](#authors)
3436

3537
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
3638

@@ -54,7 +56,7 @@ and add a script to your package.json like this:
5456

5557
After that there are just a few ~~conventions~~ defaults:
5658

57-
- `src/index.js`: the entry of your app.
59+
* `src/index.js`: the entry of your app.
5860

5961
...actually that's it.
6062

@@ -64,7 +66,7 @@ You can then run your application in development mode:
6466
npm run dev
6567
```
6668

67-
Successful builds will show a console like this. *Note: screenshot taken from running the [basic example](https://github.com/palmerhq/backpack/tree/master/examples/basic)*
69+
Successful builds will show a console like this. _Note: screenshot taken from running the [basic example](https://github.com/palmerhq/backpack/tree/master/examples/basic)_
6870
<img src="https://cloud.githubusercontent.com/assets/4060187/21944379/eaba2fde-d9a3-11e6-87aa-f30ddc88b5a8.png" width="600" alt="npm run dev">
6971

7072
### Custom configuration
@@ -77,13 +79,13 @@ For custom advanced behavior, you can create a `backpack.config.js` in the root
7779
// You can however use the ES2015 features supported by your Node.js version.
7880
module.exports = {
7981
/* config options here */
80-
}
82+
};
8183
```
8284

8385
### Customizing webpack config
8486

85-
[Example](https://github.com/palmerhq/backpack/tree/master/examples/with-custom-webpack-config)
86-
87+
[Example](https://github.com/palmerhq/backpack/tree/master/examples/with-custom-webpack-config)
88+
8789
To extend webpack, you can define a function that extends its config via `backpack.config.js`.
8890

8991
```js
@@ -92,18 +94,18 @@ module.exports = {
9294
webpack: (config, options, webpack) => {
9395
// Perform customizations to config
9496
// Important: return the modified config
95-
return config
96-
}
97-
}
97+
return config;
98+
},
99+
};
98100
```
99101

100102
### Customizing babel config
101103

102-
[Example](https://github.com/palmerhq/backpack/tree/master/examples/with-custom-babel-config)
104+
[Example](https://github.com/palmerhq/backpack/tree/master/examples/with-custom-babel-config)
103105

104106
To extend our usage of `babel`, you can define a `.babelrc` file at the root of your app. This file is optional.
105107

106-
If found, Backpack will consider it to be the *source of truth*. Thus it must define what Backpack needs as well, which is the `backpack-core/babel` preset.
108+
If found, Backpack will consider it to be the _source of truth_. Thus it must define what Backpack needs as well, which is the `backpack-core/babel` preset.
107109

108110
This is designed so that you are not surprised by modifications we could make to the default `babel` configurations.
109111

@@ -118,7 +120,7 @@ Here's an example `.babelrc` file:
118120
}
119121
```
120122

121-
*Note: This works [exactly like Next.js does](https://github.com/zeit/next.js#customizing-babel-config).*
123+
_Note: This works [exactly like Next.js does](https://github.com/zeit/next.js#customizing-babel-config)._
122124

123125
### Building for Production
124126

@@ -137,20 +139,22 @@ Then run the build command and start your app
137139

138140
```bash
139141
npm run build
140-
node ./build/main.js
142+
node ./build/main.js
141143
```
142144

143145
## CLI Commands
144146

145147
### `backpack dev`
146-
Runs backpack in development mode.
147-
148+
149+
Runs backpack in development mode.
150+
148151
Your code will reload if you make edits.
149152
You will see the build errors in the console that look like this.
150153

151154
<img src="https://cloud.githubusercontent.com/assets/4060187/21944372/e2d5e556-d9a3-11e6-9842-0e01ce28ddd6.png" width="600" alt="backpack dev">
152155

153156
### `backpack build`
157+
154158
Builds the app for production to the `build` folder.
155159
It correctly bundles your production mode and optimizes the build for the best performance.
156160

@@ -160,9 +164,10 @@ You can run your production application with the following command:
160164
node ./build/main.js
161165
```
162166

163-
Your application is ready to be deployed!
167+
Your application is ready to be deployed!
168+
169+
_Note: Make sure to add the `build` directory to your `.gitignore` to keep compiled code out of your git repository_
164170

165-
*Note: Make sure to add the `build` directory to your `.gitignore` to keep compiled code out of your git repository*
166171
## FAQ
167172

168173
<details>
@@ -173,6 +178,7 @@ Your application is ready to be deployed!
173178
Yes in that they will all make your life easier.
174179

175180
No in that it that Backpack is focused on server-only applications. You should use create-react-app or Next.js for your frontend and then build your backend with Backpack.
181+
176182
</details>
177183

178184
<details>
@@ -196,11 +202,12 @@ We track V8. Since V8 has wide support for ES6, we don't transpile it. Since V8
196202
</details>
197203

198204
## Inspiration
199-
- [jlongster/backend-with-webpack](https://github.com/jlongster/backend-with-webpack)
200-
- [nyt/kyt](https://github.com/NYTimes/kyt)
201-
- [zeit/next.js](https://github.com/zeit/next.js)
202-
- [facebookincubator/create-react-app](https://github.com/facebookincubator/create-react-app)
205+
206+
* [jlongster/backend-with-webpack](https://github.com/jlongster/backend-with-webpack)
207+
* [nyt/kyt](https://github.com/NYTimes/kyt)
208+
* [zeit/next.js](https://github.com/zeit/next.js)
209+
* [facebookincubator/create-react-app](https://github.com/facebookincubator/create-react-app)
203210

204211
## Authors
205212

206-
- Jared Palmer ([@jaredpalmer](https://twitter.com/jaredpalmer)) - The Palmer Group
213+
* Jared Palmer ([@jaredpalmer](https://twitter.com/jaredpalmer)) - The Palmer Group

examples/basic/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Basic Example
22

33
## How to use
4+
45
Download the example [or clone the whole project](https://github.com/palmerhq/backpack.git):
56

67
```bash
@@ -16,6 +17,7 @@ npm run dev
1617
```
1718

1819
## Idea behind the example
20+
1921
This is a basic example of how to use Backpack in a project. It is a simple Express.js server. It demonstrates how easy it is to use
2022
Backpack in a project. It also shows off some of the default syntax features provided by Backpack such as async/await and object rest spread
2123
as well as a Webpack environment flag (`__DEV__`).
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
# Custom Babel Configuration Example
22

33
## How to use
4+
45
Download the example [or clone the whole project](https://github.com/palmerhq/backpack.git):
6+
57
```bash
68
curl https://codeload.github.com/palmerhq/backpack/tar.gz/master | tar -xz --strip=2 backpack-master/examples/with-custom-babel-config
79
cd with-custom-babel-config
810
```
11+
912
Install it and run:
13+
1014
```bash
1115
npm install
1216
npm run dev
1317
```
1418

1519
## Idea behind the example
20+
1621
This demonstrates how extend the default Backpack babel configuration with a custom `.babelrc` file.
1722
More specifically, this example shows how to add all `stage-0` transformations through `babel-preset-stage-0`.
1823

1924
Be sure to include `backpack-core/babel` in your `.babelrc` as the first item in the presets array:
2025

2126
```json
2227
{
23-
"presets": [
24-
"backpack-core/babel",
25-
"..."
26-
]
28+
"presets": ["backpack-core/babel", "..."]
2729
}
2830
```
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
# Custom Webpack Configuration Example
22

33
## How to use
4+
45
Download the example [or clone the whole project](https://github.com/palmerhq/backpack.git):
6+
57
```bash
68
curl https://codeload.github.com/palmerhq/backpack/tar.gz/master | tar -xz --strip=2 backpack-master/examples/with-custom-webpack-config
79
cd with-custom-webpack-config
810
```
11+
912
Install it and run:
13+
1014
```bash
1115
npm install
1216
npm run dev
1317
```
1418

1519
## Idea behind the example
16-
This demonstrates how to customize the underlying Webpack 2 configuration in a Backpack project using a `backpack.config.js` file.
17-
The app itself is exactly the same simple Express.js server in the basic example. However, the entry point to the application has been
20+
21+
This demonstrates how to customize the underlying Webpack 2 configuration in a Backpack project using a `backpack.config.js` file.
22+
The app itself is exactly the same simple Express.js server in the basic example. However, the entry point to the application has been
1823
changed from `./src/index.js` to `./services/main.js`.

examples/with-flowtype/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
# FlowType Example
22

33
## How to use
4+
45
Download the example [or clone the whole project](https://github.com/palmerhq/backpack.git):
6+
57
```bash
68
curl https://codeload.github.com/palmerhq/backpack/tar.gz/master | tar -xz --strip=2 backpack-master/examples/with-flowtype
79
cd with-flowtype
810
```
11+
912
Install it and run:
13+
1014
```bash
1115
npm install
1216
npm run dev
1317
```
1418

1519
## Idea behind the example
16-
This demonstrates how to add [Flow](https://flowtype.org/) to your Backpack project. Flow is a static type checker that helps you write code
20+
21+
This demonstrates how to add [Flow](https://flowtype.org/) to your Backpack project. Flow is a static type checker that helps you write code
1722
with fewer bugs. Check out this [introduction to using static types in JavaScript](https://medium.com/@preethikasireddy/why-use-static-types-in-javascript-part-1-8382da1e0adb) if you are new to this concept.
1823

1924
To learn more about Flow, take a look at [its documentation](https://flowtype.org/).

0 commit comments

Comments
 (0)