Skip to content

Commit 88a3d5e

Browse files
committed
Switched order of concat and browserify so banner is at the top
1 parent 267187f commit 88a3d5e

4 files changed

Lines changed: 16 additions & 38 deletions

File tree

Gruntfile.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -80,18 +80,6 @@ module.exports = function(grunt) {
8080

8181
aws: grunt.file.readJSON('aws.json'),
8282

83-
concat: {
84-
dist: {
85-
options: {
86-
'report': 'gzip',
87-
'banner': '<%= banner %>'
88-
},
89-
src: ['src/js/init.js'],
90-
91-
dest: 'dist/snowplow.js'
92-
}
93-
},
94-
9583
browserify: {
9684
dist: {
9785
options: {
@@ -108,11 +96,23 @@ module.exports = function(grunt) {
10896
]
10997
},
11098
files: {
111-
'dist/bundle.js': ['dist/snowplow.js']
99+
'dist/bundle.js': ['src/js/init.js']
112100
}
113101
}
114102
},
115103

104+
concat: {
105+
dist: {
106+
options: {
107+
'report': 'gzip',
108+
'banner': '<%= banner %>'
109+
},
110+
src: ['dist/bundle.js'],
111+
112+
dest: 'dist/snowplow.js'
113+
}
114+
},
115+
116116
min: {
117117
dist: {
118118
options: {
@@ -185,7 +185,7 @@ module.exports = function(grunt) {
185185
grunt.loadNpmTasks('grunt-invalidate-cloudfront');
186186
grunt.loadNpmTasks('grunt-browserify');
187187

188-
grunt.registerTask('default', ['concat', 'browserify', 'min']);
188+
grunt.registerTask('default', ['browserify', 'concat', 'min']);
189189
grunt.registerTask('publish', ['concat', 'min', 's3:not_pinned', 'invalidate_cloudfront:not_pinned']);
190190
grunt.registerTask('publish-pinned', ['concat', 'min', 's3', 'invalidate_cloudfront']);
191191

examples/web/async.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
(function() {
4949
var sp = document.createElement('script'); sp.type = 'text/javascript'; sp.async = true; sp.defer = true;
5050
//sp.src = ('https:' == document.location.protocol ? 'https' : 'http') + '://d1fc8wv8zag5ca.cloudfront.net/0.13.0/sp.js';
51-
sp.src = '../../dist/bundle.js'; // For testing
51+
sp.src = '../../dist/sp.js'; // For testing
5252
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(sp, s);
5353
})();
5454
</script>

examples/web/sync.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<!-- Snowplow starts plowing -->
2121
<script type="text/javascript">
2222
//var spSrc = ('https:' == document.location.protocol ? 'https' : 'http') + '://d1fc8wv8zag5ca.cloudfront.net/0.13.0/sp.js';
23-
var spSrc = '../../dist/bundle.js'; // For testing
23+
var spSrc = '../../dist/snowplow.js'; // For testing
2424
document.write(unescape("%3Cscript src='" + spSrc + "' type='text/javascript'%3E%3C/script%3E"));
2525
</script>
2626
<script type="text/javascript">

src/js/banner.js

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)