Skip to content

Commit

Permalink
Trim trailing whitespace and add EOF
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jul 24, 2012
1 parent e73ff7b commit 2cb9e80
Show file tree
Hide file tree
Showing 43 changed files with 100 additions and 100 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
insert_final_newline = true
2 changes: 1 addition & 1 deletion cli/bin/help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
<%= 'update'.yellow %> <%= 'Update a package to the latest version'.grey %>
<%= 'list'.yellow %> <%= 'List the packages currently installed'.grey %>
<%= 'search'.yellow %> <%= 'Query the registry for matching package names'.grey %>
<%= 'lookup'.yellow %> <%= 'Look up info on a particular package'.grey %>
<%= 'lookup'.yellow %> <%= 'Look up info on a particular package'.grey %>
2 changes: 1 addition & 1 deletion cli/lib/generators/angular/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Currently as this doesn't follow the same model/view/controller structure
as we expect, it should be used via yeoman g angular:bootstrap until we've
figured out how better to hook everything up.

Based on https://github.com/angular/angular-seed/
Based on https://github.com/angular/angular-seed/
4 changes: 2 additions & 2 deletions cli/lib/generators/angular/templates/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//= require_tree ./templates
//= require_self

// The angular application is created elsewhere (application.js)
// The angular application is created elsewhere (application.js)
// where this file is required through the pipeline

'use strict';
Expand All @@ -16,4 +16,4 @@ angular.module(<%= grunt.util._.camelize(appname) %>, ['<%= grunt.util._.cameliz
$routeProvider.when('/view1', {templateUrl: 'partials/partial1.html', controller: MyCtrl1});
$routeProvider.when('/view2', {templateUrl: 'partials/partial2.html', controller: MyCtrl2});
$routeProvider.otherwise({redirectTo: '/view1'});
}]);
}]);
2 changes: 1 addition & 1 deletion cli/lib/generators/angular/templates/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ MyCtrl1.$inject = [];

function MyCtrl2() {
}
MyCtrl2.$inject = [];
MyCtrl2.$inject = [];
2 changes: 1 addition & 1 deletion cli/lib/generators/angular/templates/directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ angular.module('<%= _.camelize(appname) %>.directives', []).
return function(scope, elm, attrs) {
elm.text(version);
};
}]);
}]);
2 changes: 1 addition & 1 deletion cli/lib/generators/angular/templates/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ angular.module('<%= _.camelize(appname) %>.filters', []).
return function(text) {
return String(text).replace(/\%VERSION\%/mg, version);
}
}]);
}]);
2 changes: 1 addition & 1 deletion cli/lib/generators/angular/templates/partials1.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<p>This is the partial for view 1.</p>
<p>This is the partial for view 1.</p>
2 changes: 1 addition & 1 deletion cli/lib/generators/angular/templates/partials2.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
<p>
Showing of 'interpolate' filter:
{{ 'Current version is v%VERSION%.' | interpolate }}
</p>
</p>
2 changes: 1 addition & 1 deletion cli/lib/generators/angular/templates/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
// Demonstrate how to register services
// In this case it is a simple value service.
angular.module('<%= _.camelize(appname) %>.services', []).
value('version', '0.1');
value('version', '0.1');
12 changes: 6 additions & 6 deletions cli/lib/generators/backbone/all/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ Generator.prototype.injectBackbone = function injectBackbone() {

// Read in as string for further update
var indexData = this.readFileAsString(indexOut);

// Workaround until copying underscore/lodash-like scripts don't cause issues.
indexData = this.appendScripts(indexData,
'app/js/vendor.js',
['http://cdnjs.cloudflare.com/ajax/libs/lodash.js/0.4.1/lodash.min.js',
indexData = this.appendScripts(indexData,
'app/js/vendor.js',
['http://cdnjs.cloudflare.com/ajax/libs/lodash.js/0.4.1/lodash.min.js',
'http://cdnjs.cloudflare.com/ajax/libs/backbone.js/0.9.2/backbone-min.js']);

// Wire MVC components (usemin: app/js/myapp.js)
indexData = this.appendScripts(indexData,
'app/js/myapp.js',
indexData = this.appendScripts(indexData,
'app/js/myapp.js',
['app/js/' + this.appname +'.js',
'app/js/views/application-view.js',
'app/js/models/application-model.js',
Expand Down
2 changes: 1 addition & 1 deletion cli/lib/generators/backbone/collection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = Generator;
function Generator() {
yeoman.generators.NamedBase.apply(this, arguments);
this.sourceRoot(path.join(__dirname, '../templates'));

this.appname = path.basename(process.cwd());
}

Expand Down
2 changes: 1 addition & 1 deletion cli/lib/generators/backbone/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ Writing app/js/models/application-model.js...OK
Writing app/js/collections/application-collection.js...OK

.. Invoke backbone:router:bootstrap ..
Writing app/js/routes/app-router.js...OK
Writing app/js/routes/app-router.js...OK
2 changes: 1 addition & 1 deletion cli/lib/generators/backbone/templates/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ window.<%= grunt.util._.camelize(appname) %> = {

$(document).ready(function(){
<%= grunt.util._.camelize(appname) %>.init();
});
});
2 changes: 1 addition & 1 deletion cli/lib/generators/backbone/templates/collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

model: <%= _.camelize(appname) %>.<%= _.classify(name) %>Model

});
});
2 changes: 1 addition & 1 deletion cli/lib/generators/backbone/templates/model.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<%= _.camelize(appname) %>.<%= _.classify(name) %>Model = Backbone.Model.extend({

});
});
4 changes: 2 additions & 2 deletions cli/lib/generators/backbone/templates/router.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<%= grunt.util._.camelize(appname) %>.Router = Backbone.Router.extend({
});

});
2 changes: 1 addition & 1 deletion cli/lib/generators/backbone/templates/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

//template: <%= grunt.util._.underscored(name) %>

});
});
2 changes: 1 addition & 1 deletion cli/lib/generators/ember/templates/application.handlebars
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<h1><%= application_name %></h1>

{{outlet}}
{{outlet}}
2 changes: 1 addition & 1 deletion cli/lib/generators/wiring.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Wiring.appendScripts = function appendScripts(html, optimizedPath, sourceFileLis
return Wiring.appendFiles(html, 'js', optimizedPath, sourceFileList);
}

// Simple script removal.
// Simple script removal.
// Todo: establish if Cheerio has workarounds for script selectors
Wiring.removeScript = function removeScript(html, scriptPath){

Expand Down
14 changes: 7 additions & 7 deletions cli/lib/generators/yeoman/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ AppGenerator.prototype.gitignore = function gitignore() {
AppGenerator.prototype.fetchH5bp = function fetchH5bp() {
var cb = this.async();
var self = this;

// Fecth allows the download of single files, into the destination directory
this.fetch('https://raw.github.com/h5bp/html5-boilerplate/master/index.html', 'index.html', function(err) {
if(err) return cb(err);
Expand All @@ -82,20 +82,20 @@ AppGenerator.prototype.fetchH5bp = function fetchH5bp() {
// Wire Twitter Bootstrap plugins (usemin: app/js/plugins.js)
indexData = self.appendScripts(indexData,
'app/js/plugins.js',
["app/js/vendor/bootstrap/bootstrap-alert.js",
"app/js/vendor/bootstrap/bootstrap-dropdown.js",
["app/js/vendor/bootstrap/bootstrap-alert.js",
"app/js/vendor/bootstrap/bootstrap-dropdown.js",
"app/js/vendor/bootstrap/bootstrap-tooltip.js",
"app/js/vendor/bootstrap/bootstrap-modal.js",
"app/js/vendor/bootstrap/bootstrap-transition.js",
"app/js/vendor/bootstrap/bootstrap-button.js",
"app/js/vendor/bootstrap/bootstrap-popover.js",
"app/js/vendor/bootstrap/bootstrap-popover.js",
"app/js/vendor/bootstrap/bootstrap-typeahead.js",
"app/js/vendor/bootstrap/bootstrap-carousel.js",
"app/js/vendor/bootstrap/bootstrap-carousel.js",
"app/js/vendor/bootstrap/bootstrap-scrollspy.js",
"app/js/vendor/bootstrap/bootstrap-collapse.js",
"app/js/vendor/bootstrap/bootstrap-collapse.js",
"app/js/vendor/bootstrap/bootstrap-tab.js"]);
// Alternative: indexData = _this.appendScriptsDir(indexData, 'js/plugins.js', path.resolve('app/js/vendor/bootstrap'));

// Write out final file
self.writeFileFromString(indexData, indexOut);

Expand Down
2 changes: 1 addition & 1 deletion cli/lib/generators/yeoman/app/templates/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ module.exports = function(grunt) {

// usemin handler should point to the file containing
// the usemin blocks to be parsed
'usemin-handler': {
'usemin-handler': {
html: 'index.html'
},

Expand Down
4 changes: 2 additions & 2 deletions cli/lib/generators/yeoman/simpleapp/templates/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ module.exports = function(grunt) {

// usemin handler should point to the file containing
// the usemin blocks to be parsed
'usemin-handler': {
'usemin-handler': {
html: 'index.html'
},

// update references in html / css to revved files
usemin: {
html: ['**/*.html'],
Expand Down
2 changes: 1 addition & 1 deletion cli/samples/todos_spine_requirejs/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ AddType audio/mp4 m4a f4a f4b

# Video
AddType video/ogg ogv
AddType video/mp4 mp4 m4v f4v f4p
AddType video/mp4 mp4 m4v f4v f4p
AddType video/webm webm
AddType video/x-flv flv

Expand Down
2 changes: 1 addition & 1 deletion cli/samples/todos_spine_requirejs/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ module.exports = function(grunt) {
});



// Alias the `test` task to run the `jasmine` task instead
grunt.registerTask('test', 'jasmine');

Expand Down
14 changes: 7 additions & 7 deletions cli/samples/todos_spine_requirejs/js/coffee/Task.coffee
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
define (require, exports, module) ->
module.exports = Task


Spine = require "coffee/spineModule"

class Task extends Spine.Model
@configure "Task", "name", "done"

@extend Spine.Model.Local

@active: ->
@select (item) -> !item.done

@done: ->
@select (item) -> !!item.done

@destroyDone: ->
rec.destroy() for rec in @done()
16 changes: 8 additions & 8 deletions cli/samples/todos_spine_requirejs/js/coffee/Tasks.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,33 @@ define (require, exports, module) ->
"dblclick .view": "edit"
"keypress input[type=text]": "blurOnEnter"
"blur input[type=text]": "close"

elements:
"input[type=text]": "input"

constructor: ->
super
@item.bind("update", @render)
@item.bind("destroy", @release)

render: =>
@replace(jQuery("#taskTemplate").tmpl(@item))
@

toggle: ->
@item.done = !@item.done
@item.save()

remove: ->
@item.destroy()

edit: ->
@el.addClass("editing")
@input.focus()

blurOnEnter: (e) ->
if e.keyCode is 13 then e.target.blur()

close: ->
@el.removeClass("editing")
@item.updateAttributes({name: @input.val()})
6 changes: 3 additions & 3 deletions cli/samples/todos_spine_requirejs/js/coffee/spineModule.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
define(
["spine", "local", "manager"], function(spine,local,manager) {

// when the spine scripts above execute, they stick a Spine onto the global namespace which
// we don't want to use... so using a closure here to extract a private reference to that and
// once we've got it we can delete the window.Spine reference and then force all of our code
Expand All @@ -16,5 +16,5 @@ define(
return _innerSpine;
};

return findSpine;
}());
return findSpine;
}());
2 changes: 1 addition & 1 deletion cli/samples/todos_spine_requirejs/js/hm/nyan.hm
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ export function animator(items){
if(items instanceof jQuery){
items.find('.special').html('<img src="img/nyan.gif"/>');
}
}
}
2 changes: 1 addition & 1 deletion cli/samples/todos_spine_requirejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
],
"dependencies": {},
"keywords": []
}
}
4 changes: 2 additions & 2 deletions cli/tasks/coffee.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = function(grunt) {
grunt.registerHelper('coffee', function(src, destPath) {
var coffee = require('coffee-script'),
js = '',
dest = path.join(destPath,
dest = path.join(destPath,
path.basename(src, '.coffee') + '.js');

try {
Expand All @@ -27,4 +27,4 @@ module.exports = function(grunt) {
}
});

};
};
2 changes: 1 addition & 1 deletion cli/tasks/compass.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ module.exports = function( grunt ) {
compass.stdout.pipe( process.stdout );
compass.stderr.pipe( process.stderr );
});
};
};
2 changes: 1 addition & 1 deletion cli/tasks/less.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ grunt.registerHelper('less', function(o) {
};
});

};
};
2 changes: 1 addition & 1 deletion cli/tasks/livereload/livereload.js
Original file line number Diff line number Diff line change
Expand Up @@ -1053,4 +1053,4 @@ LiveReload.on('disconnect', function() {
CustomEvents.bind(document, 'LiveReloadShutDown', function() {
return LiveReload.shutDown();
});
})();
})();
2 changes: 1 addition & 1 deletion cli/tasks/misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ module.exports = function(grunt) {
grunt.registerHelper('copy', function(src, dest, ignores, cb) {
if(!cb) { cb = ignores; ignores = ['.gitignore', '.ignore', '.buildignore']; }

function error(msg) {
function error(msg) {
return function(e) {
if(!e) {
grunt.log.writeln();
Expand Down
Loading

0 comments on commit 2cb9e80

Please sign in to comment.