Skip to content
Vue.js + Webpack PLUGIN template for WordPress
JavaScript Vue PHP HTML Shell
Branch: master
Clone or download
Pull request Compare This branch is 10 commits ahead, 14 commits behind shshaw:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
template
.gitignore
README.md
meta.json
vue-logo-caldera.png

README.md

vue-webpack-wordpress

A simple Vue 2.0 Webpack & vue-loader setup for WorddPress

This template is Vue 2.0 compatible.

Forked from: https://github.com/shshaw/vue-webpack-wordpress

Usage

This is a project template for vue-cli.

Install

$ npm install -g vue-cli
$ vue init caldera-learn/vue-webpack-wordpress-plugin my-project
$ cd my-project/vue
$ npm install
$ npm run build

Use in the WordPress

  • Put <div id="app"></div> somewhere -- admin page, the_content() whatever...
  • When developing use npm run watch to watch changes and rebuild

BTW:

  • webpack_enqueue is an example of how to enqueue the built scripts.
  • You should probably change constants and function prefixes.
  • Josh will probably make a full boilerplate out of this at some point.
  • Live reload doesn't work for Josh so he removed it.

For detailed explanation on how things work, consult the docs for vue-loader. Also check out the breaking changes in vue-loader@9.0.0.

Fork It And Make Your Own

You can fork this repo to create your own boilerplate, and use it with vue-cli:

vue init username/repo my-project
You can’t perform that action at this time.