mirror of
https://github.com/daniel-j/fimfic2epub.git
synced 2024-05-19 03:42:54 +12:00
remove babel on build. browsers support ES6 natively
This commit is contained in:
parent
bbba141ef6
commit
99c62e8b9f
|
@ -1,4 +1,3 @@
|
|||
'use strict'
|
||||
|
||||
// gulp and utilities
|
||||
import gulp from 'gulp'
|
||||
|
@ -34,6 +33,7 @@ if (inProduction) {
|
|||
debug: false
|
||||
}))
|
||||
webpackConfig.plugins.push(new webpack.optimize.DedupePlugin())
|
||||
/*
|
||||
webpackConfig.plugins.push(new webpack.optimize.UglifyJsPlugin({
|
||||
compress: {
|
||||
warnings: false,
|
||||
|
@ -46,6 +46,7 @@ if (inProduction) {
|
|||
screw_ie8: true,
|
||||
sourceMap: false
|
||||
}))
|
||||
*/
|
||||
}
|
||||
|
||||
let wpCompiler = webpack(Object.assign({}, webpackConfig, {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"description": "",
|
||||
"author": "djazz",
|
||||
"scripts": {
|
||||
"pack": "gulp pack -p"
|
||||
"build": "gulp -p"
|
||||
},
|
||||
"dependencies": {
|
||||
"escape-string-regexp": "^1.0.5",
|
||||
|
@ -20,9 +20,6 @@
|
|||
"devDependencies": {
|
||||
"babel-core": "^6.9.1",
|
||||
"babel-loader": "^6.2.4",
|
||||
"babel-preset-es2015": "^6.9.0",
|
||||
"babel-preset-es2015-loose": "^7.0.0",
|
||||
"babel-preset-es2015-loose-native-modules": "^1.0.0",
|
||||
"babel-preset-node6": "^11.0.0",
|
||||
"del": "^2.2.0",
|
||||
"exports-loader": "^0.6.3",
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
{"presets": ["es2015-loose-native-modules"]}
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
export const NS = {
|
||||
export let NS = {
|
||||
OPF: 'http://www.idpf.org/2007/opf',
|
||||
OPS: 'http://www.idpf.org/2007/ops',
|
||||
DC: 'http://purl.org/dc/elements/1.1/',
|
||||
|
@ -9,7 +9,7 @@ export const NS = {
|
|||
XLINK: 'http://www.w3.org/1999/xlink'
|
||||
}
|
||||
|
||||
export const tidyOptions = {
|
||||
export let tidyOptions = {
|
||||
'indent': 'auto',
|
||||
'numeric-entities': 'yes',
|
||||
'output-xhtml': 'yes',
|
||||
|
@ -21,13 +21,13 @@ export const tidyOptions = {
|
|||
'tidy-mark': 'no'
|
||||
}
|
||||
|
||||
export const mimeMap = {
|
||||
export let mimeMap = {
|
||||
'image/jpeg': 'Images/*.jpg',
|
||||
'image/png': 'Images/*.png',
|
||||
'image/gif': 'Images/*.gif'
|
||||
}
|
||||
|
||||
export const containerXml = `<?xml version="1.0" encoding="UTF-8"?>
|
||||
export let containerXml = `<?xml version="1.0" encoding="UTF-8"?>
|
||||
<container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
|
||||
<rootfiles>
|
||||
<rootfile full-path="content.opf" media-type="application/oebps-package+xml"/>
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
'use strict'
|
||||
|
||||
import path from 'path'
|
||||
|
||||
let inProduction = process.env.NODE_ENV === 'production' || process.argv.indexOf('-p') !== -1
|
||||
// let inProduction = process.env.NODE_ENV === 'production' || process.argv.indexOf('-p') !== -1
|
||||
|
||||
export default {
|
||||
entry: {
|
||||
|
@ -15,11 +14,13 @@ export default {
|
|||
},
|
||||
module: {
|
||||
loaders: [
|
||||
/*
|
||||
{
|
||||
test: /\.js$/, loader: 'babel', exclude: /node_modules/, query: {
|
||||
sourceMaps: inProduction
|
||||
}
|
||||
},
|
||||
*/
|
||||
{
|
||||
test: /\.styl$/,
|
||||
loader: 'raw-loader!stylus-loader'
|
||||
|
|
Loading…
Reference in a new issue