Skip to content
This repository was archived by the owner on Jun 20, 2019. It is now read-only.
This repository was archived by the owner on Jun 20, 2019. It is now read-only.

What's about to export AngularDriver class to be used outside? #687

Description

@guid-empty

Hi!

Is it possible to export AngularDriver class from this package to be used as one of available classes?

One of the cases is ability to check custom angular template in build pipeline, for example:

`
final plugin = AngularAnalyzerPlugin(PhysicalResourceProvider.INSTANCE);

  final versionCheckParams =
      new PluginVersionCheckParams('~/.dartServer/.analysis-driver', '/usr/lib/dart', '2.1.1');
  await plugin.handlePluginVersionCheck(versionCheckParams);

  final root = ContextRoot(rootPath, [], optionsFile: optionsPath);

  plugin.start(PluginCommunicationChannelStub());
  final genericDriver = plugin.createAnalysisDriver(root);
  final angularDriver = genericDriver as AngularDriver;

  genericDriver.addFile(angularTemplatePath);
  //  await genericDriver.performWork();

  final htmlResult = await angularDriver.requestHtmlResult(angularTemplatePath);

  print('angular template has errors -> ${htmlResult.errors.isNotEmpty}, ${dartResult.errors.isNotEmpty}');

  if (htmlResult.errors.isNotEmpty) {
    htmlResult.errors.forEach((AnalysisError error) {
      print(error.message);
      print(error.correction);
    });
  }

`

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions