UNPKG

hapi.app

Version:

HAPI application generator

23 lines (18 loc) 666 B
npm = require "npm" browserify = require "browserify" fs = require "fs" tools = installNpms: (folderPath, cb) -> npm.load -> npm.prefix = folderPath npm.install -> cb?() bundleTotem: (folderPath, cb) -> manifest = require.resolve("totem/lib/solo/index") browserify([manifest]).bundle {}, (error, src) -> throw error if error fs.writeFile "#{folderPath}/public/totem.js", src, cb checkInHapiApp: (folderPath) -> unless fs.existsSync "#{folderPath}/.hapi" throw new Error "This command must be run in a HAPI App folder." module.exports = tools