Coder Social home page Coder Social logo

davidwells / create-react-app-parcel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from assuncaocharles/create-react-app-parcel

0.0 3.0 0.0 239 KB

create-react-app-parcel ๐Ÿ’ฉ

Home Page: https://twitter.com/swyx/status/995137778630512640

JavaScript 94.37% HTML 3.19% CSS 2.44%

create-react-app-parcel's Introduction

Create React App Parcel ๐Ÿ’ฉ

create react apps with parcel instead of webpack cos why not

Preconfigured Features that come with your Parcel setup:

  • babel-preset-react-app so you can use the exact same JS features that come with create-react-app (eg public class fields)
  • improved App.js to show off the babel preset features (click on the React logo!)
  • serviceWorker available but off by default (similar to the coming create-react-app 2.0 setup)
  • preconfigured build setup based on the ParcelJS API
  • nice eject experience that doesnt saddle you with a million webpack plugins
  • as far as possible, same DX as create-react-app (eg checks if you use yarn or npm, environment variables all the same)
    • in particular it's a fork of create-react-app v2.0 so you also get features like babel-plugin-macros for free! ๐Ÿ”ฅ

Installing C.R.A.P.

npm i -g create-react-app-parcel

Using C.R.A.P.

crap my-app
# or create-react-app-parcel my-app
cd my-app
yarn start

and presto! (try clicking the react icon)

image

C.R.A.P. structure

You will have a very simple folder structure, same as create-react-app:

my-app
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ node_modules
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ public
โ”‚   โ””โ”€โ”€ favicon.ico
โ”‚   โ””โ”€โ”€ index.html
โ”‚   โ””โ”€โ”€ manifest.json
โ””โ”€โ”€ src
    โ””โ”€โ”€ App.css
    โ””โ”€โ”€ App.js
    โ””โ”€โ”€ App.test.js
    โ””โ”€โ”€ index.css
    โ””โ”€โ”€ index.js
    โ””โ”€โ”€ logo.svg
    โ””โ”€โ”€ registerServiceWorker.js

No configuration or complicated folder structures, just the files you need to build your app.


react-scripts-parcel API guide

npm start or yarn start

Runs the app in development mode.
Open http://localhost:1234 to view it in the browser.

The page will automatically reload if you make changes to the code.
You will see the build errors and lint warnings in the console.

npm test or yarn test

โš ๏ธ warning: this functionality is untested for now

npm run build or yarn build

Builds the app for production to the dist folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.

Your app is ready to be deployed.

yarn eject

ejects you out of this shiznit like so

How this was made

Check out the slide deck at https://twitter.com/swyx/status/999474452571283456 and https://www.beautiful.ai/player/-LD4eaMxlqSlCy6biPmZ/Creating-Create-React-App/1?ref=github-crap and the talk video should be coming soon.

Contributing

We'd love to have your helping hand on create-react-app-parcel! Ping me on twitter @swyx to discuss or file an issue, this is super new

Acknowledgements

We are grateful to the authors of existing related projects for their ideas and collaboration:

License

Create React App Parcel is open source software licensed as MIT.

Official Emoji

of course it's the ๐Ÿ’ฉ

Alternatives

There's this dinky little me-too project called create-react-app, send them some love, who knows they could be big someday.

Also for Typescript users a custom script exists: https://github.com/sw-yx/create-react-app-parcel-typescript

crap my-ts-app --scripts-version=create-react-app-parcel-typescript

create-react-app-parcel's People

Contributors

alexkrolick avatar davidwells avatar osdevisnot avatar sw-yx avatar tsiq-swyx avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.