最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Custom Plugin - Package and Deployment Solutions

programmeradmin1浏览0评论

We are a very small company working with a specific customer base. In this, we often have to create small WP plugins specific to the customer. Typically, we re-use our own basic folder structure and files (base php file that lays out some standard variables, assets folder structure for css and js files, installation/settings features templates, etc.).

We don't currently use anything that is "industry standard" or that will package, process, combine or minify our files for deployment (css, scss, js, etc.). Does such a thing exist? I'm familiar with the package/deployment of Vue/React and I'm curious is something similar exists for WP or if there are any standards for this?

I've done some research but can't seem to find a clear solution.

We are a very small company working with a specific customer base. In this, we often have to create small WP plugins specific to the customer. Typically, we re-use our own basic folder structure and files (base php file that lays out some standard variables, assets folder structure for css and js files, installation/settings features templates, etc.).

We don't currently use anything that is "industry standard" or that will package, process, combine or minify our files for deployment (css, scss, js, etc.). Does such a thing exist? I'm familiar with the package/deployment of Vue/React and I'm curious is something similar exists for WP or if there are any standards for this?

I've done some research but can't seem to find a clear solution.

Share Improve this question asked Dec 31, 2020 at 23:46 AdamAdam 1037 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Sounds like you are trying to find a way to "build" your public assets - this is commonly achieved using Task Runners - Grunt or Gulp are two well-known examples.

Grunt is part of Node.JS, so you would need to download and install the node.js app and then find the packages you want to use - such as dart-sass for scss or uglify for minification of JS

The last step would be to config the gruntfile.js for your project or sub modules - how this works is very specific to you needs, but there are good examples available on the https://gruntjs/ website.

As far as structure and distribution of your plugins, as these probably do not sit on wordpress - you need to find a way that works well for you - we use public and private repos on github, which gives us versioning via Git, a good CI pipeline, and also a good way to allow multiple developers to work on the same code base.

We create a new repo for each plugin or theme.

发布评论

评论列表(0)

  1. 暂无评论