diff --git a/generator/component/temp.component.js b/generator/component/temp.component.js deleted file mode 100644 index 0e38287..0000000 --- a/generator/component/temp.component.js +++ /dev/null @@ -1,12 +0,0 @@ -import template from './<%= name %>.html'; -import controller from './<%= name %>.controller'; -import './<%= name %>.styl'; - -let <%= name %>Component = { - restrict: 'E', - bindings: {}, - template, - controller -}; - -export default <%= name %>Component; diff --git a/generator/component/temp.controller.js b/generator/component/temp.controller.js deleted file mode 100644 index 5a46c17..0000000 --- a/generator/component/temp.controller.js +++ /dev/null @@ -1,7 +0,0 @@ -class <%= upCaseName %>Controller { - constructor() { - this.name = '<%= name %>'; - } -} - -export default <%= upCaseName %>Controller; diff --git a/generator/component/temp.html b/generator/component/temp.html deleted file mode 100644 index 38bbb2a..0000000 --- a/generator/component/temp.html +++ /dev/null @@ -1,3 +0,0 @@ -
-

{{ $ctrl.name }}

-
diff --git a/generator/component/temp.js b/generator/component/temp.js deleted file mode 100644 index 7df4c04..0000000 --- a/generator/component/temp.js +++ /dev/null @@ -1,13 +0,0 @@ -import angular from 'angular'; -import uiRouter from 'angular-ui-router'; -import <%= name %>Component from './<%= name %>.component'; - -let <%= name %>Module = angular.module('<%= name %>', [ - uiRouter -]) - -.component('<%= name %>', <%= name %>Component) - -.name; - -export default <%= name %>Module; diff --git a/generator/component/temp.spec.js b/generator/component/temp.spec.js deleted file mode 100644 index 57030f8..0000000 --- a/generator/component/temp.spec.js +++ /dev/null @@ -1,49 +0,0 @@ -import <%= upCaseName %>Module from './<%= name %>' -import <%= upCaseName %>Controller from './<%= name %>.controller'; -import <%= upCaseName %>Component from './<%= name %>.component'; -import <%= upCaseName %>Template from './<%= name %>.html'; - -describe('<%= upCaseName %>', () => { - let $rootScope, makeController; - - beforeEach(window.module(<%= upCaseName %>Module)); - beforeEach(inject((_$rootScope_) => { - $rootScope = _$rootScope_; - makeController = () => { - return new <%= upCaseName %>Controller(); - }; - })); - - describe('Module', () => { - // top-level specs: i.e., routes, injection, naming - }); - - describe('Controller', () => { - // controller specs - it('has a name property [REMOVE]', () => { // erase if removing this.name from the controller - let controller = makeController(); - expect(controller).to.have.property('name'); - }); - }); - - describe('Template', () => { - // template specs - // tip: use regex to ensure correct bindings are used e.g., {{ }} - it('has name in template [REMOVE]', () => { - expect(<%= upCaseName %>Template).to.match(/{{\s?\$ctrl\.name\s?}}/g); - }); - }); - - describe('Component', () => { - // component/directive specs - let component = <%= upCaseName %>Component; - - it('includes the intended template',() => { - expect(component.template).to.equal(<%= upCaseName %>Template); - }); - - it('invokes the right controller', () => { - expect(component.controller).to.equal(<%= upCaseName %>Controller); - }); - }); -}); diff --git a/generator/component/temp.styl b/generator/component/temp.styl deleted file mode 100644 index 47addd6..0000000 --- a/generator/component/temp.styl +++ /dev/null @@ -1,2 +0,0 @@ -.<%= name %> - color red