Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cklmercer/vue-stack-2.0
Vue 2.0 Project Boilerplate
https://github.com/cklmercer/vue-stack-2.0
boilerplate single-page-app spa vue vue-events vue-router vue-stash
Last synced: about 2 months ago
JSON representation
Vue 2.0 Project Boilerplate
- Host: GitHub
- URL: https://github.com/cklmercer/vue-stack-2.0
- Owner: cklmercer
- License: mit
- Created: 2016-08-05T18:22:06.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-02T16:19:18.000Z (over 7 years ago)
- Last Synced: 2024-07-17T09:49:12.260Z (2 months ago)
- Topics: boilerplate, single-page-app, spa, vue, vue-events, vue-router, vue-stash
- Language: JavaScript
- Homepage:
- Size: 17.3 MB
- Stars: 163
- Watchers: 7
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-vue - vue-stack-2.0 - Vue2项目样板 (开发框架)
- awesome-github-vue - vue-stack-2.0 - Vue2项目样板 (开发框架)
- awesome - vue-stack-2.0 - Vue2项目样板 (开发框架)
README
# vue-stack-2.0
Vue 2.0 project boilerplate.**Looking for a more updated, light-weight boilerplate? Check out [vue-mix](https://github.com/cklmercer/vue-mix)**
## Includes
* Vue 2.0
* Vue Router 2.0
* Vue Stash 2.0
* Vue Events
* Vue Resource
* lodash
* jQuery
* Bootstrap Sass
* Font Awesome
* Laravel Elixir## Setup
* Clone the git repo `git clone https://github.com/cklmercer/vue-stack-2.0`
* Change into the directory `cd vue-stack-2.0`
* Run `npm install`
* Run `gulp`
* Open `./public/index.html` with your browser.## Features
### Global Store
Visit `./app/store.js` to add properties to your global store. Pre-initialize these properties and they'll be reactive
just like other properties in your component's `data` option.
You can access these properties from from within any component using the `store` option or via `vm.$store`.
See [vue-stash](https://github.com/cklmercer/vue-stash) for more details regarding the global store.
### Global Event Bus
Since the `vm.$dispatch` and `vm.$broadcast` events have been deprecated, `vue-stack-2.0` leverages `vue-events` to
simplify event handling.**Fire an event**
* `vm.$events.fire('event-name', data)`
* `vm.$events.emit('event-name', data)`
* `vm.$events.$emit('event-name', data)`**Listen for an event**
* `vm.$events.listen('event-name', cb())`
* `vm.$events.on('event-name', cb())`
* `vm.$events.$on('event-name', cb())`See [vue-events](https://github.com/cklmercer/vue-events) for more details.
### SPA Routing
`vue-stack-2.0` leverages the latest [vue-router](https://github.com/vuejs/vue-router). To get started, checkout
`./app/routes.js`._I'm using [laravel/homestead](https://github.com/laravel/homestead) and [browser-sync](https://github.com/JeffreyWay/laravel-elixir-browsersync-official)_
## License
[MIT](http://opensource.org/licenses/MIT)