Skip to content

Commit

Permalink
fix(generators): directive metadata (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanWalker authored Aug 26, 2018
1 parent 8d6e585 commit 81c32dc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,15 @@ With the strength of [TypeScript](https://www.typescriptlang.org/) paired with t
* [Design Doc](https://t.co/z2lRxOBFAg)
* [Wiki](https://github.com/nstudio/xplat/wiki/FAQ)

## Recommended tools

* [Angular Console](https://angularconsole.com/)
* Shows what xplat will generate before you actually generate anything. Useful to learn how xplat works and how all the options affect generation.

### Talks

* [Super Powered, Server Rendered Progressive Native Apps](https://www.youtube.com/watch?v=EqqNexmu3Ug) by [Nathan Walker](http://github.com/NathanWalker) and [Jeff Whelpley](https://github.com/jeffwhelpley)
* [ngAir 172 - xplat (cross-platform) tools for Nx workspaces with Nathan Walker](https://www.youtube.com/watch?v=0I8D25nab5c)

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nstudio/schematics",
"version": "6.2.3",
"version": "6.2.4",
"description": "Cross-platform (xplat) tools for Nx workspaces.",
"readmeFilename": "README.md",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/directive/_files/__name__.directive.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Directive } from '@angular/core';

@Directive({
name: '[<%= name %>]'
selector: '[<%= name %>]'
})
export class <%= utils.classify(name) %>Directive {

Expand Down
2 changes: 1 addition & 1 deletion src/directive/index_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('directive schematic', () => {
let content = getFileContent(tree, '/libs/features/ui/directives/active-link.directive.ts');
// console.log(content);
expect(content.indexOf(`@Directive({`)).toBeGreaterThanOrEqual(0);
expect(content.indexOf(`name: '[active-link]'`)).toBeGreaterThanOrEqual(0);
expect(content.indexOf(`selector: '[active-link]'`)).toBeGreaterThanOrEqual(0);

let modulePath = '/libs/features/ui/ui.module.ts';
let moduleContent = getFileContent(tree, modulePath);
Expand Down

0 comments on commit 81c32dc

Please sign in to comment.