Skip to content

Commit cc1a382

Browse files
committed
merge from master
2 parents 01691ab + 96a664a commit cc1a382

12 files changed

+6670
-34
lines changed

dist/loading-bar.js

Lines changed: 23 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/loading-bar.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/loading-bar.zip

-3.99 KB
Binary file not shown.

gulpfile.ls

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ argv = require 'yargs' .argv
22
only-compile = false
33

44

5-
require! <[ watchify gulp browserify glob path fs globby touch ]>
5+
require! <[ watchify gulp browserify glob path fs globby touch gulp-livescript]>
66
require! 'prelude-ls': {union, join, keys, map, unique}
77
require! 'vinyl-source-stream': source
88
require! 'vinyl-buffer': buffer
@@ -60,6 +60,7 @@ for-browserify =
6060
gulp.task \default, ->
6161
do function run-all
6262
gulp.start do
63+
\lib
6364
\browserify
6465
\css
6566
\zip
@@ -70,6 +71,8 @@ gulp.task \default, ->
7071
gulp.start \browserify
7172
watch ["#{src-path}/*.styl"], ->
7273
gulp.start \css
74+
watch ["#{src-path}/*.ls"], ->
75+
gulp.start \lib
7376
watch ["#{out-dir}/*.js", "#{out-dir}/*.css"], ->
7477
gulp.start \zip
7578
watch ["#{out-dir}/loading-bar.js"], ->
@@ -119,6 +122,11 @@ function bundle
119122
gulp.task \browserify, ->
120123
bundle!
121124

125+
gulp.task \lib, ->
126+
gulp.src \src/*.ls
127+
.pipe gulp-livescript bare: true
128+
.pipe gulp.dest 'lib'
129+
122130
gulp.task \css, ->
123131
gulp.src \src/loading-bar.styl
124132
.pipe stylus({compress: true})

lib/angularjs-binding.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
var x$;
2+
x$ = angular.module('loadingio', []);
3+
x$.directive('ldbar', ['$compile', '$timeout'].concat(function($compile, $timeout){
4+
return {
5+
restrict: 'A',
6+
scope: {
7+
model: '=ngModel',
8+
config: '=config'
9+
},
10+
link: function(s, e, a, c){
11+
var bar;
12+
if (e[0]) {
13+
bar = !e[0].ldBar
14+
? new ldBar(e[0], s.config || {})
15+
: e[0].ldBar;
16+
}
17+
return s.$watch('model', function(n, o){
18+
return bar.set(n);
19+
});
20+
}
21+
};
22+
}));

lib/loading-bar.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export = ldBar;
2+
declare class ldBar {
3+
constructor(element: any, options: object);
4+
set(value: number): void;
5+
}

0 commit comments

Comments
 (0)