Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.idea
.grunt
_SpecRunner.html
*.iml
node_modules
public/js/vendors/
10 changes: 6 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
language: node_js
node_js:
- "0.8"
- "0.10"
before_install:
- "npm install -g grunt-cli"
- "npm install -g bower"
- "bower install"
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
script: bundle exec rake
- "bower install"
5 changes: 0 additions & 5 deletions Gemfile

This file was deleted.

39 changes: 0 additions & 39 deletions Gemfile.lock

This file was deleted.

150 changes: 89 additions & 61 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,71 +1,99 @@
module.exports = function (grunt) {
grunt.initConfig({
pkg:grunt.file.readJSON('package.json'),
banner:'/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>; \n*/\n',
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
bower: grunt.file.readJSON('bower.json'),
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>; \n*/\n',

concat: {
options: {
separator: ';'
},
dist: {
src: ['public/js/backbone-command/**/*.js'],
dest: '<%= pkg.name %>.js'
}
},
concat: {
options: {
separator: ';'
},
dist: {
src: ['public/js/backbone-command/**/*.js'],
dest: '<%= pkg.name %>.js'
}
},

uglify: {
dist: {
files: {
'<%= pkg.name %>.min.js': '<%= pkg.name %>.js'
},
options: {
banner:'<%= banner %>'
}
}
},
uglify: {
dist: {
files: {
'<%= pkg.name %>.min.js': '<%= pkg.name %>.js'
},
options: {
banner: '<%= banner %>'
}
}
},

copy: {
backboneCommand: {
src: ['<%= pkg.name %>.js', '<%= pkg.name %>.min.js'],
dest: 'public/js/dist/'
}
},
copy: {
backboneCommand: {
src: ['<%= pkg.name %>.js', '<%= pkg.name %>.min.js'],
dest: 'public/js/dist/'
}
},

watch: {
files: ['public/js/*.js'],
tasks: ['concat:dist','uglify:dist', 'copy:backboneCommand']
},
watch: {
files: ['public/js/*.js'],
tasks: ['concat:dist', 'uglify:dist', 'copy:backboneCommand']
},

bump: {
options: {
files: ['package.json', 'bower.json'],
updateConfigs: ["pkg","banner"],
commit: true,
commitMessage: 'Release v%VERSION%',
commitFiles: ['package.json', 'bower.json', '<%= pkg.name %>.min.js', '<%= pkg.name %>.js', 'public/js/dist/<%= pkg.name %>.min.js', 'public/js/dist/<%= pkg.name %>.js'], // '-a' for all files
createTag: true,
tagName: 'v%VERSION%',
tagMessage: 'Version %VERSION%',
push: true,
pushTo: 'origin master',
gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d' // options to use with '$ git describe'
}
}
});
bump: {
options: {
files: ['package.json', 'bower.json'],
updateConfigs: ["pkg", "banner"],
commit: true,
commitMessage: 'Release v%VERSION%',
commitFiles: ['package.json', 'bower.json', '<%= pkg.name %>.min.js', '<%= pkg.name %>.js', 'public/js/dist/<%= pkg.name %>.min.js', 'public/js/dist/<%= pkg.name %>.js'], // '-a' for all files
createTag: true,
tagName: 'v%VERSION%',
tagMessage: 'Version %VERSION%',
push: true,
pushTo: 'origin master',
gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d' // options to use with '$ git describe'
}
},

grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-bump');
jasmine: {
components: {
src: [
'public/js/backbone-command/*js'
],
options: {
specs: 'spec/*Spec.js',
keepRunner: true,
vendor: [
'public/js/vendors/jquery/jquery.min.js',
'public/js/vendors/underscore/underscore-min.js',
'public/js/vendors/backbone/backbone-min.js',
'public/js/vendors/injector.js/injector-js.min.js'
]
}
}
}
});

grunt.registerTask('default', ['concat','uglify', 'copy']);
// plugins
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-bump');

grunt.registerTask('release', ['default','bump-commit']);
grunt.registerTask('release:patch', ['bump-only:patch','release']);
grunt.registerTask('release:minor', ['bump-only:minor','release']);
grunt.registerTask('release:major', ['bump-only:major','release']);
// tasks
grunt.registerTask('default', ['concat', 'uglify', 'copy']);

grunt.registerTask('release', ['default', 'bump-commit']);
grunt.registerTask('release:patch', ['bump-only:patch', 'release']);
grunt.registerTask('release:minor', ['bump-only:minor', 'release']);
grunt.registerTask('release:major', ['bump-only:major', 'release']);

// travis!
grunt.registerTask('travis', 'Testing specs on Travis-CI', [
// 'jshint', TODO maybe implement jshint for strict coding?
'jasmine'
]);
};
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# backbone-command [![Build Status](https://travis-ci.org/biggerboat/backbone-command.png)](https://travis-ci.org/biggerboat/backbone-command)
# backbone-command [![Build Status](https://travis-ci.org/inlet/backbone-command.png)](https://travis-ci.org/inlet/backbone-command)

Execution of [commands](http://en.wikipedia.org/wiki/Command_pattern) upon event triggers.
This is build for usage with [Backbone](https://github.com/jashkenas/backbone) and relies on [injector.js](https://github.com/biggerboat/injector.js)
Expand Down
3 changes: 0 additions & 3 deletions Rakefile

This file was deleted.

2 changes: 1 addition & 1 deletion backbone-command.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 27 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
{
"name": "backbone-command",
"version": "0.1.2",
"author": {
"name": "Paul Tondeur",
"email": "paul@paultondeur.nl",
"url": "http://paultondeur.com"
},
"description": "Small Backbone extension for command execution on model changes",
"repository": {
"type": "git",
"url": "https://github.com/PaulTondeur/backbone-command"
},
"dependencies": {
"grunt": "~0.4.0",
"grunt-contrib-uglify": "~0.1.2",
"grunt-contrib-watch": "~0.3.1",
"grunt-contrib-copy": "~0.4.0",
"grunt-bump": "~0.0.11"
},
"engines": {
"node": "0.8.x"
},
"devDependencies": {
"grunt-contrib-concat": "~0.3.0"
}
"name": "backbone-command",
"version": "0.1.2",
"author": {
"name": "Paul Tondeur",
"email": "paul@paultondeur.nl",
"url": "http://paultondeur.com"
},
"description": "Small Backbone extension for command execution on model changes",
"repository": {
"type": "git",
"url": "https://github.com/PaulTondeur/backbone-command"
},
"engines": {
"node": "0.8.x"
},
"scripts": {
"test": "grunt travis --verbose"
},
"devDependencies": {
"grunt": "~0.4.0",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-uglify": "~0.1.2",
"grunt-contrib-watch": "~0.3.1",
"grunt-contrib-copy": "~0.4.0",
"grunt-contrib-jasmine": "~0.5.2",
"grunt-bump": "~0.0.11"
}
}
2 changes: 1 addition & 1 deletion public/js/dist/backbone-command.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
Loading