Skip to content

caldera-learn/vue-webpack-wordpress-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Vue.js + Webpack PLUGIN template for WordPress

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • JavaScript 61.2%
  • Vue 21.5%
  • PHP 11.3%
  • HTML 3.0%
  • Shell 3.0%