UNPKG

@rws-framework/client

Version:

Realtime Web Suit is a web-component powered, MS FAST powered fullstack-oriented framework that you can use to create domain-agnostic modular asynchoronous components with intershared authorized states.

14 lines (11 loc) 453 B
const fs = require('fs'); const chalk = require('chalk'); const path = require('path'); const tools = require('../../../_tools'); module.exports = async (appRoot, swPath) => { const swFilePath = path.resolve(appRoot, swPath); if(swPath.indexOf('.ts') === -1 || !fs.existsSync(swFilePath)){ throw new Error('[RWS] Service worker TS file does not exist'); } await tools.runCommand(`yarn rws-client build:sw ${swPath}`); }