build_node_compilers 0.1.0

  • Installing
  • Versions
  • new50


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 use want to compile tests.
      - "example/**" # Include this if you have 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" \


  • Initial version based on build_web_compilers.

1. Depend on it

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

  build_node_compilers: "^0.1.0"

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 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.0 Feb 9, 2018 Go to the documentation of build_node_compilers 0.1.0 Download build_node_compilers 0.1.0 archive


This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Feb 9, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1


Describes how popular the package is relative to other packages. [more]
0 / 100
Code health derived from static analysis. [more]
100 / 100
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]


Detected platforms: Flutter, other

Primary library: package:build_node_compilers/build_node_compilers.dart with components: io, 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 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 <2.0.0
analyzer ^0.30.0 0.30.0+4 0.31.1
bazel_worker ^0.1.4 0.1.9
build ^0.12.0 0.12.0+1
build_config ^0.2.1 0.2.3
build_modules ^0.1.0 0.1.0+1
cli_util ^0.1.2 0.1.2+1
logging ^0.11.2 0.11.3+1
node_preamble ^1.4.0 1.4.0
path ^1.4.2 1.5.1
scratch_space ^0.0.1 0.0.1+3
Transitive dependencies
args 1.3.0
async 2.0.3
charcode 1.1.1
collection 1.14.5
convert 2.0.1
crypto 2.0.2+1
csslib 0.14.1
fixnum 0.10.7
front_end 0.1.0-alpha.4.1 0.1.0-alpha.9
glob 1.1.5
html 0.13.2+2
isolate 1.1.0
json_annotation 0.2.2
kernel 0.3.0-alpha.1.1 0.3.0-alpha.9
meta 1.1.2
package_config 1.0.3
plugin 0.2.0+2
pool 1.3.4
protobuf 0.7.0
source_span 1.4.0
stack_trace 1.9.1
string_scanner 1.0.2
typed_data 1.1.5
utf 0.9.0+4
watcher 0.9.7+7
yaml 2.1.13
Dev dependencies
build_runner ^0.7.0
build_test ^0.10.0
json_serializable ^0.3.0
source_gen ^0.7.0
test ^0.12.24