Skip to content
This repository was archived by the owner on Apr 7, 2020. It is now read-only.

Commit b5b4640

Browse files
committed
reworking build for ng-annotate
1 parent 4b8407b commit b5b4640

File tree

9 files changed

+66
-50
lines changed

9 files changed

+66
-50
lines changed

dist/ui-leaflet-draw.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* @version: 0.0.3
55
* @author: Nicholas McCready
6-
* @date: Thu Mar 17 2016 01:02:31 GMT-0400 (EDT)
6+
* @date: Sat Mar 18 2017 10:03:35 GMT-0400 (EDT)
77
* @license: MIT
88
*/
99

@@ -12,7 +12,7 @@
1212
var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
1313
hasProp = {}.hasOwnProperty;
1414

15-
angular.module('ui-leaflet').factory('leafletDrawEvents', function(leafletEventsHelpersFactory) {
15+
angular.module('ui-leaflet').factory('leafletDrawEvents', ["leafletEventsHelpersFactory", function(leafletEventsHelpersFactory) {
1616
var DrawEvents;
1717
DrawEvents = (function(superClass) {
1818
extend(DrawEvents, superClass);
@@ -31,7 +31,7 @@
3131

3232
})(leafletEventsHelpersFactory);
3333
return new DrawEvents();
34-
});
34+
}]);
3535

3636
}).call(this);
3737

@@ -43,8 +43,8 @@
4343

4444
directiveName = 'lfDraw';
4545

46-
angular.module('ui-leaflet').config(function($provide) {
47-
return $provide.decorator('leafletDirective', function($delegate) {
46+
angular.module('ui-leaflet').config(["$provide", function($provide) {
47+
return $provide.decorator('leafletDirective', ["$delegate", function($delegate) {
4848
var directive, ref;
4949
directive = $delegate[0];
5050
directive.scope[directiveName] = '=?';
@@ -56,8 +56,8 @@
5656
};
5757
}
5858
return $delegate;
59-
});
60-
}).directive(directiveName, function(leafletLogger, leafletData, leafletHelpers, leafletIterators, leafletDrawEvents, $timeout, $q) {
59+
}]);
60+
}]).directive(directiveName, function(leafletLogger, leafletData, leafletHelpers, leafletIterators, leafletDrawEvents, $timeout, $q) {
6161
var $log, errorHeader, isDefined;
6262
$log = leafletLogger;
6363
isDefined = leafletHelpers.isDefined;

gulp/index.coffee

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
require './tasks/'
22
gulp = require 'gulp'
3+
series = require 'gulp-sequence2'
34

4-
gulp.task 'default', gulp.series 'build', 'spec'
5+
gulp.task 'default', series('build', 'spec')

gulp/tasks/build.coffee

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ replace = require 'gulp-replace'
1010
insert = require 'gulp-insert'
1111
jf = require 'jsonfile'
1212
wrap = require 'gulp-wrap'
13+
ngAnnotate = require 'gulp-ng-annotate'
1314
require './clean.coffee'
1415

1516
date = new Date()
@@ -37,10 +38,11 @@ build = (source, out = 'index.js') ->
3738
.pipe gulpif(/[.]coffee$/,coffee(require '../coffeeOptions.coffee').on('error', log))
3839
.pipe concat out
3940
.pipe(wrap src: 'src/wrap/dist.js')
40-
.pipe(insert.prepend(header()))
41+
.pipe ngAnnotate()
42+
.pipe insert.prepend(header())
4143
.pipe gulp.dest 'dist'
4244

43-
gulp.task 'build', ->
45+
gulp.task 'build', ['clean'], ->
4446
build [
4547
'src/leafletDrawEvents.coffee'
4648
'src/*.coffee'

gulp/tasks/bump.coffee

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ gulp = require 'gulp'
22
bump = require 'gulp-bump'
33
git = require 'gulp-git'
44
{log} = require 'gulp-util'
5+
series = require 'gulp-sequence2'
56
require './dist.coffee'
67

78
bumpThis = (semverLevel, doCommit = true, dryRun = false, files = ['bower.json', 'package.json']) ->
@@ -49,7 +50,7 @@ bumpDistCommmit = (semverLevel, doCommit, dryRun) ->
4950

5051
tasks.push commit(semverLevel, doCommit, dryRun)
5152

52-
gulp.series tasks...
53+
series tasks...
5354

5455
['', 'minor', 'major'].forEach (name) ->
5556
taskName = if name then '-' + name else ''

gulp/tasks/dist.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
require './spec.coffee'
22
gulp = require 'gulp'
33

4-
gulp.task 'dist', gulp.series 'build'
4+
gulp.task 'dist', ['build']

gulp/tasks/server.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ gulp.task 'server', (done) ->
1313
).listen(8080)
1414
done()
1515

16-
gulp.task 's', gulp.series 'server'
16+
gulp.task 's', ['server']

gulp/tasks/spec.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ karmaRunner = (done, karmaConf = require.resolve('../../karma.conf.coffee')) ->
1919
gulp.task 'karma', (done) ->
2020
karmaRunner(done)
2121

22-
gulp.task 'spec', gulp.parallel 'karma'
22+
gulp.task 'spec', ['karma']
2323

2424
doOpen = (name = '') -> (done)->
2525
open "dist/coverage/lib#{name}/index.html", 'Google Chrome', done

karma.conf.coffee

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11

22
module.exports = (config) ->
33
config.set
4+
5+
# plugins: [
6+
# 'karma-phantomjs-launcher'
7+
# "karma-chai"
8+
# "karma-chrome-launcher"
9+
# "karma-coffee-preprocessor"
10+
# "karma-coverage"
11+
# "karma-mocha"
12+
# "karma-mocha-reporter"
13+
# ]
414
# base path that will be used to resolve all patterns (eg. files, exclude)
515
basePath: './'
616

package.json

Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -11,48 +11,50 @@
1111
"author": "Nicholas McCready",
1212
"license": "MIT",
1313
"dependencies": {
14-
"angular": "1.x",
15-
"leaflet": "0.7.x",
14+
"angular": "1.X",
15+
"leaflet": "0.7.X",
1616
"leaflet-draw": "git://github.com/michaelguild13/Leaflet.draw.git#master",
17-
"open": "0.0.5",
18-
"ui-leaflet": "1.x"
17+
"ui-leaflet": "1.X"
1918
},
2019
"devDependencies": {
21-
"angular-mocks": "^1.2",
22-
"chai": "^3.2.0",
23-
"coffee-script": "^1.9.3",
24-
"del": "^2.0.0",
25-
"globby": "^3.0.1",
26-
"gulp": "git://github.com/gulpjs/gulp.git#bbe3c56138a9ede627879d7e47daffd0a6d9b6db",
27-
"gulp-bump": "^1.0.0",
28-
"gulp-coffee": "^2.3.1",
29-
"gulp-coffeelint": "^0.5.0",
30-
"gulp-concat": "^2.6.0",
31-
"gulp-debug": "^2.1.0",
32-
"gulp-git": "^1.4.0",
33-
"gulp-if": "2.x",
34-
"gulp-insert": "^0.5.0",
35-
"gulp-replace": "^0.5.4",
36-
"gulp-tag-version": "^1.3.0",
37-
"gulp-task-listing": "^1.0.1",
38-
"gulp-uglify": "^1.4.1",
39-
"gulp-util": "^3.0.6",
40-
"gulp-wrap": "^0.11.0",
20+
"angular-mocks": "1.X",
21+
"chai": "3.X",
22+
"coffee-script": "1.9.X",
23+
"del": "2.X",
24+
"globby": "3.X",
25+
"gulp": "3.X",
26+
"gulp-bump": "1.X",
27+
"gulp-coffee": "2.X",
28+
"gulp-coffeelint": "0.5.X",
29+
"gulp-concat": "2.X",
30+
"gulp-debug": "2.X",
31+
"gulp-git": "1.X",
32+
"gulp-if": "2.X",
33+
"gulp-insert": "0.5.X",
34+
"gulp-ng-annotate": "2.X",
35+
"gulp-replace": "0.5.X",
36+
"gulp-sequence2": "0.1.6",
37+
"gulp-tag-version": "1.X",
38+
"gulp-task-listing": "1.X",
39+
"gulp-uglify": "1.X",
40+
"gulp-util": "3.0.X",
41+
"gulp-wrap": "0.11.X",
4142
"http-server": "^0.8.5",
4243
"jsonfile": "^2.2.2",
43-
"karma": "0.13.x",
44-
"karma-chai": "0.x.0",
45-
"karma-chrome-launcher": "0.x",
46-
"karma-coffee-preprocessor": "0.x",
47-
"karma-coverage": "0.x",
48-
"karma-jasmine": "0.x",
44+
"karma": "0.13.X",
45+
"karma-chai": "0.X.0",
46+
"karma-chrome-launcher": "0.X",
47+
"karma-coffee-preprocessor": "0.X",
48+
"karma-coverage": "0.X",
4949
"karma-mocha": "^0.2.0",
50-
"karma-mocha-reporter": "1.x",
51-
"karma-phantomjs-launcher": "0.x",
52-
"mocha": "2.x",
53-
"phantomjs-prebuilt": "2.x",
54-
"pretty-hrtime": "1.x",
55-
"require-directory": "2.x"
50+
"karma-mocha-reporter": "1.X",
51+
"karma-phantomjs-launcher": "0.2.3",
52+
"mocha": "2.X",
53+
"open": "0.0.X",
54+
"phantomjs-polyfill": "0.0.2",
55+
"phantomjs-prebuilt": "2.X",
56+
"pretty-hrtime": "1.X",
57+
"require-directory": "2.X"
5658
},
5759
"scripts": {
5860
"start": "gulp",

0 commit comments

Comments
 (0)