more cleaning up

This commit is contained in:
Stephan Meijer
2016-12-18 01:15:10 +01:00
parent c7c2bd4af3
commit 50e16a39aa
5 changed files with 21 additions and 40 deletions

2
.env
View File

@@ -1,2 +0,0 @@
BING_API_KEY=AtUDjSVEBxo8BwgYUPdfnzHpznaYwDdjjS27jyFDj18nhTUDUjrhc0NwMndZvrXs
GOOGLE_API_KEY=AIzaSyDigZ5WMPoTj_gnkUn3p1waYPDa5oE8WOw

2
.env.sample Normal file
View File

@@ -0,0 +1,2 @@
BING_API_KEY=___YOUR_KEY___
GOOGLE_API_KEY=___YOUR_KEY___

1
.gitignore vendored
View File

@@ -4,3 +4,4 @@ coverage
lib
dist
.idea
.env

View File

@@ -25,19 +25,33 @@ if (production) {
);
}
const entryFiles = [
'babel-polyfill',
path.join(__dirname, 'src/index.js'),
];
if (!production) {
entryFiles.push(path.join(__dirname, 'example/main.js'));
}
export default {
entry: [
'babel-polyfill',
path.join(__dirname, 'src/index.js'),
],
entry: entryFiles,
output: {
path: path.join(__dirname, 'dist'),
filename: `bundle${production ? '.min' : ''}.js`,
library: 'GeoSearch',
libraryTarget: 'umd',
},
devServer: {
// contentBase: './example',
inline: true,
},
module: {
loaders: [
{
test: /\.html|\.css$/,
loader: 'raw-loader',
},
{
test: /\.js$/,
loaders: ['babel-loader'],

View File

@@ -1,34 +0,0 @@
const webpack = require('webpack');
const path = require('path');
module.exports = {
entry: [
'babel-polyfill',
path.resolve(__dirname, 'example/main.js'),
path.resolve(__dirname, 'src/index.js'),
],
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js',
library: 'GeoSearch',
libraryTarget: 'umd',
publicPath: 'dist',
},
devServer: {
// contentBase: './example',
inline: true,
},
module: {
loaders: [
{
test: /\.html|\.css$/,
loader: 'raw-loader',
},
{
test: /\.js$/,
loaders: ['babel-loader'],
exclude: /node_modules/,
},
],
},
};