Skip to content

Commit a0b28aa

Browse files
0.2.8-bowratic-tedium
0 parents  commit a0b28aa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+16411
-0
lines changed

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# master only
2+
build
3+
4+
# common
5+
node_modules
6+
bower_components
7+
.DS_Store
8+
*~
9+
10+
# webstorm files
11+
.idea

.travis.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
language: node_js
2+
node_js:
3+
- "0.8"
4+
5+
before_script:
6+
- export DISPLAY=:99.0
7+
- sh -e /etc/init.d/xvfb start
8+
- npm install -g karma
9+
- npm install -g grunt-cli
10+
- ./nodeserver.sh > /dev/null &
11+
12+
script:
13+
- grunt

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<a name="v0.2.8"></a>
2+
### v0.2.8 (2014-01-16)
3+
4+
5+
#### Bug Fixes
6+
7+
* **$state:** allow null to be passed as 'params' param ([094dc30e](https://github.com/angular-ui/ui-router/commit/094dc30e883e1bd14e50a475553bafeaade3b178))
8+
* **$state.go:** param inheritance shouldn't inherit from siblings ([aea872e0](https://github.com/angular-ui/ui-router/commit/aea872e0b983cb433436ce5875df10c838fccedb))
9+
* **uiSrefActive:** annotate controller injection ([85921422](https://github.com/angular-ui/ui-router/commit/85921422ff7fb0effed358136426d616cce3d583), closes [#671](https://github.com/angular-ui/ui-router/issues/671))
10+
* **uiView:**
11+
* autoscroll tests pass on 1.2.4 & 1.1.5 ([86eacac0](https://github.com/angular-ui/ui-router/commit/86eacac09ca5e9000bd3b9c7ba6e2cc95d883a3a))
12+
* don't animate initial load ([83b6634d](https://github.com/angular-ui/ui-router/commit/83b6634d27942ca74766b2b1244a7fc52c5643d9))
13+
* test pass against 1.0.8 and 1.2.4 ([a402415a](https://github.com/angular-ui/ui-router/commit/a402415a2a28b360c43b9fe8f4f54c540f6c33de))
14+
* it should autoscroll when expr is missing. ([8bb9e27a](https://github.com/angular-ui/ui-router/commit/8bb9e27a2986725f45daf44c4c9f846385095aff))
15+
16+
17+
#### Features
18+
19+
* **uiSref:** add target attribute behaviour ([c12bf9a5](https://github.com/angular-ui/ui-router/commit/c12bf9a520d30d70294e3d82de7661900f8e394e))
20+
* **uiView:**
21+
* merge autoscroll expression test. ([b89e0f87](https://github.com/angular-ui/ui-router/commit/b89e0f871d5cc35c10925ede986c10684d5c9252))
22+
* cache and test autoscroll expression ([ee262282](https://github.com/angular-ui/ui-router/commit/ee2622828c2ce83807f006a459ac4e11406d9258))
23+

Gruntfile.js

Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
/*global module:false*/
2+
module.exports = function (grunt) {
3+
4+
require('load-grunt-tasks')(grunt);
5+
var files = require('./files').files;
6+
7+
// Project configuration.
8+
grunt.initConfig({
9+
builddir: 'build',
10+
pkg: grunt.file.readJSON('package.json'),
11+
buildtag: '-dev-' + grunt.template.today('yyyy-mm-dd'),
12+
meta: {
13+
banner: '/**\n' +
14+
' * <%= pkg.description %>\n' +
15+
' * @version v<%= pkg.version %><%= buildtag %>\n' +
16+
' * @link <%= pkg.homepage %>\n' +
17+
' * @license MIT License, http://www.opensource.org/licenses/MIT\n' +
18+
' */'
19+
},
20+
clean: [ '<%= builddir %>' ],
21+
concat: {
22+
options: {
23+
banner: '<%= meta.banner %>\n\n'+
24+
'/* commonjs package manager support (eg componentjs) */\n'+
25+
'if (typeof module !== "undefined" && typeof exports !== "undefined" && module.exports === exports){\n'+
26+
' module.exports = \'ui.router\';\n'+
27+
'}\n\n'+
28+
'(function (window, angular, undefined) {\n',
29+
footer: '})(window, window.angular);'
30+
},
31+
build: {
32+
src: files.src,
33+
dest: '<%= builddir %>/<%= pkg.name %>.js'
34+
}
35+
},
36+
uglify: {
37+
options: {
38+
banner: '<%= meta.banner %>\n'
39+
},
40+
build: {
41+
files: {
42+
'<%= builddir %>/<%= pkg.name %>.min.js': ['<banner:meta.banner>', '<%= concat.build.dest %>']
43+
}
44+
}
45+
},
46+
release: {
47+
files: ['<%= pkg.name %>.js', '<%= pkg.name %>.min.js'],
48+
src: '<%= builddir %>',
49+
dest: 'release'
50+
},
51+
jshint: {
52+
all: ['Gruntfile.js', 'src/*.js', '<%= builddir %>/<%= pkg.name %>.js'],
53+
options: {
54+
eqnull: true
55+
}
56+
},
57+
watch: {
58+
files: ['src/*.js', 'test/**/*.js'],
59+
tasks: ['build', 'karma:background:run']
60+
},
61+
connect: {
62+
server: {},
63+
sample: {
64+
options:{
65+
port: 5555,
66+
keepalive: true
67+
}
68+
}
69+
},
70+
karma: {
71+
options: {
72+
configFile: 'config/karma.js',
73+
singleRun: true,
74+
exclude: [],
75+
frameworks: ['jasmine'],
76+
reporters: 'dots', // 'dots' || 'progress'
77+
port: 8080,
78+
colors: true,
79+
autoWatch: false,
80+
autoWatchInterval: 0,
81+
browsers: [ grunt.option('browser') || 'PhantomJS' ]
82+
},
83+
unit: {
84+
browsers: [ grunt.option('browser') || 'PhantomJS' ]
85+
},
86+
debug: {
87+
singleRun: false,
88+
background: false,
89+
browsers: [ grunt.option('browser') || 'Chrome' ]
90+
},
91+
past: {
92+
configFile: 'config/karma-1.0.8.js'
93+
},
94+
unstable: {
95+
configFile: 'config/karma-1.1.5.js'
96+
}
97+
},
98+
changelog: {
99+
options: {
100+
dest: 'CHANGELOG.md'
101+
}
102+
},
103+
ngdocs: {
104+
options: {
105+
dest: 'site',
106+
html5Mode: false,
107+
title: 'UI Router',
108+
startPage: '/api',
109+
},
110+
api: {
111+
src: ['src/**/*.js'],
112+
title: 'API Reference'
113+
}
114+
}
115+
});
116+
117+
grunt.registerTask('integrate', ['build', 'jshint', 'karma:unit', 'karma:past', 'karma:unstable']);
118+
grunt.registerTask('default', ['build', 'jshint', 'karma:unit']);
119+
grunt.registerTask('build', 'Perform a normal build', ['concat', 'uglify']);
120+
grunt.registerTask('dist', 'Perform a clean build and generate documentation', ['clean', 'build', 'ngdocs']);
121+
grunt.registerTask('release', 'Tag and perform a release', ['prepare-release', 'dist', 'perform-release']);
122+
grunt.registerTask('dev', 'Run dev server and watch for changes', ['build', 'connect:server', 'karma:background', 'watch']);
123+
grunt.registerTask('sample', 'Run connect server with keepalive:true for sample app development', ['connect:sample']);
124+
125+
grunt.registerTask('publish-pages', 'Publish a clean build, docs, and sample to github.io', function () {
126+
promising(this,
127+
ensureCleanMaster().then(function () {
128+
shjs.rm('-rf', 'build');
129+
return system('git checkout gh-pages');
130+
}).then(function () {
131+
return system('git merge master');
132+
}).then(function () {
133+
return system('grunt dist');
134+
}).then(function () {
135+
return system('git commit -a -m \'Automatic gh-pages build\'');
136+
}).then(function () {
137+
return system('git checkout master');
138+
})
139+
);
140+
});
141+
142+
grunt.registerTask('prepare-release', function () {
143+
var bower = grunt.file.readJSON('bower.json'),
144+
component = grunt.file.readJSON('component.json'),
145+
version = bower.version;
146+
if (version != grunt.config('pkg.version')) throw 'Version mismatch in bower.json';
147+
if (version != component.version) throw 'Version mismatch in component.json';
148+
149+
promising(this,
150+
ensureCleanMaster().then(function () {
151+
return exec('git tag -l \'' + version + '\'');
152+
}).then(function (result) {
153+
if (result.stdout.trim() !== '') throw 'Tag \'' + version + '\' already exists';
154+
grunt.config('buildtag', '');
155+
grunt.config('builddir', 'release');
156+
})
157+
);
158+
});
159+
160+
grunt.registerTask('perform-release', function () {
161+
grunt.task.requires([ 'prepare-release', 'dist' ]);
162+
163+
var version = grunt.config('pkg.version'), releasedir = grunt.config('builddir');
164+
promising(this,
165+
system('git add \'' + releasedir + '\'').then(function () {
166+
return system('git commit -m \'release ' + version + '\'');
167+
}).then(function () {
168+
return system('git tag \'' + version + '\'');
169+
})
170+
);
171+
});
172+
173+
174+
// Helpers for custom tasks, mainly around promises / exec
175+
var exec = require('faithful-exec'), shjs = require('shelljs');
176+
177+
function system(cmd) {
178+
grunt.log.write('% ' + cmd + '\n');
179+
return exec(cmd).then(function (result) {
180+
grunt.log.write(result.stderr + result.stdout);
181+
}, function (error) {
182+
grunt.log.write(error.stderr + '\n');
183+
throw 'Failed to run \'' + cmd + '\'';
184+
});
185+
}
186+
187+
function promising(task, promise) {
188+
var done = task.async();
189+
promise.then(function () {
190+
done();
191+
}, function (error) {
192+
grunt.log.write(error + '\n');
193+
done(false);
194+
});
195+
}
196+
197+
function ensureCleanMaster() {
198+
return exec('git symbolic-ref HEAD').then(function (result) {
199+
if (result.stdout.trim() !== 'refs/heads/master') throw 'Not on master branch, aborting';
200+
return exec('git status --porcelain');
201+
}).then(function (result) {
202+
if (result.stdout.trim() !== '') throw 'Working copy is dirty, aborting';
203+
});
204+
}
205+
};

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License
2+
3+
Copyright (c) 2013 Karsten Sperling
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

0 commit comments

Comments
 (0)