Skip to content

Commit

Permalink
add travis-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
pusongyang committed Feb 25, 2016
1 parent 898b935 commit 4e71bba
Show file tree
Hide file tree
Showing 12 changed files with 122 additions and 682 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
sudo: false
language: node_js
node_js:
- '4'
- '0.12'
- '0.10'
3 changes: 2 additions & 1 deletion generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ var BackboneGenerator = yeoman.generators.Base.extend({
desc: 'Skip the bower and npm installations',
defaults: false
});
this.argument('app_name', { type: String, required: false });
this.appname = this.app_name || this.appname;
this.appname = pascalCase(this.appname);

this.config.defaults({
Expand Down Expand Up @@ -79,7 +81,6 @@ var BackboneGenerator = yeoman.generators.Base.extend({
cssUILib = answers.cssUILib,
entryIndex = answers.entryIndex,
serverRouteName = answers.serverRouteName;

function hasFeature(feat) {
return features.indexOf(feat) !== -1;
}
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"generators/app",
"generators/collection",
"generators/model",
"generators/router",
"generators/templates",
"generators/view",
"script-base.js",
Expand Down
9 changes: 3 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ A Fullstack Backbone generator for Yeoman that provides a functional boilerplate
Optional RequireJS (AMD) support has recently been added as a prompt when using the generator on new projects.

Features:

1) grunt build,support offline Manifest.
2) grunt upload,support compress and publish package.(But you need development your own CMS server)

- 1) UI lib support,Sass(Compass):Materialize,Foundation,Bootstrap.
- 2) grunt build,support offline Manifest.
- 3) grunt upload,support compress and publish package.(But you need development your own CMS server).

## Usage

Expand Down Expand Up @@ -90,8 +89,6 @@ A result of this change is that your template variable definitions must also be

## Contribute

When submitting an issue, please follow the [guidelines](https://github.com/yeoman/yeoman/blob/master/contributing.md#issue-submission). Especially important is to make sure Yeoman is up-to-date, and providing the command or commands that cause the issue.

When submitting a bugfix, write a test that exposes the bug and fails before applying your fix. Submit the test alongside the fix.

When submitting a new feature, add tests that cover the feature.
Expand Down
48 changes: 24 additions & 24 deletions test/helper.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
var yeoman = require('yeoman-generator');
var yeoman = require('yeoman-generator');
var helpers = yeoman.test;
var path = require('path');
var fs = require('fs');
var path = require('path');
var fs = require('fs');

exports.createSubGenerator = function (config, type, asserts, deps) {
deps = deps || [];
helpers.run(path.join(__dirname, '../generators/' + type))
.inDir(path.join(__dirname, 'temp'), function () {
fs.writeFileSync('.yo-rc.json', config);
})
.withArguments(['foo'])
.withGenerators(deps)
.on('end', asserts);
deps = deps || [];
helpers.run(path.join(__dirname, '../generators/' + type))
.inDir(path.join(__dirname, 'temp'), function () {
fs.writeFileSync('.yo-rc.json', config);
})
.withArguments(['foo'])
.withGenerators(deps)
.on('end', asserts);
};

exports.createAppGenerator = function (config, prompts, done) {

prompts = prompts || { features: ['sassBootstrap']};
prompts = prompts || {features: ['sassBootstrap']};

var options = { skipInstall: true };
var options = {skipInstall: true};

var deps = [
[helpers.createDummyGenerator(), 'mocha:app']
];
helpers.run(path.join(__dirname, '../generators/app'))
.inDir(path.join(__dirname, 'temp'), function () {
fs.writeFileSync('.yo-rc.json', config);
})
.withPrompts(prompts)
.withOptions(options)
.withGenerators(deps)
.on('end', done);
var deps = [
[helpers.createDummyGenerator(), 'mocha:app']
];
helpers.run(path.join(__dirname, '../generators/app'))
.inDir(path.join(__dirname, 'temp'), function () {
fs.writeFileSync('.yo-rc.json', config);
})
.withPrompts(prompts)
.withOptions(options)
.withGenerators(deps)
.on('end', done);
};
109 changes: 0 additions & 109 deletions test/test-apppath.js

This file was deleted.

106 changes: 0 additions & 106 deletions test/test-coffee-requirejs.js

This file was deleted.

Loading

0 comments on commit 4e71bba

Please sign in to comment.