-
-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
006e6a1
commit 89358ff
Showing
11 changed files
with
150 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,30 @@ | ||
# Custom Babel Configuration Example | ||
|
||
## How to use | ||
|
||
Download the example [or clone the whole project](https://github.com/palmerhq/backpack.git): | ||
|
||
```bash | ||
curl https://codeload.github.com/palmerhq/backpack/tar.gz/master | tar -xz --strip=2 backpack-master/examples/with-custom-babel-config | ||
cd with-custom-babel-config | ||
``` | ||
|
||
Install it and run: | ||
|
||
```bash | ||
npm install | ||
npm run dev | ||
``` | ||
|
||
## Idea behind the example | ||
|
||
This demonstrates how extend the default Backpack babel configuration with a custom `.babelrc` file. | ||
More specifically, this example shows how to add all `stage-0` transformations through `babel-preset-stage-0`. | ||
|
||
Be sure to include `backpack-core/babel` in your `.babelrc` as the first item in the presets array: | ||
|
||
```json | ||
{ | ||
"presets": [ | ||
"backpack-core/babel", | ||
"..." | ||
] | ||
"presets": ["backpack-core/babel", "..."] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,23 @@ | ||
# Custom Webpack Configuration Example | ||
|
||
## How to use | ||
|
||
Download the example [or clone the whole project](https://github.com/palmerhq/backpack.git): | ||
|
||
```bash | ||
curl https://codeload.github.com/palmerhq/backpack/tar.gz/master | tar -xz --strip=2 backpack-master/examples/with-custom-webpack-config | ||
cd with-custom-webpack-config | ||
``` | ||
|
||
Install it and run: | ||
|
||
```bash | ||
npm install | ||
npm run dev | ||
``` | ||
|
||
## Idea behind the example | ||
This demonstrates how to customize the underlying Webpack 2 configuration in a Backpack project using a `backpack.config.js` file. | ||
The app itself is exactly the same simple Express.js server in the basic example. However, the entry point to the application has been | ||
|
||
This demonstrates how to customize the underlying Webpack 2 configuration in a Backpack project using a `backpack.config.js` file. | ||
The app itself is exactly the same simple Express.js server in the basic example. However, the entry point to the application has been | ||
changed from `./src/index.js` to `./services/main.js`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,24 @@ | ||
# FlowType Example | ||
|
||
## How to use | ||
|
||
Download the example [or clone the whole project](https://github.com/palmerhq/backpack.git): | ||
|
||
```bash | ||
curl https://codeload.github.com/palmerhq/backpack/tar.gz/master | tar -xz --strip=2 backpack-master/examples/with-flowtype | ||
cd with-flowtype | ||
``` | ||
|
||
Install it and run: | ||
|
||
```bash | ||
npm install | ||
npm run dev | ||
``` | ||
|
||
## Idea behind the example | ||
This demonstrates how to add [Flow](https://flowtype.org/) to your Backpack project. Flow is a static type checker that helps you write code | ||
|
||
This demonstrates how to add [Flow](https://flowtype.org/) to your Backpack project. Flow is a static type checker that helps you write code | ||
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. | ||
|
||
To learn more about Flow, take a look at [its documentation](https://flowtype.org/). |
Oops, something went wrong.