build_node_compilers 0.1.12

  • Installing
  • Versions
  • 79


This library provides builders for compiling Dart code to Node-compatible JavaScript modules. Both dartdevc and dart2js compilers are supported.


This package is intended to be used as a development dependency for users of node_interop libraries. Simply add the following to your pubspec.yaml:

  build_runner: # needed to run the build


Create build.yaml file in your project with following contents:

      - "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 main function) 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 Compiler.

If you would like to opt into dart2js you will need to override compiler option to build_runner which would look something like this:

pub run build_runner build \
  --define="build_node_compilers|entrypoint=compiler=dart2js" \


  • Fixed function responsible for resolving module paths for dartdevc to support symlinked entrypoints.


  • Upgraded to latest build_runner (fixes dependency resolution with Dart 2 stable).


  • Handle entrypoints inside lib/ folder.


  • Fixed analysis warnings with latest Pub and Dart SDK.


  • Fixed strong mode issue with parsing dart2js_args using latest Dart 2 SDK.


  • Removed extra dependency constraint on analyzer package.
  • Upgraded all dependencies to latest.


  • Removed redundant **_test.dart glob from build config which was causing issues when build_node_compilers used together with build_web_compilers.


  • Expand support for package:build_config to include version 0.3.x.


  • Fixed deprecation warnings with latest Dart 2 dev SDK.


  • Remove extra dependencies in build_node_compilers (#22)


  • Upgraded dependencies to match with latest version of build_web_compilers.


  • Create .packages file and use the new frontend with dart2js.


  • Use --use-old-frontend with dart2js as a stopgap until we can add support for .packages files.
  • Fixed deprecation warnings.


  • Initial version based on build_web_compilers.

Use this package as a library

1. Depend on it

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

  build_node_compilers: ^0.1.12

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:

import 'package:build_node_compilers/build_node_compilers.dart';
Version Uploaded Documentation Archive
0.1.12 Aug 9, 2018 Go to the documentation of build_node_compilers 0.1.12 Download build_node_compilers 0.1.12 archive
0.1.11 Aug 8, 2018 Go to the documentation of build_node_compilers 0.1.11 Download build_node_compilers 0.1.11 archive
0.1.10 Jul 27, 2018 Go to the documentation of build_node_compilers 0.1.10 Download build_node_compilers 0.1.10 archive
0.1.9 Jul 24, 2018 Go to the documentation of build_node_compilers 0.1.9 Download build_node_compilers 0.1.9 archive
0.1.8 Jun 24, 2018 Go to the documentation of build_node_compilers 0.1.8 Download build_node_compilers 0.1.8 archive
0.1.7 Jun 22, 2018 Go to the documentation of build_node_compilers 0.1.7 Download build_node_compilers 0.1.7 archive
0.1.6 Jun 11, 2018 Go to the documentation of build_node_compilers 0.1.6 Download build_node_compilers 0.1.6 archive
0.1.5 Jun 9, 2018 Go to the documentation of build_node_compilers 0.1.5 Download build_node_compilers 0.1.5 archive
0.1.4 Jun 6, 2018 Go to the documentation of build_node_compilers 0.1.4 Download build_node_compilers 0.1.4 archive
0.1.3 May 5, 2018 Go to the documentation of build_node_compilers 0.1.3 Download build_node_compilers 0.1.3 archive

All 14 versions...

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]
Learn more about scoring.

We analyzed this package on Aug 10, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.11.8


Detected platforms: Flutter, other

Primary library: package:build_node_compilers/build_node_compilers.dart with components: io, isolate, build.


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: main.dart, example.dart or you could also use build_node_compilers.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.37 <3.0.0
analyzer ^0.32.0 0.32.4
bazel_worker ^0.1.4 0.1.12
build ^0.12.6 0.12.7+3
build_config >=0.2.6 <0.4.0 0.3.1+2
build_modules >=0.2.2+1 <0.4.0 0.3.1+1
cli_util ^0.1.2 0.1.3+2
crypto >=0.9.2 <3.0.0 2.0.6
node_preamble ^1.4.0 1.4.4
path ^1.4.2 1.6.2
pool ^1.3.6 1.3.6
scratch_space ^0.0.2 0.0.3+1
Transitive dependencies
args 1.5.0
async 2.0.8
charcode 1.1.2
collection 1.14.11
convert 2.0.2
csslib 0.14.4+1
fixnum 0.10.8
front_end 0.1.4
glob 1.1.7
graphs 0.1.2+1
html 0.13.3+2
json_annotation 1.1.0
kernel 0.3.4
logging 0.11.3+2
meta 1.1.6
package_config 1.0.5
plugin 0.2.0+3
protobuf 0.9.1
pub_semver 1.4.2
pubspec_parse 0.1.2+2
source_span 1.4.1
stack_trace 1.9.3
string_scanner 1.0.3
typed_data 1.1.6
utf 0.9.0+5
watcher 0.9.7+10
yaml 2.1.15
Dev dependencies
build_runner ^0.10.0
build_test ^0.10.0
test ^1.0.0