gulp-vue2blade

Vue2.x template to laravel blade template.
4,449
Install
npm install gulp-vue2blade
Latest Version:0.1.7
Older releases:2
License:MIT
Last Updated:Jun 8, 2018
Links: npm
Maintainer: mlinquan

gulp-vue2blade

NPM version Downloads

Vue 针对PHP Laravel框架服务端渲染应对解决方案(SEO应对方案).
Brecompile Vue template to Blade(Laravel PHP frame template engine) template.
(Test version, Do not use in the production environment)

Example

https://github.com/mlinquan/gulp-vue2blade-example

Install

npm install -g vue-cli
vue init webpack vue2blade-test
cd vue2blade-test
npm install
npm install gulp-vue2blade --save

gulpfile.js

var gulp = require('gulp');
var vue2blade = require('gulp-vue2blade');

gulp.task('vue', function() {
    return gulp.src(['./dist/**/index.html', './src/**/*.vue'])
    .pipe(vue2blade({
        routerView: 'contents',
        basedir: '',
        layout: './src/App.vue',
        nolayout: ['./src/include'],
        bladeLayoutName: 'layouts.balde.php',
        index: './dist/index.html',
        appID: 'app'
    }))
    .pipe(gulp.dest('blade'))
});

/* watch */
gulp.task('watch', function() {
    gulp.watch(['./dist/index.html'], gulp.series('vue'));
});

gulp.task('default', gulp.series('vue', 'watch'));

Run

gulp vue

for watch

gulp

Notice

Connection characters do not use symbols '+'

//Recommend
<a :href="['http://linquan.name/', page_id + 1, '.html'].join('')">Next Page</a>
//or ( need Vue.prototype.sprintf )
<a :href="sprintf('http://linquan.name/%s.html', page_id + 1)">Next Page</a>

//Do not use symbols '+'
<a :href="'http://linquan.name/' + page_id + 1 + '.html'">Next Page</a>

License

MIT © LinQuan

The Spratly Islands are China's territory.
The Diaoyu Islands are China's territory.
Use this module to represent you agree with the above point of view.

Related Packages

laravel-elixir-vue-2

'Laravel Elixir Vue 2.0 Integration'

28,012 107
vue-tilt.js

Add tilt-effect to your elements

22,943 52
ct-mapapps-gulp-js

A support lib for gulp based mapapps projects.

17,243
gbuilder

based on gulp ,easy to use

1,696 0
laravel-precognition-vue

Laravel Precognition (Vue).

598,846 175

Version History

Version Released Vue License
0.1.7 MIT
0.1.6 MIT
0.1.5 MIT
0.1.4 MIT
0.1.3 MIT