Skip to content

Commit 663baf4

Browse files
committed
Example for part 1 of the guide
1 parent 4a4ea88 commit 663baf4

File tree

11 files changed

+5211
-1
lines changed

11 files changed

+5211
-1
lines changed

.babelrc

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"env": {
3+
"production": {
4+
"presets": [
5+
[
6+
"@babel/preset-env",
7+
{
8+
"modules": false,
9+
"targets": {
10+
"browsers": [">0.25%", "not op_mini all"]
11+
}
12+
}
13+
],
14+
"@babel/preset-react",
15+
"@babel/preset-flow"
16+
],
17+
"plugins": [
18+
"@babel/plugin-syntax-dynamic-import",
19+
"@babel/plugin-proposal-object-rest-spread",
20+
"@babel/plugin-proposal-class-properties"
21+
]
22+
},
23+
"development": {
24+
"presets": [
25+
[
26+
"@babel/preset-env",
27+
{
28+
"modules": false,
29+
"targets": {
30+
"browsers": [">0.25%", "not op_mini all"]
31+
}
32+
}
33+
],
34+
"@babel/preset-react",
35+
"@babel/preset-flow"
36+
],
37+
"plugins": [
38+
"@babel/plugin-syntax-dynamic-import",
39+
"@babel/plugin-proposal-object-rest-spread",
40+
"@babel/plugin-proposal-class-properties"
41+
]
42+
},
43+
"test": {
44+
"presets": [
45+
"@babel/preset-env",
46+
"@babel/preset-react",
47+
"@babel/preset-flow"
48+
],
49+
"plugins": [
50+
"@babel/plugin-proposal-object-rest-spread",
51+
"@babel/plugin-proposal-class-properties"
52+
]
53+
}
54+
}
55+
}

.flowconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[ignore]
2+
.*/node_modules/.*
3+
.*/public/.*
4+
.*/__tests__/.*
5+
.*/cypress/.*
6+
7+
[include]
8+
9+
[libs]
10+
flow-typed
11+
12+
[options]

.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Build
2+
public/js/esm/
3+
public/js/system/
4+
public/js/vendor/
5+
public/js/*.js
6+
7+
8+
# osx
9+
.DS_Store
10+
._*
11+
12+
13+
# Editors
14+
.vscode/
15+
16+
17+
# NodeJS
18+
node_modules/
19+
npm-debug.log
20+
21+
# Flow
22+
flow-typed/

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,18 @@
11
# rollup-react-example
2-
An example React application using rollup, babel and flow.
2+
3+
Example dev environment for React using [Rollup](https://rollupjs.org) with code splitting, ES modules, Babel and Flow.
4+
This repository completes a step-by-step guide on Medium (TODO: link) on how to setup Rollup for JavaScript development.
5+
6+
## Commands
7+
8+
* `npm install`
9+
* `npm run build` creates a production build
10+
* `npm run watch` starts the dev loop
11+
* `npm run serve` starts a HTTP server, then browse to [http://localhost:5000](http://localhost:5000)
12+
13+
## License
14+
15+
see [LICENSE](LICENSE)
16+
17+
18+
[@camille_hdl](https://twitter.com/camille_hdl)

0 commit comments

Comments
 (0)