@krknet/packman
Transpiler / Packager for .vue and .pug
Last updated 4 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
  localization, // Opional Localization Replacement $(VAR)$
  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, outputModules = false }) // iife -> path.join(this.outputPath, `app-${title}.js`)

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

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

compilePug ({ templatePath, basevars = {} }) // outpurs stringFunction(locals)

Current Tags

  • 2.8.4                                ...           latest (4 days ago)

22 Versions

  • 2.8.4                                ...           4 days ago
  • 2.8.2                                ...           14 days ago
  • 2.8.1                                ...           14 days ago
  • 2.8.0                                ...           a month ago
  • 2.7.1                                ...           a month ago
  • 2.7.0                                ...           a month ago
  • 2.6.0                                ...           a month ago
  • 2.5.2                                ...           2 months ago
  • 2.5.1                                ...           2 months ago
  • 2.5.0                                ...           2 months ago
  • 2.4.1                                ...           4 months ago
  • 2.4.0                                ...           6 months ago
  • 2.3.0                                ...           6 months ago
  • 2.2.0                                ...           8 months ago
  • 2.1.0                                ...           8 months ago
  • 2.0.0                                ...           9 months ago
  • 1.3.1                                ...           9 months ago
  • 1.3.0                                ...           9 months ago
  • 1.2.0                                ...           10 months ago
  • 1.1.1                                ...           10 months ago
  • 1.1.0                                ...           10 months ago
  • 1.0.0                                ...           10 months ago
Maintainers (1)
Downloads
Today 0
This Week 9
This Month 9
Last Day 0
Last Week 21
Last Month 67
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |