forked from angular-ui/ui-router
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
31,980 additions
and
585 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License | ||
|
||
Copyright (c) 2013 Foxtrot Media Ltd, http://foxtrotmedia.co.nz/ | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
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,6 +1,6 @@ | ||
angular-extras | ||
============== | ||
|
||
Experimental extensions for Angular JS (http://angularjs.org) | ||
Experimental extensions for Angular JS (http://angularjs.org), part of the Angular UI router effort: https://github.com/angular-ui/router/ | ||
|
||
Sample in action: http://filedrop.plukmobile.net/angular-states/sample/index.html |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,74 @@ | ||
var testacular = require('testacular'); | ||
|
||
/*global module:false*/ | ||
module.exports = function (grunt) { | ||
|
||
// Project configuration. | ||
grunt.initConfig({ | ||
builddir: 'build', | ||
pkg: '<json:package.json>', | ||
meta: { | ||
banner: '/**\n' + ' * <%= pkg.description %>\n' + | ||
' * @version v<%= pkg.version %> - ' + '<%= grunt.template.today("yyyy-mm-dd") %>\n' + | ||
' * @link <%= pkg.homepage %>\n' + | ||
' * @license MIT License, http://www.opensource.org/licenses/MIT\n' + ' */', | ||
prefix: '(function (window, angular, undefined) {', | ||
suffix: '})(window, window.angular);', | ||
}, | ||
concat: { | ||
build: { | ||
src: ['<banner:meta.banner>', '<banner:meta.prefix>', 'src/*.js', '<banner:meta.suffix>' ], | ||
dest: '<%= builddir %>/<%= pkg.name %>.js' | ||
}, | ||
}, | ||
min: { | ||
build: { | ||
src: ['<banner:meta.banner>', '<config:concat.build.dest>'], | ||
dest: '<%= builddir %>/<%= pkg.name %>.min.js' | ||
}, | ||
}, | ||
lint: { | ||
files: ['grunt.js', 'src/*.js'] | ||
}, | ||
watch: { | ||
files: ['src/*.js'], | ||
tasks: 'build test' | ||
} | ||
}); | ||
|
||
// Default task. | ||
grunt.registerTask('default', 'build test'); | ||
grunt.registerTask('build', 'concat min'); | ||
|
||
grunt.registerTask('dist', 'Change dist location', function() { | ||
var dir = this.args[0]; | ||
if (dir) { grunt.config('builddir', dir); } | ||
}); | ||
|
||
grunt.registerTask('test-server', 'Start testacular server', function () { | ||
//Mark the task as async but never call done, so the server stays up | ||
var done = this.async(); | ||
testacular.server.start({ configFile: 'test/test-config.js'}); | ||
}); | ||
|
||
grunt.registerTask('test', 'Run tests (make sure test-server task is run first)', function () { | ||
var done = this.async(); | ||
grunt.utils.spawn({ | ||
cmd: process.platform === 'win32' ? 'testacular.cmd' : 'testacular', | ||
args: process.env.TRAVIS ? ['start', 'test/test-config.js', '--single-run', '--no-auto-watch', '--reporter=dots', '--browsers=Firefox'] : ['run'] | ||
}, function (error, result, code) { | ||
if (error) { | ||
grunt.warn("Make sure the testacular server is online: run `grunt test-server`.\n" + | ||
"Also make sure you have a browser open to http://localhost:8080/.\n" + | ||
error.stdout + error.stderr); | ||
//the testacular runner somehow modifies the files if it errors(??). | ||
//this causes grunt's watch task to re-fire itself constantly, | ||
//unless we wait for a sec | ||
setTimeout(done, 1000); | ||
} else { | ||
grunt.log.write(result.stdout); | ||
done(); | ||
} | ||
}); | ||
}); | ||
}; |
Oops, something went wrong.