kviron/dwr-theme

开发用的Wordpress主题。包括:Webpack

安装: 165

依赖: 0

建议: 0

安全: 0

星星: 0

观察者: 1

分支: 0

开放问题: 0

类型:项目

0.1.8 2022-01-04 11:25 UTC

This package is auto-updated.

Last update: 2024-09-28 20:09:22 UTC


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"

将通过自动加载器自动加载,然后你可以通过这些文件在其文件夹中连接相关的文件