frosty
A fast, flexible, and modern JSX-based UI library.
Last updated a month ago by GitHub Actions .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install frosty 
SYNC missed versions from official npm registry.

Frosty

A fast, flexible, and modern JSX-based UI library.

Features

  • ⚡ Fast rendering and reconciliation
  • 🧩 Flexible component model
  • 🎨 Built-in style and CSS support
  • 🪝 Modern hooks API
  • 🌐 SSR-ready (Server-side rendering)

Installation

Install Frosty using npm:

npm install frosty

Quick Start

Here's a simple example to get you started:

import { useState } from 'frosty';

function App() {
  const [count, setCount] = useState(0);
  return (
    <div>
      <h1>Hello, Frosty!</h1>
      <p>You clicked {count} times</p>
      <button onClick={() => setCount(count + 1)}>
        Count: {count}
      </button>
    </div>
  );
}

export default App;

See the comprehensive documentation for detailed guides, API reference, and advanced usage patterns.

Application Entry Point

Your application entry point (the main file you pass to Frosty CLI) must export your root component as the default export. This is required for Frosty to properly identify and render your application.

// app.tsx or app.js
import { useState } from 'frosty';

function MyApp() {
  // Your application logic here
  return <div>Hello World!</div>;
}

// Required: Export your root component as default
export default MyApp;

This default export pattern ensures that:

  • Frosty CLI can automatically detect your application component
  • Server-side rendering (SSR) works correctly
  • Client-side hydration functions properly
  • Your app integrates seamlessly with the Frosty build system

Usage

To run your app with Frosty CLI using npx:

npx frosty run app.js

Common Options

  • -w, --watch   Enable watch mode (rebuild on file changes)
  • -d, --debug   Enable debug mode (development build)
  • -p, --port <port> Specify server port (default: 8080)
  • -c, --configuration <file> Use a custom config file (default: server.config.js)
  • -s, --src <dir>  Specify source directory
  • -o, --output <dir> Specify output directory

Example Commands

Start your app in development mode with watch:

npx frosty run --watch --debug app.js

Run with a custom port and config:

npx frosty run --port 3000 --configuration my.config.js app.js

See npx frosty run --help for the full list of options.

Configuration File (Optional)

Customize build and server behavior with a server.config.js file in your project root.

  • You may export an object or a function (env, argv) => config.
  • All fields are optional.
module.exports = {
  src: 'src',                // Source directory
  output: 'dist',            // Output directory
  serverEntry: 'server.js',  // Server entry file
  client: {                  // (Optional) Client entry points
    main: {
      entry: 'src/app.js',   // Path to client entry file
      basepath: '/',         // (Optional) URL base path for this entry
    }
  },
  workers: {                 // (Optional) Worker entry points
    myClientWorker: {
      entry: 'src/workers/myClientWorker.js', // Path to worker entry file
      client: true,                           // true = browser worker (bundled into public/workers/)
    },
    myServerWorker: {
      entry: 'src/workers/myServerWorker.js', // Path to worker entry file
      client: false,                          // false = server worker (bundled into workers/)
    }
  },
  moduleSuffixes: {          // (Optional) Custom module resolution suffixes
    client: ['.browser', '.web', ''],
    server: ['.node', '.server', '.web', '']
  },
  polyfills: {},             // (Optional) Polyfill options for Babel
  postcss: {},               // (Optional) PostCSS configuration
  options: {                 // (Optional) Webpack and build options
    resolve: {},             // Custom resolve options (e.g., alias)
    externals: {},           // Webpack externals
    plugins: [],             // Additional Webpack plugins
    module: {
      rules: []              // Additional Webpack module rules
    },
    server: {
      plugins: [],           // Server-specific plugins
      module: {
        rules: []            // Server-specific module rules
      }
    }
  }
};

TypeScript Setup

To enable JSX support with Frosty in TypeScript, update your tsconfig.json:

{
  "compilerOptions": {
    "jsx": "react-jsx",
    "jsxImportSource": "frosty"
  }
}

This configures TypeScript to use Frosty's JSX runtime.

Babel Setup

To use Frosty with Babel, add the following to your Babel config:

{
  "presets": [
    [
      "@babel/preset-react",
      {
        "runtime": "automatic",
        "importSource": "frosty"
      }
    ]
  ]
}

Contributing

We welcome contributions! Please open issues or submit pull requests.

License

MIT © O2ter Limited

Current Tags

  • 0.0.166                                ...           latest (a month ago)

164 Versions

  • 0.0.166                                ...           a month ago
  • 0.0.165                                ...           2 months ago
  • 0.0.164                                ...           2 months ago
  • 0.0.163                                ...           4 months ago
  • 0.0.162                                ...           4 months ago
  • 0.0.161                                ...           4 months ago
  • 0.0.160                                ...           4 months ago
  • 0.0.159                                ...           4 months ago
  • 0.0.158                                ...           4 months ago
  • 0.0.157                                ...           5 months ago
  • 0.0.156                                ...           5 months ago
  • 0.0.155                                ...           6 months ago
  • 0.0.154                                ...           6 months ago
  • 0.0.153                                ...           6 months ago
  • 0.0.152                                ...           6 months ago
  • 0.0.151                                ...           7 months ago
  • 0.0.150                                ...           7 months ago
  • 0.0.149                                ...           7 months ago
  • 0.0.148                                ...           7 months ago
  • 0.0.147                                ...           8 months ago
  • 0.0.146                                ...           8 months ago
  • 0.0.145                                ...           9 months ago
  • 0.0.144                                ...           9 months ago
  • 0.0.143                                ...           9 months ago
  • 0.0.142                                ...           9 months ago
  • 0.0.141                                ...           9 months ago
  • 0.0.140                                ...           9 months ago
  • 0.0.139                                ...           9 months ago
  • 0.0.138                                ...           9 months ago
  • 0.0.137                                ...           9 months ago
  • 0.0.136                                ...           9 months ago
  • 0.0.135                                ...           9 months ago
  • 0.0.134                                ...           10 months ago
  • 0.0.133                                ...           10 months ago
  • 0.0.132                                ...           10 months ago
  • 0.0.131                                ...           10 months ago
  • 0.0.130                                ...           10 months ago
  • 0.0.129                                ...           10 months ago
  • 0.0.128                                ...           10 months ago
  • 0.0.127                                ...           10 months ago
  • 0.0.126                                ...           10 months ago
  • 0.0.125                                ...           10 months ago
  • 0.0.124                                ...           10 months ago
  • 0.0.123                                ...           10 months ago
  • 0.0.122                                ...           10 months ago
  • 0.0.121                                ...           10 months ago
  • 0.0.120                                ...           a year ago
  • 0.0.119                                ...           a year ago
  • 0.0.118                                ...           a year ago
  • 0.0.117                                ...           a year ago
  • 0.0.116                                ...           a year ago
  • 0.0.115                                ...           a year ago
  • 0.0.114                                ...           a year ago
  • 0.0.113                                ...           a year ago
  • 0.0.112                                ...           a year ago
  • 0.0.111                                ...           a year ago
  • 0.0.110                                ...           a year ago
  • 0.0.109                                ...           a year ago
  • 0.0.108                                ...           a year ago
  • 0.0.107                                ...           a year ago
  • 0.0.106                                ...           a year ago
  • 0.0.105                                ...           a year ago
  • 0.0.104                                ...           a year ago
  • 0.0.103                                ...           a year ago
  • 0.0.102                                ...           a year ago
  • 0.0.101                                ...           a year ago
  • 0.0.100                                ...           a year ago
  • 0.0.99                                ...           a year ago
  • 0.0.98                                ...           a year ago
  • 0.0.97                                ...           a year ago
  • 0.0.96                                ...           a year ago
  • 0.0.95                                ...           a year ago
  • 0.0.94                                ...           a year ago
  • 0.0.93                                ...           a year ago
  • 0.0.92                                ...           a year ago
  • 0.0.91                                ...           a year ago
  • 0.0.90                                ...           a year ago
  • 0.0.89                                ...           a year ago
  • 0.0.88                                ...           a year ago
  • 0.0.87                                ...           a year ago
  • 0.0.86                                ...           a year ago
  • 0.0.85                                ...           a year ago
  • 0.0.84                                ...           a year ago
  • 0.0.83                                ...           a year ago
  • 0.0.82                                ...           a year ago
  • 0.0.81                                ...           a year ago
  • 0.0.80                                ...           a year ago
  • 0.0.79                                ...           a year ago
  • 0.0.78                                ...           a year ago
  • 0.0.77                                ...           a year ago
  • 0.0.76                                ...           a year ago
  • 0.0.75                                ...           a year ago
  • 0.0.74                                ...           a year ago
  • 0.0.73                                ...           a year ago
  • 0.0.72                                ...           a year ago
  • 0.0.71                                ...           a year ago
  • 0.0.70                                ...           a year ago
  • 0.0.69                                ...           a year ago
  • 0.0.68                                ...           a year ago
  • 0.0.67                                ...           a year ago
  • 0.0.66                                ...           a year ago
  • 0.0.65                                ...           a year ago
  • 0.0.62                                ...           a year ago
  • 0.0.61                                ...           a year ago
  • 0.0.60                                ...           a year ago
  • 0.0.59                                ...           a year ago
  • 0.0.58                                ...           a year ago
  • 0.0.57                                ...           a year ago
  • 0.0.56                                ...           a year ago
  • 0.0.55                                ...           a year ago
  • 0.0.54                                ...           a year ago
  • 0.0.53                                ...           a year ago
  • 0.0.52                                ...           a year ago
  • 0.0.51                                ...           a year ago
  • 0.0.50                                ...           a year ago
  • 0.0.49                                ...           a year ago
  • 0.0.48                                ...           a year ago
  • 0.0.47                                ...           a year ago
  • 0.0.46                                ...           a year ago
  • 0.0.45                                ...           a year ago
  • 0.0.44                                ...           a year ago
  • 0.0.43                                ...           a year ago
  • 0.0.42                                ...           a year ago
  • 0.0.41                                ...           a year ago
  • 0.0.40                                ...           a year ago
  • 0.0.39                                ...           a year ago
  • 0.0.38                                ...           a year ago
  • 0.0.37                                ...           a year ago
  • 0.0.36                                ...           a year ago
  • 0.0.35                                ...           a year ago
  • 0.0.34                                ...           a year ago
  • 0.0.33                                ...           a year ago
  • 0.0.32                                ...           a year ago
  • 0.0.31                                ...           a year ago
  • 0.0.30                                ...           a year ago
  • 0.0.29                                ...           a year ago
  • 0.0.28                                ...           a year ago
  • 0.0.27                                ...           a year ago
  • 0.0.26                                ...           a year ago
  • 0.0.25                                ...           a year ago
  • 0.0.24                                ...           a year ago
  • 0.0.23                                ...           a year ago
  • 0.0.22                                ...           a year ago
  • 0.0.21                                ...           a year ago
  • 0.0.20                                ...           a year ago
  • 0.0.19                                ...           a year ago
  • 0.0.18                                ...           a year ago
  • 0.0.17                                ...           a year ago
  • 0.0.16                                ...           a year ago
  • 0.0.15                                ...           a year ago
  • 0.0.14                                ...           2 years ago
  • 0.0.13                                ...           2 years ago
  • 0.0.12                                ...           2 years ago
  • 0.0.11                                ...           2 years ago
  • 0.0.10                                ...           2 years ago
  • 0.0.9                                ...           2 years ago
  • 0.0.8                                ...           2 years ago
  • 0.0.7                                ...           2 years ago
  • 0.0.6                                ...           2 years ago
  • 0.0.5                                ...           2 years ago
  • 0.0.4                                ...           2 years ago
  • 0.0.3                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Total 580
Today 0
This Week 11
This Month 381
Last Day 0
Last Week 0
Last Month 156
Dependencies (12)
Dev Dependencies (24)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE