Compare commits
No commits in common. "front-end-update" and "main" have entirely different histories.
front-end-
...
main
5 changed files with 3192 additions and 1526 deletions
|
|
@ -1,16 +1,21 @@
|
||||||
module.exports = api => {
|
module.exports = api => {
|
||||||
const isTest = api.env('test');
|
const isTest = api.env('test');
|
||||||
|
|
||||||
const preset = ['@babel/preset-env', { targets: 'defaults' }];
|
const preset = [
|
||||||
const testPreset = ['@babel/preset-env', { targets: { node: process.versions.node } }];
|
"@babel/preset-env", { targets: 'defaults' }
|
||||||
|
];
|
||||||
const plugins = [
|
const testPreset = [
|
||||||
'@babel/plugin-transform-react-jsx',
|
"@babel/preset-env", { targets: { node: process.versions.node } }
|
||||||
'@babel/plugin-proposal-class-properties',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const plugins = [
|
||||||
|
"@babel/plugin-syntax-dynamic-import",
|
||||||
|
"@babel/plugin-transform-react-jsx",
|
||||||
|
"@babel/plugin-proposal-class-properties"
|
||||||
|
]
|
||||||
|
|
||||||
return {
|
return {
|
||||||
presets: [isTest ? testPreset : preset],
|
"presets": [isTest ? testPreset : preset],
|
||||||
plugins: plugins,
|
"plugins": plugins
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|
|
||||||
4674
package-lock.json
generated
4674
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -37,6 +37,7 @@
|
||||||
"@babel/runtime": "^7.12.13",
|
"@babel/runtime": "^7.12.13",
|
||||||
"babel-jest": "^29.7.0",
|
"babel-jest": "^29.7.0",
|
||||||
"babel-loader": "^8.2.2",
|
"babel-loader": "^8.2.2",
|
||||||
|
"clean-webpack-plugin": "^3.0.0",
|
||||||
"css-loader": "^7.1.2",
|
"css-loader": "^7.1.2",
|
||||||
"fetch-mock": "^8.3.2",
|
"fetch-mock": "^8.3.2",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ from newsreader.news.collection.models import CollectionRule
|
||||||
|
|
||||||
|
|
||||||
class CollectionRuleAdmin(admin.ModelAdmin):
|
class CollectionRuleAdmin(admin.ModelAdmin):
|
||||||
fields = ("url", "name", "category", "favicon", "user")
|
fields = ("url", "name", "timezone", "category", "favicon", "user")
|
||||||
|
|
||||||
list_display = ("name", "type_display", "category", "url", "last_run", "succeeded")
|
list_display = ("name", "type_display", "category", "url", "last_run", "succeeded")
|
||||||
list_filter = ("user",)
|
list_filter = ("user",)
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
import { resolve } from 'path';
|
import { resolve } from 'path';
|
||||||
|
import { CleanWebpackPlugin } from 'clean-webpack-plugin';
|
||||||
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
||||||
|
|
||||||
const exlcudeCleanFiles = ['favicon.png'];
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
resolve: { extensions: ['.js', '.scss'] },
|
resolve: { extensions: ['.js', '.scss'] },
|
||||||
entry: {
|
entry: {
|
||||||
|
|
@ -11,11 +10,6 @@ export default {
|
||||||
output: {
|
output: {
|
||||||
path: resolve(__dirname, 'src', 'newsreader', 'static'),
|
path: resolve(__dirname, 'src', 'newsreader', 'static'),
|
||||||
filename: 'js/[name].bundle.js',
|
filename: 'js/[name].bundle.js',
|
||||||
clean: {
|
|
||||||
keep: filename => {
|
|
||||||
return exlcudeCleanFiles.find(excludedFile => filename.endsWith(excludedFile));
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
|
|
@ -48,5 +42,11 @@ export default {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
plugins: [new MiniCssExtractPlugin({ filename: 'css/main.css' })],
|
plugins: [
|
||||||
|
new MiniCssExtractPlugin({ filename: 'css/main.css' }),
|
||||||
|
new CleanWebpackPlugin({
|
||||||
|
cleanOnceBeforeBuildPatterns: ['js', 'css', 'fonts'],
|
||||||
|
cleanAfterEveryBuildPatterns: ['!fonts/**'],
|
||||||
|
}),
|
||||||
|
],
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue