Skip to content

Commit c49f221

Browse files
committed
Merge branch 'newdev'
Conflicts: dist/angular-leaflet-directive.min.js src/angular-leaflet-directive.js
2 parents 53ae8c5 + 37c4a63 commit c49f221

Some content is hidden

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

59 files changed

+35280
-18841
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
branches:
2+
only:
3+
- master
4+
- gh-pages
5+
language: javascript

Gruntfile.js

Lines changed: 51 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = function(grunt) {
88
},
99
dist: {
1010
files: {
11-
'dist/<%= pkg.name %>.min.js': ['dist/angular-leaflet-directive.ngmin.js']
11+
'dist/<%= pkg.name %>.min.no-header.js': ['dist/angular-leaflet-directive.ngmin.js']
1212
}
1313
}
1414
},
@@ -31,12 +31,13 @@ module.exports = function(grunt) {
3131
browser: true,
3232
globals: {
3333
angular: true,
34+
console: true,
3435
module: true,
3536
L: true,
3637
}
3738
},
3839
source: {
39-
src: ['src/angular-leaflet-directive.js']
40+
src: ['dist/angular-leaflet-directive.js']
4041
},
4142
tests: {
4243
src: ['test/unit/*.js', 'test/e2e/*.js'],
@@ -75,7 +76,7 @@ module.exports = function(grunt) {
7576
ngmin: {
7677
directives: {
7778
expand: true,
78-
cwd: 'src',
79+
cwd: 'dist',
7980
src: ['angular-leaflet-directive.js'],
8081
dest: 'dist',
8182
ext: '.ngmin.js',
@@ -84,20 +85,64 @@ module.exports = function(grunt) {
8485
},
8586
watch: {
8687
source: {
87-
files: ['src/angular-leaflet-directive.js', 'test/unit/*.js', 'test/e2e/*.js'],
88-
tasks: [ 'karma:background:run', 'jshint', 'ngmin', 'uglify' ]
88+
files: [
89+
'src/**/*.js',
90+
'test/unit/*.js',
91+
'test/e2e/*.js'
92+
],
93+
tasks: [
94+
'karma:background:run',
95+
'concat:dist',
96+
'jshint',
97+
'ngmin',
98+
'uglify',
99+
'concat:license'
100+
]
89101
},
90102
grunt: {
91103
files: ['Gruntfile.js'],
92104
tasks: ['jshint:grunt']
93105
}
94-
}
106+
},
107+
concat: {
108+
dist: {
109+
options: {
110+
banner: '(function() {\n\n"use strict";\n\n',
111+
footer: '\n}());'
112+
},
113+
src: [
114+
'src/modules/Scope.SafeApply.js',
115+
'src/main.js',
116+
'src/directives/leaflet.js',
117+
'src/directives/center.js',
118+
'src/directives/tiles.js',
119+
'src/directives/legend.js',
120+
'src/directives/geojson.js',
121+
'src/directives/layers.js',
122+
'src/directives/bounds.js',
123+
'src/directives/markers.js',
124+
'src/directives/paths.js',
125+
'src/directives/eventBroadcast.js',
126+
'src/directives/maxBounds.js',
127+
'src/services/leafletData.js'
128+
],
129+
dest: 'dist/angular-leaflet-directive.js',
130+
},
131+
license: {
132+
src: [
133+
'src/header-MIT-license.txt',
134+
'dist/angular-leaflet-directive.min.no-header.js'
135+
],
136+
dest: 'dist/angular-leaflet-directive.min.js',
137+
}
138+
},
95139
});
96140

97141
grunt.loadNpmTasks('grunt-contrib-jshint');
98142
grunt.loadNpmTasks('grunt-contrib-uglify');
99143
grunt.loadNpmTasks('grunt-contrib-connect');
100144
grunt.loadNpmTasks('grunt-contrib-watch');
145+
grunt.loadNpmTasks('grunt-contrib-concat');
101146
grunt.loadNpmTasks('grunt-karma');
102147
grunt.loadNpmTasks('grunt-ngmin');
103148

config/karma.conf.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@ module.exports = function(karma) {
99
'test/lib/angular/angular.js',
1010
'test/lib/angular/angular-mocks.js',
1111
'test/lib/markercluster/leaflet.markercluster.js',
12-
'src/angular-leaflet-directive.js',
13-
'test/unit/**/*.js'
12+
'dist/angular-leaflet-directive.js',
13+
'test/unit/leafletDirectiveSpec.js',
14+
'test/unit/tilesDirectiveSpec.js',
15+
'test/unit/centerDirectiveSpec.js',
16+
'test/unit/pathsDirectiveSpec.js',
17+
'test/unit/layersDirectiveSpec.js',
18+
'test/unit/markersDirectiveSpec.js',
19+
'test/unit/eventsDirectiveSpec.js'
1420
],
1521

1622
// Frameworks
@@ -28,9 +34,9 @@ module.exports = function(karma) {
2834
// - Safari
2935
// - PhantomJS
3036
browsers: [
31-
'Firefox'
37+
//'Firefox'
3238
//'Chrome'
33-
//'PhantomJS'
39+
'PhantomJS'
3440
],
3541

3642
// test results reporter to use

0 commit comments

Comments
 (0)