UNPKG

@rws-framework/client

Version:

This package provides the core client-side framework for Realtime Web Suit (RWS), enabling modular, asynchronous web components, state management, and integration with backend services. It is located in `.dev/client`.

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}`); }