@doop/core-vue

0.0.40 • Public • Published

@DOOP/Core-Vue

Doop core module for frontend Vue projects

This module generally lives inside a build script.

/**
* Process all .vue file <script frontend/>, <template/> and <style/> blocks
*/
let gulp = require('gulp');
let {compiler} = require('@doop/core-vue');

gulp.task('build.vue', ['load:app', 'load:app.git'], ()=>
	compiler({
		log: gulp.log, // Fancy logging output
	})
);

API

This module exports the following sub-modules:

Compiler(options)

Perform a Doop / Frontend compilation process placing all files in the dist directory within the parent Doop project.

This function expects the Doop global app to be available and it will use it for pathing, config information.

Options:

Name Type Default Description
once boolean false Run the compiler loop once, if falsy a watcher is setup and the process never terminates
config Object Internal config* The Webpack config to use, see notes
configMerge Object {} Additional config to merge into base using _.merge()
log function console.log Logging function for any output
colors boolean true Whether to display coloring in output

NOTES:

  • The default Webpack config is avaiable here
  • When cacheCompiler is enabled the Webpack compiler is loaded once and held in memory, it gets reused on all subsequent hits
  • When cacheCompiler is enabled and the compiler is busy it is waited on before continuing so it can finish caching local data, a status message is displayed when this occurs

expressMiddleware

Included automatically when a Doop backend server loads to inject the Webpack HMR handlers.

Readme

Keywords

Package Sidebar

Install

npm i @doop/core-vue

Weekly Downloads

9

Version

0.0.40

License

MIT

Unpacked Size

17.1 kB

Total Files

8

Last publish

Collaborators

  • hash-bang
  • mr-yellow