2015-08-15 01:28:21 +00:00
|
|
|
/**
|
|
|
|
* dat-gui JavaScript Controller Library
|
|
|
|
* http://code.google.com/p/dat-gui
|
|
|
|
*
|
|
|
|
* Copyright 2011 Data Arts Team, Google Creative Lab
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*/
|
|
|
|
|
2015-08-14 16:30:03 +00:00
|
|
|
var path = require("path");
|
|
|
|
|
|
|
|
module.exports = {
|
2015-08-14 20:29:30 +00:00
|
|
|
target: 'web',
|
2015-08-14 16:30:03 +00:00
|
|
|
|
2015-08-14 20:29:30 +00:00
|
|
|
context: path.resolve(__dirname, '..', 'src'),
|
2015-08-14 16:30:03 +00:00
|
|
|
|
2015-08-14 20:29:30 +00:00
|
|
|
entry: {
|
2016-09-01 19:50:55 +00:00
|
|
|
main: '../index',
|
|
|
|
|
2015-08-14 20:29:30 +00:00
|
|
|
},
|
2015-08-14 16:30:03 +00:00
|
|
|
|
2015-08-14 20:29:30 +00:00
|
|
|
module: {
|
2016-09-22 22:51:47 +00:00
|
|
|
preLoaders: [
|
2015-08-14 20:29:30 +00:00
|
|
|
{
|
2016-09-22 22:51:47 +00:00
|
|
|
test: /\.js$/,
|
2015-08-14 20:29:30 +00:00
|
|
|
exclude: /(node_modules|bower_components)/,
|
2016-09-22 22:51:47 +00:00
|
|
|
loader: 'eslint-loader'
|
2015-08-14 20:29:30 +00:00
|
|
|
},
|
2016-09-22 22:51:47 +00:00
|
|
|
],
|
|
|
|
loaders: [
|
2015-08-14 20:29:30 +00:00
|
|
|
{
|
2015-08-14 22:35:31 +00:00
|
|
|
test: /\.js$/,
|
2016-09-22 22:51:47 +00:00
|
|
|
loader: 'babel',
|
|
|
|
exclude: /(node_modules|bower_components)/,
|
|
|
|
query: {
|
2017-04-07 22:11:20 +00:00
|
|
|
presets: [["es2015", {"loose": true}], "stage-0"],
|
|
|
|
plugins: ["add-module-exports"]
|
2016-09-22 22:51:47 +00:00
|
|
|
}
|
2015-08-14 20:29:30 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.css$/,
|
|
|
|
loader: 'style-loader!css-loader'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.png$/,
|
|
|
|
loader: 'url-loader?limit=100000'
|
|
|
|
},
|
|
|
|
{
|
2015-08-14 22:35:31 +00:00
|
|
|
test: /\.jpg$/,
|
|
|
|
loader: 'file-loader'
|
2015-08-14 20:29:30 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.scss$/,
|
2016-09-01 19:50:55 +00:00
|
|
|
loader: 'css-loader!sass-loader'
|
2016-09-01 20:35:40 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.html$/,
|
|
|
|
loader: 'html-loader'
|
2015-08-14 20:29:30 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2015-08-14 16:30:03 +00:00
|
|
|
|
2015-08-14 20:29:30 +00:00
|
|
|
output: {
|
|
|
|
path: path.join(__dirname, '..', 'build'),
|
|
|
|
filename: 'dat.gui.js',
|
|
|
|
library: ['dat'],
|
|
|
|
libraryTarget: 'umd'
|
|
|
|
}
|
2015-08-14 16:30:03 +00:00
|
|
|
};
|