3.0.1 • Published 3 years ago

@krknet/packman v3.0.1

Weekly downloads
79
License
ISC
Repository
gitlab
Last release
3 years ago

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, // Output-Folder
  baseDir, // pug-BaseDir
  doCompress, // closure-compile if not dev
  localization, // Opional Localization Replacement $(VAR)$
  aliases, // Custom Import mapping [{from: '@', to: 'helpers/'}]
  env // development
}

env

  • packman: Babel Targets
  • packman_compress=no: deactivate Minification in Productions

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)
3.0.1

3 years ago

3.0.0

3 years ago

2.10.4

3 years ago

2.10.3

3 years ago

2.10.2

3 years ago

2.10.1

3 years ago

2.10.0

3 years ago

2.9.1

4 years ago

2.9.0

4 years ago

2.8.4

4 years ago

2.8.2

4 years ago

2.8.1

4 years ago

2.8.0

4 years ago

2.7.1

4 years ago

2.7.0

4 years ago

2.6.0

4 years ago

2.5.2

4 years ago

2.5.0

4 years ago

2.5.1

4 years ago

2.4.1

4 years ago

2.4.0

4 years ago

2.3.0

4 years ago

2.2.0

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago