https://github.com/leerob/dart-create-react-app
π Easily create React apps with Dart!
https://github.com/leerob/dart-create-react-app
create-react-app dart dartlang react
Last synced: 3 months ago
JSON representation
π Easily create React apps with Dart!
- Host: GitHub
- URL: https://github.com/leerob/dart-create-react-app
- Owner: leerob
- License: mit
- Created: 2017-11-24T18:34:54.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-25T22:53:18.000Z (over 7 years ago)
- Last Synced: 2025-01-19T02:50:07.381Z (5 months ago)
- Topics: create-react-app, dart, dartlang, react
- Language: Dart
- Homepage: https://pub.dartlang.org/packages/dart_create_react_app
- Size: 35.2 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Dart Create React App
[](https://pub.dartlang.org/packages/dart_create_react_app)
[](https://travis-ci.org/leerob/dart-create-react-app)
[](https://github.com/leerob/dart-create-react-app/blob/master/analysis_options.yaml#L2)Create Dart + React apps with no build configuration.
* [Getting Started](#getting-started) β How to create a new app.
* [Todo List Example](https://github.com/leerob/dart-react-todo) β How to develop an app bootstrapped with Dart Create React App.## Quick Overview
```sh
pub global activate dart_create_react_app
export PATH=$PATH:~/.pub-cache/bindart_create_react_app my_app
cd my_app/
pub serve
```Then open [http://localhost:8080/](http://localhost:8080/) to see your app.
When youβre ready to deploy to production, create a minified bundle with `pub build`.
### Get Started Immediately
You **donβt** need to install or configure any extra tooling. They are preconfigured so that you can focus on the code.
Just create a project, and youβre good to go.
## Getting Started
### Installation
If you don't already have Dart installed, you can install using Homebrew on macOS.
```sh
$ brew tap dart-lang/dart
$ brew install dart --with-content-shell --with-dartium
```Then, you can install dart_create_react_app globally.
```sh
pub global activate dart_create_react_app
export PATH=$PATH:~/.pub-cache/bin
```### Creating an App
To create a new app, run:
```sh
dart_create_react_app my_app
cd my_app/
```It will create a directory called `my_app` inside the current folder.
Inside that directory, it will generate the initial project structure and install the transitive dependencies:
```
my_app/
βββ lib/
β βββ src/
β | βββ my_app
β | | βββ app.dart
β βββ my_app.dart
βββ tool/
βββ test/
β βββ unit/
β | βββ my_app
β | | βββ my_app_test.dart
βββ web/
β βββ main.dart
β βββ index.css
β βββ index.html
β βββ logo.svg
βββ .gitignore
βββ pubspec.lock
βββ pubspec.yaml
βββ README.md
```No configuration or complicated folder structures, just the files you need to build your app. Once the installation is done, you can run some commands inside the project folder:
### `pub serve`
Runs the app in development mode.
Open [http://localhost:8080](http://localhost:8080) to view it in the browser.
### `pub run dart_dev test`
Runs all tests located in the `/test` folder.
### `pub build`
Builds the app for production to the `build` folder.
It correctly bundles React in production mode and optimizes the build for the best performance.