drupalninja/drupalx_theme
Composer 安装命令:
composer require drupalninja/drupalx_theme
包简介
DrupalX Bootstrap, Storybook starter theme.
README 文档
README
The DrupalX theme starter kit is intended to be used with the DrupalX distribution.
This starter kit includes Tailwind CSS, Storybook and full template integration with the DrupalX install profile.
Public Storybook: https://drupalx.netlify.app/
Generating the theme
The following commands will generate the new custom theme using the DrupalX starter as the template:
chmod +x core/scripts/drupal && ddev exec --dir /var/www/html/web core/scripts/drupal generate-theme --starterkit=drupalx_theme nameoftheme
Enable the new theme:
ddev . drush theme:en nameoftheme ddev . drush config-set system.theme default -y nameoftheme ddev . drush cr
Compiling Theme Assets
If you haven't yet, install nvm: https://github.com/creationix/nvm
Use the right version of node with the following:
nvm use
This command will look at your .nvmrc file and use the
version node.js specified in it. This ensures all developers
use the same version of node for consistency.
If that version of node isn't installed, install it with the following command:
nvm install
Install npm dependencies:
npm install
Available Scripts
The theme includes several npm scripts for development and building:
Development
npm run watch: Run all watch tasks in parallel (Tailwind, components, and stories)watch:tailwind: Watch and compile Tailwind CSS changeswatch:components: Watch and compile component SCSS changeswatch:stories: Watch and compile Storybook story changes
npm run storybook: Start Storybook development server on port 6006npm run build-storybook: Build static Storybook site
Building
npm run build: Run all build tasks (stories, Tailwind CSS, and component compilation)build:stories: Build Storybook storiescompile: Compile theme components
Linting and Cleaning
npm run scss-fix: Fix SCSS/CSS styling issuesnpm run lint:js: Lint and fix JavaScript filesnpm run lint:sass: Lint SCSS filesnpm run clean: Remove all compiled CSS and JS filesclean:css: Remove compiled CSS filesclean:js: Remove compiled JS files
Testing
npm run cypress: Run Cypress tests
Git Hooks
npm run postinstall: Install Husky git hooksnpm run prepare: Install Husky git hooks (alternative command)
Managing the 'dist' Folder
By default, the .gitignore file does not ignore the dist folder for demonstration purposes. However, in most projects, you will want to ignore this folder.
To do this, you can uncomment the relevant lines in the .gitignore file to ignore the dist folder and its contents. Here are the steps:
Update .gitignore:
- Open the .gitignore file.
- Find the lines related to the dist folder, which are commented out.
- Uncomment these lines to ensure the dist folder is ignored by Git.
Deploying Your Application:
- If you choose to ignore the dist folder, you will need to incorporate an npm build process when you deploy your application. This ensures that the necessary assets are generated and included in your deployment package.
drupalninja/drupalx_theme 适用场景与选型建议
drupalninja/drupalx_theme 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 1.23k 次下载、GitHub Stars 达 10, 最近一次更新时间为 2024 年 05 月 22 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 drupalninja/drupalx_theme 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 drupalninja/drupalx_theme 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 1.23k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 9
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2024-05-22