devc_builder 0.1.2+1

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 0

Minimal build system for dev_compiler

This is a minimal build system to help people experiment with dev_compiler.

Install

Install with pub global activate devc_builder.

Usage

Launch the build with the following command:

devc_builder main_package_path output_directory main_file_path

where

  • main_package_path is the path to the main package to build
  • output_directory guess what it is ?
  • main_file_path is the relative path of the file (without the extension) inside the main package where your main() function resides

example:

devc_builder my_app out index

will build the app inside my_app folder (that should be already "pub getted") in folder out using the file my_app/lib/index.dart as entry point.

Output

This tool will transitively examine the main package dependencies and produce a single js module for each. All the .dart file inside any package will be considered for compilation, all the other files copied to the output.

Compilation for hosted packages will be cached inside the folder .repo and reused for the next build.

Then it will create an index.html that will load all the dependencies and execute the main function in the main_file_path.

The index.html will be created with this template:

<html>
<head>
<script>
'use strict';
</script>
@IMPORT_SCRIPTS@
@BOOTSTRAP@
</head>
<body>
</body>
</html>

You can provide your own template in web/index.html:

  • @IMPORT_SCRIPTS@ will be replaced with all the import script from the dependencies and the SDK.
  • @BOOTSTRAP@ will be replaced with the bootstrap code needed to execute the main function in the main file

You can test the results using a recent chrome or translate it with babelJS.

TODO:

  • use args processing lib
  • execute babelJS / vulcanize / etc. etc.
  • try using build (can it be done ? how to handle group of sources?)

0.1.2+1

  • reset options for compiler

0.1.2

  • repo for compilation
  • copying resources
  • templating

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate devc_builder

2. Use it

The package has the following executables:


$ devc_builder
Version Uploaded Documentation Archive
0.1.2+1 Aug 9, 2016 Go to the documentation of devc_builder 0.1.2+1 Download devc_builder 0.1.2+1 archive
0.1.2 Aug 9, 2016 Go to the documentation of devc_builder 0.1.2 Download devc_builder 0.1.2 archive
0.1.1 Aug 5, 2016 Go to the documentation of devc_builder 0.1.1 Download devc_builder 0.1.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
0
Learn more about scoring.

We analyzed this package on Oct 21, 2018, and provided a score, details, and suggestions below. Analysis was completed with status tool failures using:

  • Dart: 2.0.0
  • pana: 0.12.4

Platforms

Detected platforms: unsure

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Analysis issues and suggestions

Fix dependencies in pubspec.yaml.

Running pub upgrade failed with the following output:

ERR: Could not find a file named "pubspec.yaml" in https://github.com/dart-lang/build.git 300886f41e7e948d979e14abf08f49afbdf2d0c0.

Health suggestions

Format bin/build.dart.

Run dartfmt to format bin/build.dart.

Format bin/devc_builder.dart.

Run dartfmt to format bin/devc_builder.dart.

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Running dartdoc failed. (-10 points)

Make sure dartdoc runs without any issues.

Package is too old. (-100 points)

The package was released more than two years ago.

Add SDK constraint in pubspec.yaml. (-5 points)

For information about setting SDK constraint, please see https://www.dartlang.org/tools/pub/pubspec#sdk-constraints.

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Maintain an example. (-10 points)

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