roll-right 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/breakup.js +0 -1
- package/lib/phase1.js +8 -2
- package/package.json +1 -1
package/bin/breakup.js
CHANGED
package/lib/phase1.js
CHANGED
|
@@ -398,18 +398,24 @@ class Phase1 {
|
|
|
398
398
|
//
|
|
399
399
|
for ( let nextL of leaders ) {
|
|
400
400
|
let [key,found_sub] = find_map(nextL,key_map_all)
|
|
401
|
-
console.log(key)
|
|
402
401
|
if ( typeof found_sub === "object" ) {
|
|
403
402
|
console.dir(found_sub)
|
|
404
403
|
}
|
|
405
404
|
let matcher = `${key}<<`
|
|
406
405
|
if ( found_sub !== undefined ) {
|
|
407
406
|
let sub_file = nextL.replace(matcher,found_sub)
|
|
407
|
+
if ( key.indexOf('.js') > 0 ) {
|
|
408
|
+
sub_file = '\n// ---->>>\n' + sub_file
|
|
409
|
+
let si = sub_file.lastIndexOf('</script>')
|
|
410
|
+
if ( si > 0 ) {
|
|
411
|
+
sub_file = sub_file.substring(0,si) + '\n// ---->>>\n</script>\n'
|
|
412
|
+
}
|
|
413
|
+
}
|
|
408
414
|
results.push(sub_file)
|
|
409
415
|
}
|
|
410
416
|
}
|
|
411
417
|
//
|
|
412
|
-
let sdata = results.join('\n
|
|
418
|
+
let sdata = results.join('\n\n')
|
|
413
419
|
|
|
414
420
|
let output_file = conf.out_dir + '/' + this._target + '/' + current_file_key
|
|
415
421
|
console.log("WRITING OUTPUT: ",output_file)
|