Fix static file dir warning (#350)

This commit is contained in:
Sascha Ißbrücker 2022-10-05 10:00:13 +02:00 committed by GitHub
parent 7148bc62c3
commit 53be77aade
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

4
.gitignore vendored
View file

@ -182,7 +182,9 @@ typings/
### Custom
# Rollup compilation output
/build
/bookmarks/static/bundle.js*
# SASS compilation output
/bookmarks/static/theme-*.css*
# Collected static files for deployment
/static
# Build output, etc.

View file

@ -11,7 +11,8 @@ export default {
sourcemap: true,
format: 'iife',
name: 'linkding',
file: 'build/bundle.js'
// Generate bundle in static folder to that it is picked up by Django static files finder
file: 'bookmarks/static/bundle.js'
},
plugins: [
svelte({

View file

@ -138,7 +138,7 @@ STATIC_ROOT = os.path.join(BASE_DIR, 'static')
# Turn off SASS compilation by default
SASS_PROCESSOR_ENABLED = False
# Location where generated CSS files are saved
SASS_PROCESSOR_ROOT = os.path.join(BASE_DIR, 'tmp', 'build', 'styles')
SASS_PROCESSOR_ROOT = os.path.join(BASE_DIR, 'bookmarks', 'static')
# Add SASS preprocessor finder to resolve generated CSS
STATICFILES_FINDERS = [
@ -147,9 +147,8 @@ STATICFILES_FINDERS = [
'sass_processor.finders.CssFinder',
]
# Include SASS styles into static path, otherwise they can not be found by the SASS preprocessor
# Enable SASS processor to find custom folder for SCSS sources through static file finders
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'build'),
os.path.join(BASE_DIR, 'bookmarks', 'styles'),
]