diff --git a/controller/index.js b/generators/controller/index.js similarity index 95% rename from controller/index.js rename to generators/controller/index.js index 9daa746..0cbbe04 100644 --- a/controller/index.js +++ b/generators/controller/index.js @@ -1,6 +1,6 @@ 'use strict'; var yeoman = require('yeoman-generator'); -var utils = require('../utils/utils.js'); +var utils = require('../../utils/utils.js'); var MGenerator = yeoman.generators.NamedBase.extend({ diff --git a/controller/templates/_controller.js b/generators/controller/templates/_controller.js similarity index 100% rename from controller/templates/_controller.js rename to generators/controller/templates/_controller.js diff --git a/controller/templates/_controller.spec.js b/generators/controller/templates/_controller.spec.js similarity index 100% rename from controller/templates/_controller.spec.js rename to generators/controller/templates/_controller.spec.js diff --git a/test/app.js b/test/app.js index c673f0a..9ae2234 100644 --- a/test/app.js +++ b/test/app.js @@ -19,7 +19,7 @@ describe('m', function () { .withGenerators([ // configure path to subgenerators path.join(__dirname, '../module'), path.join(__dirname, '../generators/constant'), - path.join(__dirname, '../controller'), + path.join(__dirname, '../generators/controller'), path.join(__dirname, '../template'), path.join(__dirname, '../service') ]) @@ -131,7 +131,7 @@ describe('m', function () { .withGenerators([ // configure path to subgenerators path.join(__dirname, '../module'), path.join(__dirname, '../generators/constant'), - path.join(__dirname, '../controller'), + path.join(__dirname, '../generators/controller'), path.join(__dirname, '../template'), path.join(__dirname, '../service') ]) @@ -155,7 +155,7 @@ describe('m', function () { .withGenerators([ // configure path to subgenerators path.join(__dirname, '../module'), path.join(__dirname, '../generators/constant'), - path.join(__dirname, '../controller'), + path.join(__dirname, '../generators/controller'), path.join(__dirname, '../template'), path.join(__dirname, '../service') ]) @@ -179,7 +179,7 @@ describe('m', function () { .withGenerators([ // configure path to subgenerators path.join(__dirname, '../module'), path.join(__dirname, '../generators/constant'), - path.join(__dirname, '../controller'), + path.join(__dirname, '../generators/controller'), path.join(__dirname, '../template'), path.join(__dirname, '../service') ]) @@ -222,7 +222,7 @@ describe('m', function () { .withGenerators([ // configure path to subgenerators path.join(__dirname, '../module'), path.join(__dirname, '../generators/constant'), - path.join(__dirname, '../controller'), + path.join(__dirname, '../generators/controller'), path.join(__dirname, '../template'), path.join(__dirname, '../service') ]) @@ -242,7 +242,7 @@ describe('m', function () { .withGenerators([ // configure path to subgenerators path.join(__dirname, '../module'), path.join(__dirname, '../generators/constant'), - path.join(__dirname, '../controller'), + path.join(__dirname, '../generators/controller'), path.join(__dirname, '../template'), path.join(__dirname, '../service') ]) @@ -262,7 +262,7 @@ describe('m', function () { .withGenerators([ // configure path to subgenerators path.join(__dirname, '../module'), path.join(__dirname, '../generators/constant'), - path.join(__dirname, '../controller'), + path.join(__dirname, '../generators/controller'), path.join(__dirname, '../template'), path.join(__dirname, '../service') ]) diff --git a/test/controller.js b/test/controller.js index 73efaee..92d7b21 100644 --- a/test/controller.js +++ b/test/controller.js @@ -9,7 +9,7 @@ describe('m:controller', function () { describe('some', function () { before(function (done) { - helpers.run(path.join(__dirname, '../controller')) + helpers.run(path.join(__dirname, '../generators/controller')) .withArguments('some') .on('end', done); }); @@ -33,7 +33,7 @@ describe('m:controller', function () { describe('someCtrl myModule', function () { before(function (done) { - helpers.run(path.join(__dirname, '../controller')) + helpers.run(path.join(__dirname, '../generators/controller')) .withArguments('someCtrl myModule') .on('end', done); }); @@ -55,7 +55,7 @@ describe('m:controller', function () { describe('someCtrl --template=debug', function () { before(function (done) { - helpers.run(path.join(__dirname, '../controller')) + helpers.run(path.join(__dirname, '../generators/controller')) .withArguments('someCtrl') .withOptions({ template: 'debug' }) .on('end', done); @@ -82,7 +82,7 @@ describe('m:controller', function () { describe('someCtrl myModule --template=debug', function () { before(function (done) { - helpers.run(path.join(__dirname, '../controller')) + helpers.run(path.join(__dirname, '../generators/controller')) .withArguments('someCtrl myModule') .withOptions({ template: 'debug' }) .on('end', done); diff --git a/test/module.js b/test/module.js index ee3e59a..483c1a8 100644 --- a/test/module.js +++ b/test/module.js @@ -172,7 +172,7 @@ describe('m:module', function () { before(function (done) { helpers.run(path.join(__dirname, '../module')) .withGenerators([ // configure path to subgenerators - path.join(__dirname, '../controller'), + path.join(__dirname, '../generators/controller'), path.join(__dirname, '../template'), path.join(__dirname, '../service'), path.join(__dirname, '../generators/constant') @@ -197,7 +197,7 @@ describe('m:module', function () { before(function (done) { helpers.run(path.join(__dirname, '../module')) .withGenerators([ // configure path to subgenerators - path.join(__dirname, '../controller'), + path.join(__dirname, '../generators/controller'), path.join(__dirname, '../template'), path.join(__dirname, '../service'), path.join(__dirname, '../generators/constant') @@ -216,7 +216,7 @@ describe('m:module', function () { before(function (done) { helpers.run(path.join(__dirname, '../module')) .withGenerators([ // configure path to subgenerators - path.join(__dirname, '../controller'), + path.join(__dirname, '../generators/controller'), path.join(__dirname, '../template'), path.join(__dirname, '../service'), path.join(__dirname, '../generators/constant') @@ -316,7 +316,7 @@ describe('m:module', function () { before(function (done) { helpers.run(path.join(__dirname, '../module')) .withGenerators([ // configure path to subgenerators - path.join(__dirname, '../controller'), + path.join(__dirname, '../generators/controller'), path.join(__dirname, '../template'), path.join(__dirname, '../service'), path.join(__dirname, '../generators/constant') @@ -337,7 +337,7 @@ describe('m:module', function () { before(function (done) { helpers.run(path.join(__dirname, '../module')) .withGenerators([ // configure path to subgenerators - path.join(__dirname, '../controller'), + path.join(__dirname, '../generators/controller'), path.join(__dirname, '../template'), path.join(__dirname, '../service'), path.join(__dirname, '../generators/constant') @@ -376,7 +376,7 @@ describe('m:module', function () { before(function (done) { helpers.run(path.join(__dirname, '../module')) .withGenerators([ // configure path to subgenerators - path.join(__dirname, '../controller'), + path.join(__dirname, '../generators/controller'), path.join(__dirname, '../template'), path.join(__dirname, '../service'), path.join(__dirname, '../generators/constant') @@ -396,7 +396,7 @@ describe('m:module', function () { before(function (done) { helpers.run(path.join(__dirname, '../module')) .withGenerators([ // configure path to subgenerators - path.join(__dirname, '../controller'), + path.join(__dirname, '../generators/controller'), path.join(__dirname, '../template'), path.join(__dirname, '../service'), path.join(__dirname, '../generators/constant') diff --git a/test/pair.js b/test/pair.js index 4b1b09f..fb59589 100644 --- a/test/pair.js +++ b/test/pair.js @@ -8,7 +8,7 @@ describe('M:generators/pair', function () { before(function (done) { helpers.run(path.join(__dirname, '../generators/pair')) .withGenerators([ // configure path to subgenerators - path.join(__dirname, '../controller'), + path.join(__dirname, '../generators/controller'), path.join(__dirname, '../template'), ]) .withArguments('name')