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