@krknet/packman
Transpiler / Packager for .vue and .pug
Last updated 24 days ago by krknet .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @krknet/packman 
SYNC missed versions from official npm registry.

Packman

Transpiler / Packager for .vue and .pug

Usage

const Packman = require('@krknet/packman')

const packman = new Packman({
  outputPath: path.join(global.__dataFolder, 'renders'),
  baseDir: __dirname
})

Options

{
  outputPath, // required
  baseDir, // pug-BaseDir
  doCompress, // closure-compile if not dev
  aliases, // Custom Import mapping [{from: '@', to: 'helpers/'}]
  env // development
}

Functions

async cleanFolder () // Clean Ouput Folder

async packVueComponent ({ title, inputFile, toFile = true })  // iife -> path.join(this.outputPath, `component-${title}.js`)

async packVueApp ({ title, inputFile, toFile = true }) // iife -> path.join(this.outputPath, `app-${title}.js`)

renderPug ({ title, templatePath, vars = {} })  // html -> path.join(this.outputPath, `${title}.html`)

stringPug ({ templatePath, vars = {} }) // outputs html

Current Tags

  • 2.2.0                                ...           latest (24 days ago)

9 Versions

  • 2.2.0                                ...           24 days ago
  • 2.1.0                                ...           a month ago
  • 2.0.0                                ...           a month ago
  • 1.3.1                                ...           a month ago
  • 1.3.0                                ...           a month ago
  • 1.2.0                                ...           2 months ago
  • 1.1.1                                ...           2 months ago
  • 1.1.0                                ...           2 months ago
  • 1.0.0                                ...           3 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 13
Last Day 0
Last Week 13
Last Month 62
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |