Giter Club home page Giter Club logo

cli-builders-demo's Introduction

Architect API demo

This repository contains an example of the Angular CLI Architect API.

Builder

You can find the Architect builder in the command-builder directory.

Sample application

The sample application which uses the Architect builder is available under the builder-test directory.

License

MIT

cli-builders-demo's People

Contributors

benwinding avatar dependabot[bot] avatar mgechev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cli-builders-demo's Issues

Error: Job name "@example/command-runner:command" does not exist

When I try to run the tests within the command-builder folder using npm run test, I get the following error:

> @example/[email protected] test C:\projects\cli-builders-demo\command-builder
> ts-node node_modules/jasmine/bin/jasmine command/index_spec.ts

Randomized with seed 79078
Started
F

Failures:
1) Command Runner Builder can run node
  Message:
    Error: Job name "@example/command-runner:command" does not exist.
  Stack:
    Error: Job name "@example/command-runner:command" does not exist.
        at SwitchMapSubscriber.description.handler.pipe.operators_1.switchMap.handler [as project] (C:\projects\cli-builders-demo\command-builder\node_modules\@angular-devkit\core\src\experimental\jobs\simple-scheduler.js:292:27)
        at SwitchMapSubscriber._next (C:\projects\cli-builders-demo\command-builder\node_modules\rxjs\src\internal\operators\switchMap.ts:106:21)
        at SwitchMapSubscriber.Subscriber.next (C:\projects\cli-builders-demo\command-builder\node_modules\rxjs\src\internal\Subscriber.ts:99:12)
        at SwitchMapSubscriber.notifyNext (C:\projects\cli-builders-demo\command-builder\node_modules\rxjs\src\internal\operators\switchMap.ts:149:24)
        at InnerSubscriber._next (C:\projects\cli-builders-demo\command-builder\node_modules\rxjs\src\internal\InnerSubscriber.ts:17:17)
        at InnerSubscriber.Subscriber.next (C:\projects\cli-builders-demo\command-builder\node_modules\rxjs\src\internal\Subscriber.ts:99:12)
        at C:\projects\cli-builders-demo\command-builder\node_modules\rxjs\src\internal\util\subscribeTo.ts:18:20
        at Object.subscribeToResult (C:\projects\cli-builders-demo\command-builder\node_modules\rxjs\src\internal\util\subscribeToResult.ts:25:29)
        at SwitchMapSubscriber._innerSub (C:\projects\cli-builders-demo\command-builder\node_modules\rxjs\src\internal\operators\switchMap.ts:122:30)
        at SwitchMapSubscriber._next (C:\projects\cli-builders-demo\command-builder\node_modules\rxjs\src\internal\operators\switchMap.ts:111:10)

1 spec, 1 failure

Any idea what I am missing here? No changes were done to the code.

Cannot use import statement outside a module

trying to run the builder:

ng run builder-test:touch
An unhandled exception occurred: Cannot find module '/temp/cli-builders-demo/command-builder/command'

then package.json change:
"implementation": "./command/index.ts",

ng run builder-test:touch

[error] /temp/cli-builders-demo/command-builder/command/index.ts:1
import { BuilderOutput, createBuilder } from '@angular-devkit/architect';
^^^^^^

SyntaxError: **Cannot use import statement outside a module**
    at Module._compile (internal/modules/cjs/loader.js:892:18)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
    at Module.load (internal/modules/cjs/loader.js:812:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Module.require (internal/modules/cjs/loader.js:849:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at /temp/cli-builders-demo/builder-test/node_modules/@angular-devkit/architect/node/node-modules-architect-host.js:113:61
    at async WorkspaceNodeModulesArchitectHost.loadBuilder (/temp/cli-builders-demo/builder-test/node_modules/@angular-devkit/architect/node/node-modules-architect-host.js:113:26)

Angular CLI: 9.1.7
Node: 12.13.0
OS: darwin x64

Angular: 9.1.9
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package Version

@angular-devkit/architect 0.901.7
@angular-devkit/build-angular 0.901.7
@angular-devkit/build-optimizer 0.901.7
@angular-devkit/build-webpack 0.901.7
@angular-devkit/core 9.1.7
@angular-devkit/schematics 9.1.7
@angular/cli 9.1.7
@ngtools/webpack 9.1.7
@schematics/angular 9.1.7
@schematics/update 0.901.7
rxjs 6.5.5
typescript 3.8.3
webpack 4.42.0

node -v
v12.13.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.