aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/.eslintrc5
-rw-r--r--config/webpack.js41
2 files changed, 46 insertions, 0 deletions
diff --git a/config/.eslintrc b/config/.eslintrc
new file mode 100644
index 0000000..74e0826
--- /dev/null
+++ b/config/.eslintrc
@@ -0,0 +1,5 @@
+{
+ "parserOptions": {
+ "sourceType": "script"
+ }
+}
diff --git a/config/webpack.js b/config/webpack.js
new file mode 100644
index 0000000..98faf6d
--- /dev/null
+++ b/config/webpack.js
@@ -0,0 +1,41 @@
+'use strict';
+
+const Path = require('path');
+
+module.exports = {
+ entry: './lib/sorting_hat',
+
+ output: {
+ path: Path.resolve(__dirname, '../assets'),
+ filename: 'bundle.js',
+ publicPath: '/assets/',
+ library: 'SortingHat',
+ libraryTarget: 'umd'
+ },
+
+ module: {
+ loaders: [
+ {
+ test: /\.js$/,
+ exclude: /doc/,
+ loader: 'babel-loader',
+ query: {
+ presets: ['es2017']
+ }
+ }
+ ]
+ },
+
+ resolve: {
+ modules: [
+ 'node_modules',
+ 'lib'
+ ],
+
+ alias: {
+ 'vue$': 'vue/dist/vue.esm.js'
+ }
+ },
+
+ context: Path.resolve(__dirname, '..')
+};