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`.

32 lines (24 loc) 866 B
const fs = require('fs'); const chalk = require('chalk'); class RWSPluginBuilder { pluginInfo = {name: null}; constructor(pluginPath, buildConfigurator, baseBuildConfig){ this.pluginPath = pluginPath; this.buildConfigurator = buildConfigurator; this.baseBuildConfig = baseBuildConfig; this.pluginInfo = JSON.parse(fs.readFileSync(this.pluginPath + '/plugin-info.json', 'utf-8')); } async onComponentsLocated(partedComponentsLocations = []){ return partedComponentsLocations; } async onServicesLocated(servicesLocations){ return servicesLocations; } async onBuild(webpackOptions){ return webpackOptions; } log(msg){ console.log(chalk.blue('RWS Plugin'), chalk.green(this.pluginInfo.name) + ':', msg); } } module.exports = { RWSPluginBuilder };