From 64f81bc31699ed239e4becec1cfa7ebc0bef2b5a Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 31 Mar 2017 20:21:41 +0200 Subject: Adds Webpack support and removes the use for Grunt Signed-off-by: Thomas Citharel use scss Signed-off-by: Thomas Citharel fix build, add babel, fix annotations fixes (and improvements !) for baggy add live reload & environments & eslint & theme fixes --- app/config/webpack/common.js | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 app/config/webpack/common.js (limited to 'app/config/webpack/common.js') 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 @@ +const path = require('path'); +const webpack = require('webpack'); +const StyleLintPlugin = require('stylelint-webpack-plugin'); + +const rootDir = path.resolve(__dirname, '../../../'); + +module.exports = function() { + return { + entry: { + material: path.join(rootDir, './app/Resources/static/themes/material/index.js'), + baggy: path.join(rootDir, './app/Resources/static/themes/baggy/index.js'), + }, + + output: { + filename: '[name].js', + path: path.resolve(rootDir, 'web/bundles/wallabagcore'), + publicPath: '/bundles/wallabagcore/', + }, + plugins: [ + new webpack.ProvidePlugin({ + $: 'jquery', + jQuery: 'jquery', + 'window.$': 'jquery', + 'window.jQuery': 'jquery' + }), + new StyleLintPlugin({ + configFile: '.stylelintrc', + failOnError: false, + quiet: false, + context: 'app/Resources/static/themes', + files: '**/*.scss', + }), + ], + resolve: { + alias: { + jquery: path.join(rootDir, 'node_modules/jquery/dist/jquery.js') + } + }, + }; +}; -- cgit v1.2.3 From 789c46821db9fbab5bbea99846fa0021d779a592 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Tue, 20 Jun 2017 07:14:04 +0200 Subject: Fix linter issue on webpack config files --- app/config/webpack/common.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'app/config/webpack/common.js') diff --git a/app/config/webpack/common.js b/app/config/webpack/common.js index 4f5739f0..1ef193c7 100644 --- a/app/config/webpack/common.js +++ b/app/config/webpack/common.js @@ -4,13 +4,12 @@ const StyleLintPlugin = require('stylelint-webpack-plugin'); const rootDir = path.resolve(__dirname, '../../../'); -module.exports = function() { +module.exports = function () { return { entry: { material: path.join(rootDir, './app/Resources/static/themes/material/index.js'), baggy: path.join(rootDir, './app/Resources/static/themes/baggy/index.js'), }, - output: { filename: '[name].js', path: path.resolve(rootDir, 'web/bundles/wallabagcore'), @@ -21,7 +20,7 @@ module.exports = function() { $: 'jquery', jQuery: 'jquery', 'window.$': 'jquery', - 'window.jQuery': 'jquery' + 'window.jQuery': 'jquery', }), new StyleLintPlugin({ configFile: '.stylelintrc', @@ -33,8 +32,8 @@ module.exports = function() { ], resolve: { alias: { - jquery: path.join(rootDir, 'node_modules/jquery/dist/jquery.js') - } + jquery: path.join(rootDir, 'node_modules/jquery/dist/jquery.js'), + }, }, }; }; -- cgit v1.2.3 From 77255d668828d7ae4cceb186b5215a0d4ddd69f6 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 22 Jun 2017 12:15:24 +0200 Subject: Add css on share public page --- app/config/webpack/common.js | 1 + 1 file changed, 1 insertion(+) (limited to 'app/config/webpack/common.js') diff --git a/app/config/webpack/common.js b/app/config/webpack/common.js index 1ef193c7..c497689a 100644 --- a/app/config/webpack/common.js +++ b/app/config/webpack/common.js @@ -9,6 +9,7 @@ module.exports = function () { entry: { material: path.join(rootDir, './app/Resources/static/themes/material/index.js'), baggy: path.join(rootDir, './app/Resources/static/themes/baggy/index.js'), + public: path.join(rootDir, './app/Resources/static/themes/_global/share.js'), }, output: { filename: '[name].js', -- cgit v1.2.3