|
@@ -1,6 +1,7 @@
|
|
|
const fs = require('fs')
|
|
|
const path = require('path')
|
|
|
const { PassThrough } = require('stream')
|
|
|
+const replace = require('replacestream')
|
|
|
const browserify = require('browserify')
|
|
|
const babelify = require('babelify')
|
|
|
const minify = require('minify-stream')
|
|
@@ -30,6 +31,7 @@ bundler.transform(minifyify, { global: true })
|
|
|
bundler.bundle()
|
|
|
.pipe(disc())
|
|
|
.pipe(prepend('---\nlayout: false\n---\n'))
|
|
|
+ .pipe(replace('http://', 'https://', { limit: 1 }))
|
|
|
.pipe(fs.createWriteStream(outputPath))
|
|
|
.on('error', (err) => {
|
|
|
throw err
|