Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Zemledelec
committed
Mar 13, 2018
1 parent
f4b7fe7
commit a3bd349
Showing
11 changed files
with
5,027 additions
and
457 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
'use strict'; | ||
|
||
import { Globe } from './Globe.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,64 @@ | ||
'use strict'; | ||
|
||
const webpack = require('webpack'); | ||
const path = require('path'); | ||
|
||
const NODE_ENV = process.env.NODE_ENV.trim().toLowerCase() || 'development'; | ||
|
||
const libraryName = 'og'; | ||
|
||
module.exports = { | ||
entry: "./src/og/og.js", | ||
|
||
output: { | ||
filename: './dist/og.js', | ||
library: 'og' | ||
}, | ||
|
||
watch: NODE_ENV == "development", | ||
|
||
watchOptions:{ | ||
aggregateTimeout: 100 | ||
}, | ||
|
||
devtool: NODE_ENV === "development" ? "source-map": "", | ||
|
||
plugins:[ | ||
new webpack.NoEmitOnErrorsPlugin(), | ||
new webpack.DefinePlugin({ | ||
'NODE_ENV': JSON.stringify(NODE_ENV) | ||
}) | ||
] | ||
}; | ||
|
||
if(NODE_ENV == "production"){ | ||
|
||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin') | ||
|
||
module.exports.plugins.push( | ||
new UglifyJsPlugin() | ||
); | ||
} | ||
if (NODE_ENV == "development") { | ||
|
||
let outputFile = libraryName + '.js'; | ||
|
||
module.exports = { | ||
entry: __dirname + "/src/og/index.js", | ||
output: { | ||
path: __dirname + '/dist', | ||
filename: outputFile, | ||
library: libraryName | ||
}, | ||
watch: true, | ||
watchOptions: { | ||
aggregateTimeout: 100 | ||
}, | ||
devtool: "source-map", | ||
plugins: [ | ||
new webpack.NoEmitOnErrorsPlugin(), | ||
new webpack.DefinePlugin({ | ||
'NODE_ENV': JSON.stringify(NODE_ENV) | ||
}) | ||
], | ||
resolve: { | ||
extensions: ['.js'] | ||
} | ||
}; | ||
|
||
} else if (NODE_ENV == "production") { | ||
|
||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); | ||
|
||
let outputFile = libraryName + '.min.js'; | ||
|
||
module.exports = { | ||
entry: __dirname + "/src/og/index.js", | ||
output: { | ||
path: __dirname + '/dist', | ||
filename: outputFile, | ||
library: libraryName, | ||
libraryTarget: 'umd', | ||
umdNamedDefine: true | ||
}, | ||
|
||
plugins: [ | ||
new webpack.DefinePlugin({ | ||
'NODE_ENV': JSON.stringify(NODE_ENV) | ||
}), | ||
new UglifyJsPlugin() | ||
], | ||
|
||
resolve: { | ||
extensions: ['.js'] | ||
} | ||
}; | ||
} |