-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from firebase/run-loop-fixes
Run Loop Fixes
- Loading branch information
Showing
30 changed files
with
7,057 additions
and
3,707 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
node_modules/ | ||
node_modules/ | ||
*-boilerplate/ | ||
tmp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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']); | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.