0.0.1 • Published 12 months ago
react-tea v0.0.1
React Tea
A custom React renderer for integrating React components with Bubble Tea for terminal-based UIs.
Installation
npm install react-teaDevelopment
Create an
app.jsfile with your React component tree, for example:const React = require('react'); const { render, Text, View, Button, createStyle } = require('react-tea'); const textStyle = createStyle({ color: 'green', bold: true }); const viewStyle = createStyle({ backgroundColor: 'black' }); const App = () => ( <View style={viewStyle}> <Text style={textStyle}>Hello, React Tea!</Text> <Button onClick={() => console.log('Button clicked')}>Click Me</Button> </View> ); render(<App />, {});Start the development server:
npm run devThis will run both the backend and frontend.
Building the Application
To create a bundled executable for distribution, run:
npm run buildThe compiled binaries will be available in the dist directory.
Running the Backend
If you prefer to run the backend directly, use:
node scripts/run-backend.js0.0.1
12 months ago