aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/config/webpack/common.js
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2017-03-31 20:21:41 +0200
committerThomas Citharel <tcit@tcit.fr>2017-05-04 14:49:44 +0200
commit64f81bc31699ed239e4becec1cfa7ebc0bef2b5a (patch)
tree6363a596055683587d11aaffcf30608a682988aa /app/config/webpack/common.js
parent3b4502e0e663866e7bac00164fd935fdc92309d6 (diff)
downloadwallabag-64f81bc31699ed239e4becec1cfa7ebc0bef2b5a.tar.gz
wallabag-64f81bc31699ed239e4becec1cfa7ebc0bef2b5a.tar.zst
wallabag-64f81bc31699ed239e4becec1cfa7ebc0bef2b5a.zip
Adds Webpack support and removes the use for Grunt
Signed-off-by: Thomas Citharel <tcit@tcit.fr> use scss Signed-off-by: Thomas Citharel <tcit@tcit.fr> fix build, add babel, fix annotations fixes (and improvements !) for baggy add live reload & environments & eslint & theme fixes
Diffstat (limited to 'app/config/webpack/common.js')
-rw-r--r--app/config/webpack/common.js40
1 files changed, 40 insertions, 0 deletions
diff --git a/app/config/webpack/common.js b/app/config/webpack/common.js
new file mode 100644
index 00000000..4f5739f0
--- /dev/null
+++ b/app/config/webpack/common.js
@@ -0,0 +1,40 @@
1const path = require('path');
2const webpack = require('webpack');
3const StyleLintPlugin = require('stylelint-webpack-plugin');
4
5const rootDir = path.resolve(__dirname, '../../../');
6
7module.exports = function() {
8 return {
9 entry: {
10 material: path.join(rootDir, './app/Resources/static/themes/material/index.js'),
11 baggy: path.join(rootDir, './app/Resources/static/themes/baggy/index.js'),
12 },
13
14 output: {
15 filename: '[name].js',
16 path: path.resolve(rootDir, 'web/bundles/wallabagcore'),
17 publicPath: '/bundles/wallabagcore/',
18 },
19 plugins: [
20 new webpack.ProvidePlugin({
21 $: 'jquery',
22 jQuery: 'jquery',
23 'window.$': 'jquery',
24 'window.jQuery': 'jquery'
25 }),
26 new StyleLintPlugin({
27 configFile: '.stylelintrc',
28 failOnError: false,
29 quiet: false,
30 context: 'app/Resources/static/themes',
31 files: '**/*.scss',
32 }),
33 ],
34 resolve: {
35 alias: {
36 jquery: path.join(rootDir, 'node_modules/jquery/dist/jquery.js')
37 }
38 },
39 };
40};