mirror of
https://github.com/daniel-j/fimfic2epub.git
synced 2024-05-21 04:42:47 +12:00
add removeNPMAbsolutePaths, bump version
This commit is contained in:
parent
00d24f0b71
commit
f7fb3189d1
|
@ -14,6 +14,7 @@ import chmod from 'gulp-chmod'
|
|||
|
||||
import jsonedit from 'gulp-json-editor'
|
||||
import zip from 'gulp-zip'
|
||||
import removeNPMAbsolutePaths from 'removeNPMAbsolutePaths'
|
||||
|
||||
// import { execFile, exec } from 'child_process'
|
||||
|
||||
|
@ -24,7 +25,7 @@ import webpackConfig from './webpack.config.babel.js'
|
|||
|
||||
const sequence = Sequence.use(gulp)
|
||||
|
||||
// const inProduction = process.env.NODE_ENV === 'production' || process.argv.indexOf('-p') !== -1
|
||||
const inProduction = process.env.NODE_ENV === 'production' || process.argv.indexOf('-p') !== -1
|
||||
|
||||
const isStandalone = process.argv.includes('--standalone')
|
||||
|
||||
|
@ -60,26 +61,33 @@ function webpackTask (callback) {
|
|||
wpCompiler = webpack(webpackConfig)
|
||||
}
|
||||
|
||||
// run webpack compiler
|
||||
wpCompiler.run(function (err, stats) {
|
||||
if (err) throw new gutil.PluginError('webpack', err)
|
||||
gutil.log('[webpack]', stats.toString({
|
||||
colors: true,
|
||||
hash: false,
|
||||
version: false,
|
||||
chunks: false,
|
||||
timings: false,
|
||||
modules: false,
|
||||
chunkModules: false,
|
||||
cached: false,
|
||||
maxModules: 0
|
||||
}))
|
||||
if (!isStandalone) {
|
||||
sequence('pack', callback)
|
||||
} else {
|
||||
sequence('binaries', callback)
|
||||
}
|
||||
})
|
||||
let p = Promise.resolve()
|
||||
if (inProduction) {
|
||||
p = removeNPMAbsolutePaths('node_modules')
|
||||
}
|
||||
|
||||
p.then((results) => {
|
||||
// run webpack compiler
|
||||
wpCompiler.run(function (err, stats) {
|
||||
if (err) throw new gutil.PluginError('webpack', err)
|
||||
gutil.log('[webpack]', stats.toString({
|
||||
colors: true,
|
||||
hash: false,
|
||||
version: false,
|
||||
chunks: false,
|
||||
timings: false,
|
||||
modules: false,
|
||||
chunkModules: false,
|
||||
cached: false,
|
||||
maxModules: 0
|
||||
}))
|
||||
if (!isStandalone) {
|
||||
sequence('pack', callback)
|
||||
} else {
|
||||
sequence('binaries', callback)
|
||||
}
|
||||
})
|
||||
}).catch((err) => { throw err })
|
||||
}
|
||||
|
||||
function convertFontAwesomeVars (contents) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "fimfic2epub",
|
||||
"version": "1.7.19",
|
||||
"version": "1.7.20",
|
||||
"description": "Tool to generate improved EPUB ebooks from Fimfiction stories",
|
||||
"author": "djazz",
|
||||
"license": "MIT",
|
||||
|
@ -68,6 +68,7 @@
|
|||
"lazypipe": "^1.0.1",
|
||||
"raw-loader": "^0.5.1",
|
||||
"regenerator-runtime": "^0.11.1",
|
||||
"removeNPMAbsolutePaths": "^1.0.4",
|
||||
"run-sequence": "^2.2.0",
|
||||
"standard": "^11.0.0",
|
||||
"stylus": "^0.54.5",
|
||||
|
|
Loading…
Reference in a new issue