dart-lang/build

Name: build

Owner: Dart

Description: A build system for Dart

Created: 2016-01-20 19:12:37.0

Updated: 2018-05-24 19:05:31.0

Pushed: 2018-05-24 19:05:32.0

Homepage: https://pub.dartlang.org/packages/build

Size: 3215

Language: Dart

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Build Status Build Status

These packages provide libraries for generating Dart code.

FAQ for Builder authors.

build

Defines the interfaces for creating a Builder which is a way of doing codegen that is compatible across build systems (pub, bazel, standalone runner).

For packages doing code generation this should generally be the only package against which there is a public dependency. Packages may have a dev_depenency on one or more of the other packages.

In particular, transformers should only be exposed via a separate package, which has a dependency on build_barback. This allows core packages to not leak the dependency on barback and all of its transitive deps to all consumers.

build_barback

Allows wrapping up a Builder as a Transformer so that it can be run in pub or vice-versa.

build_config

Support for parsing build.yaml files. Used by build_runner.

build_modules

Support for discovering the sub-modules within packages and creating summaries of those modules. Used by build_web_compilers but should not be used directly by most users.

build_resolvers

An implementation of the Resolver interface to use the analyzer during build steps.

build_runner

Provides utilities to enact builds and a way to automatically run builds based on configuration.

This package should generally be a dev_dependency as it is used to run standalone builds. The only exception would be wrapping the build and watch methods with some other package.

build_test

Stub implementations for classes in Build and some utilities for running instances of builds and checking their outputs.

This package generally only be a dev_dependency as it introduces a dependency on package:test. The exception to that would be if you were creating another testing-only package that wraps this one.

build_web_compilers

Provides the dart2js and dartdevc support for your package. To use this package you should add it as a dev_dependency.

If you are using the automated build scripts, your project will automatically start being compiled with dartdevc, and you can start developing with chrome without any configuration.

Examples

The example directory has an example of a build with custom builders which generate outputs into both the source tree and a hidden generated directory. Try a build with pub run build_runner build -o web:deploy to see what the output looks like.

Most projects should not need custom builders. A more typical project which uses Angular and compiles to javascript can be found in the angular repo.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.