-
clone
git clone git@gist.github.com:b556b9a987963aae363aca6f6e3f60fa.git
-
npm install
sudo docker-compose run -u (id -u $USER):(id -g $USER) app npm install
-
docker-compose up
sudo docker-compose up
-
open page
Last active
May 25, 2020 12:30
-
-
Save kytiken/b556b9a987963aae363aca6f6e3f60fa to your computer and use it in GitHub Desktop.
instant react environment with parcel
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
version: '3' | |
services: | |
app: | |
image: node | |
volumes: | |
- .:/app | |
working_dir: /app | |
ports: | |
- 1234:1234 | |
command: npx parcel index.html |
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
<html> | |
<body> | |
<div id="root"></div> | |
<script src="./index.js"></script> | |
</body> | |
</html> |
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
import ReactDOM from 'react-dom' | |
import React from 'react' | |
ReactDOM.render( | |
<h1>Hello, world!</h1>, | |
document.getElementById('root') | |
); |
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
{ | |
"name": "app", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"keywords": [], | |
"author": "", | |
"license": "ISC", | |
"dependencies": { | |
"react": "^16.13.1", | |
"react-dom": "^16.13.1" | |
}, | |
"devDependencies": { | |
"parcel": "^1.12.4" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment