gulp-docsify-vuep
v0.1.1
Published
Convert Vue code to Markdown, make them can run with Vuep in the docsify.
Downloads
4
Maintainers
Readme
gulp-docsify-vuep
This is a Gulp plugin.
It can convert Vue code to Markdown, make them can run with Vuep in the docsify.
Install
npm install gulp-docsify-vuep --save-dev
Usage
gulpfile.js
const gulp = require('gulp');
const docsifyVuep = require('gulp-docsify-vuep');
gulp.task('default', function() {
gulp.src('./src/**/*.vue')
.pipe(docsifyVuep())
.pipe(gulp.dest('./dist'));
});
API
docsifyVuep([config])
config.options
Type:
Object
Options for Vuep.
config.id
Type:
String
default:
dir__file-name--filehash[7]
ID for Vuep template.
Example
gulpfile.js
const gulp = require('gulp');
const docsifyVuep = require('gulp-docsify-vuep');
gulp.task('default', function() {
gulp.src('./src/**/*.vue')
.pipe(
docsifyVuep({
options: {
theme: 'neo',
},
})
)
.pipe(gulp.dest('./dist'));
});
Input:
<template> <h1>hello world!<h1> </template> <script> export default {}; </script>
Output:
<vuep :options="{'theme':'neo'}" template="#index--319ba5d"></vuep> <script v-pre type="text/x-template" id="index--319ba5d"> <template> <h1>hello world!<h1> </template> <script> export default {}; </script> </script>
License
MIT © UUCoder