Skip to content

Commit 33f113f

Browse files
committedJul 19, 2014
A bit better prefix output with markers for the beginning and the end of the output.
1 parent bee5678 commit 33f113f

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed
 

‎concat.js

+13-4
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,19 @@ function main() {
253253
var fs = require('fs');
254254

255255
// Output a useless loader that should be optimized out.
256+
// If you need scripts to manipulate this part, use the START and END
257+
// tokens.
256258
console.log(
257-
"/** AngularJS Loader Script */"
258-
+ "window.angular = window.angular || {};\n"
259-
+ "window.angular.loader = function() { return {then: function(fn) { window.setTimeout(fn, 0)}}};\n"
260-
+ "window.angular.loader.config = function() {};\n"
259+
"/** AngularJS Loader Script */\n"
260+
+ "/*@START@@@@@@@@@@@@@@@@@@@@*/\n"
261+
+ "/** @extern */"
262+
+ "window['angular'] = window['angular'] || {};\n"
263+
+ "/** @extern */"
264+
+ "window['angular'].loader = function() {"
265+
+ "return {then: function(fn) { window.setTimeout(fn, 0)}}"
266+
+ "};\n"
267+
+ "/** @extern */"
268+
+ "window['angular'].loader.config = function() {};\n"
261269
+ "function __angularjs_insertScript(path) {\n"
262270
+ " var newScriptTag = document.createElement('script');\n"
263271
+ " newScriptTag.type = 'text/javascript';\n"
@@ -271,6 +279,7 @@ function main() {
271279
+ " });\n"
272280
+ " document.head.appendChild(newScriptTag);\n"
273281
+ "};\n"
282+
+ "/*@END@@@@@@@@@@@@@@@@@@@@@@*/\n"
274283
+ "\n"
275284
);
276285

0 commit comments

Comments
 (0)