@koumoul/nuxt-build-cache

0.3.0 • Public • Published

nuxt-build-cache

A small tool that manages a nuxt build directory based on current version and last build info.

This is for people who do not wish to pre-build their nuxt projects for each environment but do not wish either to run the full build at each start/restart or replication of the service. A lock file is used to manage concurrency in case of service replication.

const nuxtBuildCache = require('@koumoul/nuxt-build-cache')
const nuxtConfig = require('./nuxt.config')
const version = process.env.VERSION || require('./package.json').version
async function main() {
  // this will build only if necessary based on last build info and current version
  const nuxt = await nuxtBuildCache.prepare('my-project', version, nuxtConfig)
  const app = require('express')()
  app.use(nuxt.render)
  ...
}

Readme

Keywords

Package Sidebar

Install

npm i @koumoul/nuxt-build-cache

Weekly Downloads

0

Version

0.3.0

License

MIT

Unpacked Size

3.83 kB

Total Files

4

Last publish

Collaborators

  • bonnel-n
  • albanm