This commit is contained in:
Matthew Riley MacPherson 2014-06-15 17:15:10 -04:00
Родитель 4f43f962ae
Коммит 25d7610c69
5 изменённых файлов: 46 добавлений и 30 удалений

21
.jscsrc Normal file
Просмотреть файл

@ -0,0 +1,21 @@
{
"disallowSpacesInAnonymousFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"requireSpaceAfterKeywords": [
"if",
"else",
"for",
"while",
"do",
"switch",
"return",
"try",
"catch"
],
"requireSpaceBeforeBlockStatements": true,
"requireSpacesInConditionalExpression": true,
"requireSpacesInFunctionExpression": {
"beforeOpeningCurlyBrace": true
}
}

Просмотреть файл

@ -20,6 +20,7 @@
"jQuery": true, "jQuery": true,
"Ember": true, "Ember": true,
"Handlebars": true, "Handlebars": true,
"DS": true "DS": true,
"Promise": true
} }
} }

Просмотреть файл

@ -24,6 +24,13 @@ module.exports = function (grunt) {
dist: 'dist' dist: 'dist'
}; };
var sourceFiles = [
'Gruntfile.js',
'<%= yeoman.app %>/scripts/{,*/}*.js',
'!<%= yeoman.app %>/scripts/vendor/*',
'test/spec/{,*/}*.js'
];
grunt.initConfig({ grunt.initConfig({
yeoman: yeomanConfig, yeoman: yeomanConfig,
watch: { watch: {
@ -107,17 +114,15 @@ module.exports = function (grunt) {
}, },
server: '.tmp' server: '.tmp'
}, },
jscs: {
source: sourceFiles
},
jshint: { jshint: {
options: { options: {
jshintrc: '.jshintrc', jshintrc: '.jshintrc',
reporter: require('jshint-stylish') reporter: require('jshint-stylish')
}, },
all: [ source: sourceFiles
'Gruntfile.js',
'<%= yeoman.app %>/scripts/{,*/}*.js',
'!<%= yeoman.app %>/scripts/vendor/*',
'test/spec/{,*/}*.js'
]
}, },
mocha: { mocha: {
all: { all: {
@ -347,6 +352,8 @@ module.exports = function (grunt) {
}); });
grunt.registerTask('test', [ grunt.registerTask('test', [
'jshint',
'jscs',
'clean:server', 'clean:server',
'replace:app', 'replace:app',
'concurrent:test', 'concurrent:test',
@ -379,6 +386,7 @@ module.exports = function (grunt) {
grunt.registerTask('default', [ grunt.registerTask('default', [
'jshint', 'jshint',
'jscs',
'test', 'test',
'build' 'build'
]); ]);

Просмотреть файл

@ -1,15 +0,0 @@
HighFidelity.EpisodeEditController = Ember.ObjectController.extend({
needs: 'episode',
actions: {
save: function(){
var _this = this;
this.get('buffer').forEach(function(attr) {
_this.get('controllers.episode.model')
.set(attr.key, attr.value);
});
this.transitionToRoute('episode',this.get('model'));
}
}
});

Просмотреть файл

@ -19,6 +19,7 @@
"grunt-contrib-watch": "~0.5.2", "grunt-contrib-watch": "~0.5.2",
"grunt-ember-templates": "0.4.14", "grunt-ember-templates": "0.4.14",
"grunt-gh-pages": "^0.9.1", "grunt-gh-pages": "^0.9.1",
"grunt-jscs-checker": "^0.4.4",
"grunt-mocha": "~0.4.1", "grunt-mocha": "~0.4.1",
"grunt-neuter": "~0.5.0", "grunt-neuter": "~0.5.0",
"grunt-open": "~0.2.0", "grunt-open": "~0.2.0",