dart_create_react_app 1.0.0

Dart Create React App #

Pub Build Status Strong Mode Compliant

Create Dart + React apps with no build configuration.

Quick Overview #

pub global activate dart_create_react_app
export PATH=$PATH:~/.pub-cache/bin

dart_create_react_app my_app
cd my_app/
pub serve

Then open http://localhost:8080/ to see your app.

When you’re ready to deploy to production, create a minified bundle with pub build.

dart_create_react_app

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.

$ brew tap dart-lang/dart
$ brew install dart --with-content-shell --with-dartium

Then, you can install dart_create_react_app globally.

pub global activate dart_create_react_app
export PATH=$PATH:~/.pub-cache/bin

Creating an App #

To create a new app, run:

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 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.

1.0.0 🎉 #

  • Got all unit tests working on travis
  • Added a test for name that starts with numbers

0.4.0 #

  • Added documentation
  • Small code cleanup
  • Fixed typos in README

0.3.2 #

  • Remove coverage for now

0.3.1 #

  • Got all unit tests working
  • Added coverage badge

0.3.0 #

  • Move all /bin code to /lib
  • Create new logger class for stdout and stderr
  • More unit test coverage
  • Run unit tests in travis.yml

0.2.0 #

  • Added .travis.yml and badges to README

0.1.1 #

  • Updated LICENSE and modified pubspec.yaml

0.1.0 #

  • Added first version of dart_create_react_app

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate dart_create_react_app

2. Use it

The package has the following executables:


$ dart_create_react_app

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  dart_create_react_app: ^1.0.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:dart_create_react_app/dart_create_react_app.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
--
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
--
Overall:
Weighted score of the above. [more]
0
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://dart.dev/dart-2#migration.

Maintenance issues and suggestions

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Dependencies were not resolved.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.23.0 <2.0.0

Admin