Giter Site home page Giter Site logo

gulp-vue2blade's Introduction

gulp-vue2blade

NPM version Downloads

Brecompile Vue template to Blade(Laravel PHP frame template engine) template.
(Test version, Do not use in the production environment)

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.

gulp-vue2blade's People

Contributors

mlinquan avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.