Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

Commit

Permalink
Merge pull request #358 from ruyadorno/update-folder-structure
Browse files Browse the repository at this point in the history
Updates folder structure, fixes #350
  • Loading branch information
arthurvr committed Sep 6, 2015
2 parents d009831 + eebfec7 commit 115f049
Show file tree
Hide file tree
Showing 46 changed files with 23 additions and 23 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion collection/index.js → generators/collection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var path = require('path');
var util = require('util');
var pascalCase = require('pascal-case');
var yeoman = require('yeoman-generator');
var scriptBase = require('../script-base');
var scriptBase = require('../../script-base');

var CollectionGenerator = scriptBase.extend({
constructor: function () {
Expand Down
2 changes: 1 addition & 1 deletion model/index.js → generators/model/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var path = require('path');
var util = require('util');
var pascalCase = require('pascal-case');
var yeoman = require('yeoman-generator');
var scriptBase = require('../script-base');
var scriptBase = require('../../script-base');

var ModelGenerator = scriptBase.extend({
constructor: function (name) {
Expand Down
2 changes: 1 addition & 1 deletion router/index.js → generators/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var path = require('path');
var util = require('util');
var pascalCase = require('pascal-case');
var yeoman = require('yeoman-generator');
var scriptBase = require('../script-base');
var scriptBase = require('../../script-base');

var RouterGenerator = scriptBase.extend({
constructor: function () {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion view/index.js → generators/view/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var path = require('path');
var util = require('util');
var pascalCase = require('pascal-case');
var yeoman = require('yeoman-generator');
var scriptBase = require('../script-base');
var scriptBase = require('../../script-base');

var ViewGenerator = scriptBase.extend({
constructor: function () {
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"backbone"
],
"author": "Yeoman",
"main": "app/index.js",
"main": "generators/app/index.js",
"repository": "yeoman/generator-backbone",
"scripts": {
"test": "mocha --reporter spec"
Expand All @@ -35,13 +35,13 @@
},
"license": "BSD",
"files": [
"all",
"app",
"collection",
"model",
"router",
"templates",
"view",
"generators/all",
"generators/app",
"generators/collection",
"generators/model",
"generators/router",
"generators/templates",
"generators/view",
"script-base.js",
"util.js"
]
Expand Down
4 changes: 2 additions & 2 deletions script-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ var ScriptBase = yeoman.generators.NamedBase.extend({
},

_setupSourceRootAndSuffix: function () {
var sourceRoot = '/templates';
var sourceRoot = '/generators/templates';
this.scriptSuffix = '.js';

if (this.env.options.coffee || this.options.coffee) {
sourceRoot = '/templates/coffeescript';
sourceRoot = '/generators/templates/coffeescript';
this.scriptSuffix = '.coffee';
}

Expand Down
4 changes: 2 additions & 2 deletions test/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exports.createSubGenerator = function (config, type, asserts) {
var deps = [
[helpers.createDummyGenerator(), 'backbone-mocha:' + type]
];
helpers.run(path.join(__dirname, '../' + type))
helpers.run(path.join(__dirname, '../generators/' + type))
.inDir(path.join(__dirname, 'temp'), function () {
fs.writeFileSync('.yo-rc.json', config);
})
Expand All @@ -25,7 +25,7 @@ exports.createAppGenerator = function (config, prompts, done) {
var deps = [
[helpers.createDummyGenerator(), 'mocha:app']
];
helpers.run(path.join(__dirname, '../app'))
helpers.run(path.join(__dirname, '../generators/app'))
.inDir(path.join(__dirname, 'temp'), function () {
fs.writeFileSync('.yo-rc.json', config);
})
Expand Down
2 changes: 1 addition & 1 deletion test/test-apppath.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('backbone generator with appPath option', function () {
var deps = [
[helpers.createDummyGenerator(), 'mocha:app']
];
helpers.run(path.join(__dirname, '../app'))
helpers.run(path.join(__dirname, '../generators/app'))
.inTmpDir(function () {
fs.writeFileSync('.yo-rc.json', config);
})
Expand Down
12 changes: 6 additions & 6 deletions test/test-foo.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ describe('Backbone generator test', function () {

it('every generator can be required without throwing', function () {
// not testing the actual run of generators yet
this.all = require('../all');
this.app = require('../app');
this.collection = require('../collection');
this.model = require('../model');
this.router = require('../router');
this.view = require('../view');
this.all = require('../generators/all');
this.app = require('../generators/app');
this.collection = require('../generators/collection');
this.model = require('../generators/model');
this.router = require('../generators/router');
this.view = require('../generators/view');
});

describe('create expected files', function () {
Expand Down

0 comments on commit 115f049

Please sign in to comment.