Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bryanbuchs/drupal-theme
Starterkit for a component-driven Drupal theme
https://github.com/bryanbuchs/drupal-theme
drupal storybook vitejs
Last synced: 4 months ago
JSON representation
Starterkit for a component-driven Drupal theme
- Host: GitHub
- URL: https://github.com/bryanbuchs/drupal-theme
- Owner: bryanbuchs
- Created: 2024-05-01T13:42:35.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-09-23T17:55:27.000Z (4 months ago)
- Last Synced: 2024-09-28T10:01:57.261Z (4 months ago)
- Topics: drupal, storybook, vitejs
- Language: Less
- Homepage:
- Size: 3.7 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Quick Start
- `npm run build` compiles and optimizes the output
- `npm start` watches files for changes in any linked files (`import from...` or `background-image:...`), and compiles the results to `dist/`. Also starts a browsersync instance with a proxy to a lando server
- `npm run storybook` launches the storybook ui in a browser.## Notes
* `components` are expected to follow the conventions from https://github.com/bryanbuchs/generator-component (`yo generate component`)
* Vite will look for `components/**/*.library.js` files and the results of each will be compiled to their own `dist` files.
* The mixin and settings files in the root `less` directory are automatically loaded when processing LESS.
* Images smaller than 10kb referenced in CSS/LESS will be inlined as data-url in the compiled CSS.
* SVGs can be inlined the same way, or by using [postcss-inline-svg](https://github.com/bryanbuchs/postcss-inline-svg) if fill/stroke colors need to be adjusted per-rule.
* `postcss-inline-svg` will look for SVGs at these paths, in order:
* same directory as the component
* the shared `/images` folder
* installed in `node_modules`
* A FontAwesome icon, using the pattern `[solid|regular|brands]/[icon].svg`## TODO
- [x] `npm start` runs the watch task and starts a browsersync instance with a proxy to a lando server
- [x] remove empty build files (`[name]/[name].js`) for css-only components
- [x] add storybook config
- [ ] troubleshoot storybook controls (https://github.com/bryanbuchs/drupal-theme/issues/1)
- [ ] add default Drupal theme assets (https://github.com/bryanbuchs/drupal-theme/issues/2)