Comments (19)
I think the layout that they suggest looks good:
your-project/
├── scss
│ └── custom.scss
└── bootstrap/
├── js
└── scss
from django-wiki.
Hey, sure I can take care it, and I think it's a good idea to move that outside of the scrips section. I'll be attending PyTexas this week so I'll try to get some time to work on it first.
from django-wiki.
@oscarmcm that's indeed the dependency that I mentioned in the question ;) I'm not good at assessing whether to have a plugin instead of writing 1 hook... dependencies have a price in maintenance, risk of abandonment and supply chain security.. but then on the other hand, developing and maintaining a hook probably has disadvantages too :)
from django-wiki.
Now, there's no real need to use a bunch of SCSS files, or are we going to continue supporting this?
https://getbootstrap.com/docs/4.6/getting-started/theming/
from django-wiki.
I would think that we still need to have the source Bootstrap files that we are building with? But we can split our own custom overrides from those so that everything from Bootstrap is kept separately and can easily be updated.
from django-wiki.
I would think that we still need to have the source Bootstrap files
Yes, we still need the imports like this:
// Custom.scss
// Option A: Include all of Bootstrap
// Include any default variable overrides here (though functions won't be available)
@import "../node_modules/bootstrap/scss/bootstrap";
// Then add additional custom code here
But I think that this will no longer be required to have all of this unless you still want to continue using the current structure.
from django-wiki.
I don't think we should have any Node stack in the project for this reason. That'd have to happen because of something more important.
I have so far benefited from having the Bootstrap source files in the repo because I often read the code.
from django-wiki.
But I think that this will no longer be required to have all of this unless you still want to continue using the current structure.
I want to continue having the Bootstrap source files but separate them from the files that contain overrides/additions.
I'd want to avoid any Node installation of Bootstrap for as long as possible, but certainly consider it if there were other things from Node 👍
from django-wiki.
I want to also remove the CSS artifacts from the repo. I find that hatch has so-called "hooks" to ensure that something happens during the build process. We can use those hooks to build the SCSS.
I know that we currently have the assets
command that we can run, but I'd like somehow that the build and release process doesn't come with a risk of un-synced assets by baking the assets building into the wheel/sdist building.
- By writing our own hatch hook: https://hatch.pypa.io/1.9/plugins/build-hook/reference/
- By using a plugin for hatch: https://github.com/rmorshea/hatch-build-scripts
Do you have any experience with this @oscarmcm ? ❤️
from django-wiki.
That sounds fantastic! Thanks ❤️ I'll reorganize the SCSS either before or after this change, but I think we can keep them separate since it's just a matter of updating the sassc
command with the new paths.
from django-wiki.
does the reorganize stuff means to use the new BS5 layout? or just to be more streamlined with the hooks change?
from django-wiki.
I want to begin by relocating the CSS and SCSS files in a separate change, but then I feel like the road is paved to start the BS5 upgrade 👍
from django-wiki.
@benjaoming maybe we don't need a new hook for this, maybe its just add a new dependency and ofc the proper configurations.
https://github.com/rmorshea/hatch-build-scripts
wdyt?
from django-wiki.
oh sorry about not catching it right, gonna check what's the most easy solution for this without going crazy.
from django-wiki.
yes, agreed, it seems like it's immediately going to be easy to spend a disproportional amount of time on a solution for a little problem... it was very "intuitive" with a Makefile, yet here there seems to be an immediate uphill struggle.
from django-wiki.
Related Issues (20)
- SOME cards for default templates HOT 5
- SHOW_MAX_CHILDREN setting is ignored HOT 1
- Python 3.11 support: global flags not at the start of the expression at position 9 HOT 5
- Unable to login
- Unable to login HOT 1
- Bug: Edit section fails when fenced code block contains comments HOT 1
- Error Due To Bleach Updating
- Release final 0.10 with Django 4.2 support HOT 8
- Broken Django-Wiki demo HOT 4
- Grant more permissions in demo HOT 2
- [Bug]:X-Frame-Options Cross-Domain Issue HOT 3
- [Bug]: Search result with broken HTML for matches inside links HOT 5
- [Feature]: Switch to Ruff from black & flake8 HOT 1
- Django 5 support HOT 4
- [article_list depth:2] requires newline
- 404 Errors on static resources from the https://demo.django-wiki.org demo site
- Docs: Explain the existing plugins
- Update fenced_code markdown extention to support attr_list
- Upgrade to Bootstrap 5 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-wiki.