function build


Future build({List<String> entryPoints, CommandLineOptions options, String currentPackage, Map<String, String> packageDirs})

Runs the polymer linter on any relevant file in your package, such as any .html file under 'lib/', 'asset/', and 'web/'. And, if requested, creates a directory suitable for deploying a Polymer application to a server.

The entryPoints list contains files under web/ that should be treated as entry points. Each entry on this list is a relative path from the package root (for example 'web/index.html'). If null, all files under 'web/' are treated as possible entry points.

Options must be passed by passing the options argument. The deploy operation is run only when the command-line argument --deploy is present, or equivalently when options.forceDeploy is true.

The linter and deploy steps needs to know the name of the currentPackage and the location where to find the code for any package it depends on (packageDirs). This is inferred automatically, but can be overriden if those arguments are provided.

Source

Future build({List<String> entryPoints, CommandLineOptions options,
    String currentPackage, Map<String, String> packageDirs}) {
  if (options == null) {
    print('warning: now that main takes arguments, you need to explicitly pass'
        ' options to build(). Running as if no options were passed.');
    options = parseOptions([]);
  }
  if (entryPoints == null) entryPoints = _parseEntryPointsFromPubspec();

  return options.forceDeploy
      ? deploy(
          entryPoints: entryPoints,
          options: options,
          currentPackage: currentPackage,
          packageDirs: packageDirs)
      : lint(
          entryPoints: entryPoints,
          options: options,
          currentPackage: currentPackage,
          packageDirs: packageDirs);
}