kviron / dwr-theme
开发用的Wordpress主题。包括:Webpack
0.1.8
2022-01-04 11:25 UTC
Requires
- kviron/wp-component-engine: ^0.0.4
- symfony/asset: 5.3
README
带有Webpack的Wordpress主题模板。
依赖关系
- Node js 14.16.1
- PHP 7.1
- composer 2.0
安装
在 themes 文件夹中执行以下命令:
composer create-project kviron/dwr-theme <имя темы>
该命令将创建主题文件夹和本地配置文件 .env 以配置Webpack
使用WebPack
为了构建你的生产环境中的样式和脚本,需要执行以下命令:
npm run build
启动本地服务器并监控更改
npm start
自动加载器的工作
所有位于classes 文件夹中的类都将自动加载,无需在 function.php 中额外加载例如,这样的文件:
"post-types/_index.php",
"includes/_index.php",
"settings/_index.php",
"manifest/_index.php",
"custom-fields/_init.php"
将通过自动加载器自动加载,然后你可以通过这些文件在其文件夹中连接相关的文件