diff options
Diffstat (limited to 'app/config')
-rw-r--r-- | app/config/config.yml | 7 | ||||
-rw-r--r-- | app/config/config_prod.yml | 6 | ||||
-rw-r--r-- | app/config/webpack/common.js | 40 | ||||
-rw-r--r-- | app/config/webpack/dev.js | 62 | ||||
-rw-r--r-- | app/config/webpack/prod.js | 99 |
5 files changed, 210 insertions, 4 deletions
diff --git a/app/config/config.yml b/app/config/config.yml index d7231112..116bb04c 100644 --- a/app/config/config.yml +++ b/app/config/config.yml | |||
@@ -3,6 +3,10 @@ imports: | |||
3 | - { resource: security.yml } | 3 | - { resource: security.yml } |
4 | - { resource: services.yml } | 4 | - { resource: services.yml } |
5 | 5 | ||
6 | parameters: | ||
7 | # Allows to use the live reload feature for changes in assets | ||
8 | use_webpack_dev_server: false | ||
9 | |||
6 | framework: | 10 | framework: |
7 | #esi: ~ | 11 | #esi: ~ |
8 | translator: | 12 | translator: |
@@ -52,9 +56,10 @@ wallabag_core: | |||
52 | reading_speed: 1 | 56 | reading_speed: 1 |
53 | cache_lifetime: 10 | 57 | cache_lifetime: 10 |
54 | action_mark_as_read: 1 | 58 | action_mark_as_read: 1 |
55 | list_mode: 1 | 59 | list_mode: 0 |
56 | fetching_error_message: | | 60 | fetching_error_message: | |
57 | wallabag can't retrieve contents for this article. Please <a href="http://doc.wallabag.org/en/master/user/errors_during_fetching.html#how-can-i-help-to-fix-that">troubleshoot this issue</a>. | 61 | wallabag can't retrieve contents for this article. Please <a href="http://doc.wallabag.org/en/master/user/errors_during_fetching.html#how-can-i-help-to-fix-that">troubleshoot this issue</a>. |
62 | api_limit_mass_actions: 10 | ||
58 | 63 | ||
59 | wallabag_user: | 64 | wallabag_user: |
60 | registration_enabled: "%fosuser_registration%" | 65 | registration_enabled: "%fosuser_registration%" |
diff --git a/app/config/config_prod.yml b/app/config/config_prod.yml index 5a4dd69e..65b02d66 100644 --- a/app/config/config_prod.yml +++ b/app/config/config_prod.yml | |||
@@ -1,9 +1,9 @@ | |||
1 | imports: | 1 | imports: |
2 | - { resource: config.yml } | 2 | - { resource: config.yml } |
3 | 3 | ||
4 | #framework: | 4 | framework: |
5 | # cache: | 5 | assets: |
6 | # system: cache.adapter.apcu | 6 | # json_manifest_path: '%kernel.root_dir%/../web/bundles/wallabagcore/manifest.json' |
7 | 7 | ||
8 | #doctrine: | 8 | #doctrine: |
9 | # orm: | 9 | # orm: |
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 @@ | |||
1 | const path = require('path'); | ||
2 | const webpack = require('webpack'); | ||
3 | const StyleLintPlugin = require('stylelint-webpack-plugin'); | ||
4 | |||
5 | const rootDir = path.resolve(__dirname, '../../../'); | ||
6 | |||
7 | module.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 | }; | ||
diff --git a/app/config/webpack/dev.js b/app/config/webpack/dev.js new file mode 100644 index 00000000..771df65b --- /dev/null +++ b/app/config/webpack/dev.js | |||
@@ -0,0 +1,62 @@ | |||
1 | const webpackMerge = require('webpack-merge'); | ||
2 | const webpack = require('webpack'); | ||
3 | const path = require('path'); | ||
4 | const commonConfig = require('./common.js'); | ||
5 | |||
6 | module.exports = function () { | ||
7 | return webpackMerge(commonConfig(), { | ||
8 | devtool: 'eval-source-map', | ||
9 | output: { | ||
10 | filename: '[name].dev.js' | ||
11 | }, | ||
12 | |||
13 | devServer: { | ||
14 | hot: true, | ||
15 | // enable HMR on the server | ||
16 | |||
17 | contentBase: './web', | ||
18 | // match the output path | ||
19 | }, | ||
20 | plugins: [ | ||
21 | new webpack.HotModuleReplacementPlugin(), | ||
22 | ], | ||
23 | module: { | ||
24 | rules: [ | ||
25 | { | ||
26 | enforce: 'pre', | ||
27 | test: /\.js$/, | ||
28 | loader: 'eslint-loader', | ||
29 | exclude: /node_modules/, | ||
30 | }, | ||
31 | { | ||
32 | test: /\.js$/, | ||
33 | exclude: /(node_modules)/, | ||
34 | use: { | ||
35 | loader: 'babel-loader', | ||
36 | options: { | ||
37 | presets: ['env'] | ||
38 | } | ||
39 | } | ||
40 | }, | ||
41 | { | ||
42 | test: /\.(s)?css$/, | ||
43 | use: [ | ||
44 | 'style-loader', | ||
45 | { | ||
46 | loader: 'css-loader', | ||
47 | options: { | ||
48 | importLoaders: 1, | ||
49 | } | ||
50 | }, | ||
51 | 'postcss-loader', | ||
52 | 'sass-loader' | ||
53 | ] | ||
54 | }, | ||
55 | { | ||
56 | test: /\.(jpg|png|gif|svg|eot|ttf|woff|woff2)$/, | ||
57 | use: 'url-loader' | ||
58 | }, | ||
59 | ] | ||
60 | }, | ||
61 | }) | ||
62 | }; | ||
diff --git a/app/config/webpack/prod.js b/app/config/webpack/prod.js new file mode 100644 index 00000000..ef41ab99 --- /dev/null +++ b/app/config/webpack/prod.js | |||
@@ -0,0 +1,99 @@ | |||
1 | const webpack = require('webpack'); | ||
2 | const webpackMerge = require('webpack-merge'); | ||
3 | const ExtractTextPlugin = require('extract-text-webpack-plugin'); | ||
4 | const ManifestPlugin = require('webpack-manifest-plugin'); | ||
5 | |||
6 | const commonConfig = require('./common.js'); | ||
7 | |||
8 | module.exports = function() { | ||
9 | return webpackMerge(commonConfig(), { | ||
10 | output: { | ||
11 | filename: '[name].js' | ||
12 | }, | ||
13 | devtool: 'source-map', | ||
14 | plugins: [ | ||
15 | new webpack.DefinePlugin({ | ||
16 | 'process.env': { | ||
17 | 'NODE_ENV': JSON.stringify('production') | ||
18 | } | ||
19 | }), | ||
20 | new webpack.optimize.UglifyJsPlugin({ | ||
21 | beautify: false, | ||
22 | mangle: { | ||
23 | screw_ie8: true, | ||
24 | keep_fnames: true | ||
25 | }, | ||
26 | compress: { | ||
27 | screw_ie8: true, | ||
28 | warnings: false | ||
29 | }, | ||
30 | comments: false | ||
31 | }), | ||
32 | new ExtractTextPlugin('[name].css'), | ||
33 | new ManifestPlugin({ | ||
34 | fileName: 'manifest.json', | ||
35 | }) | ||
36 | ], | ||
37 | module: { | ||
38 | rules: [ | ||
39 | { | ||
40 | enforce: 'pre', | ||
41 | test: /\.js$/, | ||
42 | loader: 'eslint-loader', | ||
43 | exclude: /node_modules/, | ||
44 | }, | ||
45 | { | ||
46 | test: /\.js$/, | ||
47 | exclude: /(node_modules)/, | ||
48 | use: { | ||
49 | loader: 'babel-loader', | ||
50 | options: { | ||
51 | presets: ['env'] | ||
52 | } | ||
53 | } | ||
54 | }, | ||
55 | { | ||
56 | test: /\.(s)?css$/, | ||
57 | use: ExtractTextPlugin.extract({ | ||
58 | fallback: 'style-loader', | ||
59 | use: [ | ||
60 | { | ||
61 | loader: 'css-loader', | ||
62 | options: { | ||
63 | importLoaders: 1, | ||
64 | minimize: { | ||
65 | discardComments: { | ||
66 | removeAll: true | ||
67 | }, | ||
68 | core: true, | ||
69 | minifyFontValues: true | ||
70 | } | ||
71 | } | ||
72 | }, | ||
73 | 'postcss-loader', | ||
74 | 'sass-loader' | ||
75 | ] | ||
76 | }) | ||
77 | }, | ||
78 | { | ||
79 | test: /\.(jpg|png|gif|svg)$/, | ||
80 | use: { | ||
81 | loader: 'file-loader', | ||
82 | options: { | ||
83 | name: 'img/[name].[ext]', | ||
84 | } | ||
85 | } | ||
86 | }, | ||
87 | { | ||
88 | test: /\.(eot|ttf|woff|woff2)$/, | ||
89 | use: { | ||
90 | loader: 'file-loader', | ||
91 | options: { | ||
92 | name: 'fonts/[name].[ext]', | ||
93 | } | ||
94 | } | ||
95 | } | ||
96 | ] | ||
97 | }, | ||
98 | }) | ||
99 | }; | ||