Skip to content

Commit

Permalink
Merge pull request #31 from firebase/run-loop-fixes
Browse files Browse the repository at this point in the history
Run Loop Fixes
  • Loading branch information
aputinski committed Apr 1, 2014
2 parents 1048872 + 02e6ed7 commit 2a6c0ec
Show file tree
Hide file tree
Showing 30 changed files with 7,057 additions and 3,707 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
node_modules/
node_modules/
*-boilerplate/
tmp/
107 changes: 25 additions & 82 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,92 +1,35 @@
/* global module */

module.exports = function(grunt) {
'use strict';

grunt.initConfig({

concat: {
dist: {
src: ['src/*.js'],
dest: 'dist/emberfire.js',
options: {
banner: "'use strict';\n",
process: function(src, filePath) {
return '\n// Source: ' + filePath + '\n' +
src.replace(/(^|\n)[ \t]*('use strict'|"use strict");?\s*/g, '$1');
}
}
}
},

uglify : {
app : {
files : {
'dist/emberfire.min.js' : ['dist/emberfire.js']
}
}
},

jshint : {
options: {
jshintrc: '.jshintrc',
ignores: ['test.js']
},
all : ['src/*.js']
},
var config = require('load-grunt-config')(grunt, {
configPath: 'tasks/options',
init: false
});

watch : {
scripts : {
files : 'src/*.js',
tasks : ['default', 'notify:watch'],
options : {
interrupt : true
}
}
},
grunt.loadTasks('tasks');

notify: {
watch: {
options: {
title: 'Grunt Watch',
message: 'Build Finished'
}
}
},
this.registerTask('default', ['build']);

qunit: {
all: {
options: {
urls: [
'http://localhost:8002/test/test.html',
]
}
}
},
// Build a new version of the library
this.registerTask('build', 'Builds a distributable version of <%= cfg.name %>', [
'concat',
'jshint',
'uglify:dist'
]);

connect: {
server: {
options: {
port: 8002,
base: '.',
keepalive: false
}
}
}
// Run client-side tests on the command line.
this.registerTask('test', 'Runs tests through the command line using PhantomJS', [
'build',
'mocha_phantomjs'
]);

});
config.env = process.env;
config.pkg = grunt.file.readJSON('package.json');

grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-exec');
grunt.loadNpmTasks('grunt-notify');
// Load custom tasks from NPM
grunt.loadNpmTasks('grunt-mocha-phantomjs');
grunt.loadNpmTasks('grunt-mocha-test');

grunt.registerTask('build', ['jshint', 'concat', 'uglify']);
grunt.registerTask('test', ['connect', 'qunit']);
// Merge config into emberConfig, overwriting existing settings
grunt.initConfig(config);

grunt.registerTask('default', ['build', 'test']);
};
};
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Firebase bindings for Ember Data",
"main": ["./dist/emberfire.js"],
"dependencies": {
"ember": "~1.4.0",
"ember": ">=0.1.4 < 2.0.0",
"ember-data": "~1.0.0-beta.7",
"firebase": "~1.0.6"
},
Expand Down

0 comments on commit 2a6c0ec

Please sign in to comment.