This library provides builders for compiling Dart code to Node-compatible
dart2js compilers are supported.
This package is intended to be used as a development dependency for users
node_interop libraries. Simply add the following to your
dev_dependencies: build_runner: # needed to run the build build_node_compilers:
build.yaml file in your project with following contents:
targets: $default: sources: - "node/**" - "test/**" # Include this if you want to compile tests. - "example/**" # Include this if you want to compile examples.
To build your project run following:
pub run build_runner build --output=build/
Note that for projects using node_interop packages the convention is to put main application files (Dart files containing
mainfunction) in the top-level
node/directory. (This is to avoid confusion (and filename collisions) with apps targeting browsers in
web/and package-level binaries in
bin/recognized by Pub).
By default, the
dartdevc compiler is used, which is the Dart Development
If you would like to opt into
dart2js you will need to override
option to build_runner which would look something like this:
pub run build_runner build \ --define="build_node_compilers|entrypoint=compiler=dart2js" \ --output=build/
**_test.dartglob from build config which was causing issues when build_node_compilers used together with build_web_compilers.
.packagesfile and use the new frontend with
dart2jsas a stopgap until we can add support for
Add this to your package's pubspec.yaml file:
dependencies: build_node_compilers: ^0.1.12
You can install packages from the command line:
$ pub get
$ flutter packages get
Alternatively, your editor might support
pub get or
flutter packages get.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
|0.1.12||Aug 9, 2018|
|0.1.11||Aug 8, 2018|
|0.1.10||Jul 27, 2018|
|0.1.9||Jul 24, 2018|
|0.1.8||Jun 24, 2018|
|0.1.7||Jun 22, 2018|
|0.1.6||Jun 11, 2018|
|0.1.5||Jun 9, 2018|
|0.1.4||Jun 6, 2018|
|0.1.3||May 5, 2018|
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Aug 10, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter, other
Package is pre-v1 release.
While there is nothing inherently wrong with versions of
0.*.*, it usually means that the author is still experimenting with the general direction of the API.
Maintain an example.
Create a short demo in the
example/ directory to show how to use this package. Common file name patterns include:
example.dart or you could also use
|Dart SDK||>=2.0.0-dev.37 <3.0.0|