{"name":"frosty","version":"0.0.1","author":{"name":"Susan Cheng","email":"susan.doggie@gmail.com"},"license":"MIT","_id":"frosty@0.0.1","maintainers":[{"name":"susandoggie","email":"susan.doggie@gmail.com"}],"homepage":"https://github.com/o2ter/snow#readme","bugs":{"url":"https://github.com/o2ter/snow/issues"},"dist":{"shasum":"437e205a2b8a696eb6d1ad4e9c6d556a382ab554","tarball":"http://registry-npm.ywwl.com/frosty/download/frosty-0.0.1.tgz","fileCount":20,"integrity":"sha512-haVLr6mxrrM7c7qutW4WF3e9zgjQmFC0BjEJ6chLmU9Il7fdeyXlynHdSQW55o+M/jcUh+SWysj8npLZL7Mkkg==","signatures":[{"sig":"MEUCIGFN/exQUEh+y+pwpHtGd8pwMLhvBRA4b7cHF6WUGu7lAiEAiGNlzMrELWeKna2CcfLD3xj6RUsPcLv+gcTFFN85W7g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":551840,"size":16210,"noattachment":false,"key":"/frosty/-/frosty-0.0.1.tgz"},"main":"dist/index","types":"dist/index","module":"dist/index","gitHead":"6bd06273c222f00ac4cabf31f4211045603d31a6","scripts":{"test":"jest","clean":"rm -rf ./dist/*","rollup":"yarn clean && rollup -c"},"_npmUser":{"name":"susandoggie","email":"susan.doggie@gmail.com"},"repository":{"url":"git+https://github.com/o2ter/snow.git","type":"git"},"_npmVersion":"10.9.2","directories":{},"_nodeVersion":"22.14.0","dependencies":{"lodash":">=4.17.21","@o2ter/utils-js":"^0.0.18"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","tslib":"^2.8.1","rollup":"^4.22.4","ts-jest":"^29.2.5","ts-node":"^10.9.2","babel-jest":"^29.7.0","typescript":"^5.7.3","@babel/core":"^7.24.5","@types/lodash":"^4.17.4","@babel/preset-env":"^7.24.5","rollup-plugin-dts":"^6.1.1","@rollup/plugin-json":"^6.1.0","@rollup/plugin-babel":"^6.0.4","@rollup/plugin-commonjs":"^25.0.7","@babel/preset-typescript":"^7.24.1","@rollup/plugin-typescript":"^11.1.6","@rollup/plugin-node-resolve":"^15.2.3"},"_npmOperationalInternal":{"tmp":"tmp/frosty_0.0.1_1740577563687_0.9955059230899344","host":"s3://npm-registry-packages-npm-production"},"readme":"# Frosty\n\nA fast, flexible, and modern JSX-based UI library.\n\n## Features\n\n- ⚡ Fast rendering and reconciliation\n- 🧩 Flexible component model\n- 🎨 Built-in style and CSS support\n- 🪝 Modern hooks API\n- 🌐 SSR-ready (Server-side rendering)\n\n## Installation\n\nInstall Frosty using npm:\n\n```sh\nnpm install frosty\n```\n\n## Quick Start\n\nHere's a simple example to get you started:\n\n```tsx\nimport { useState } from 'frosty';\n\nfunction App() {\n  const [count, setCount] = useState(0);\n  return (\n    <div>\n      <h1>Hello, Frosty!</h1>\n      <p>You clicked {count} times</p>\n      <button onClick={() => setCount(count + 1)}>\n        Count: {count}\n      </button>\n    </div>\n  );\n}\n\nexport default App;\n```\n\nSee the [comprehensive documentation](./docs) for detailed guides, API reference, and advanced usage patterns.\n\n## Application Entry Point\n\nYour 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.\n\n```tsx\n// app.tsx or app.js\nimport { useState } from 'frosty';\n\nfunction MyApp() {\n  // Your application logic here\n  return <div>Hello World!</div>;\n}\n\n// Required: Export your root component as default\nexport default MyApp;\n```\n\nThis default export pattern ensures that:\n- Frosty CLI can automatically detect your application component\n- Server-side rendering (SSR) works correctly\n- Client-side hydration functions properly\n- Your app integrates seamlessly with the Frosty build system\n\n## Usage\n\nTo run your app with Frosty CLI using `npx`:\n\n```sh\nnpx frosty run app.js\n```\n\n### Common Options\n\n- `-w, --watch`   Enable watch mode (rebuild on file changes)\n- `-d, --debug`   Enable debug mode (development build)\n- `-p, --port <port>` Specify server port (default: 8080)\n- `-c, --configuration <file>` Use a custom config file (default: server.config.js)\n- `-s, --src <dir>`  Specify source directory\n- `-o, --output <dir>` Specify output directory\n\n### Example Commands\n\nStart your app in development mode with watch:\n\n```sh\nnpx frosty run --watch --debug app.js\n```\n\nRun with a custom port and config:\n\n```sh\nnpx frosty run --port 3000 --configuration my.config.js app.js\n```\n\nSee `npx frosty run --help` for the full list of options.\n\n### Configuration File (Optional)\n\nCustomize build and server behavior with a `server.config.js` file in your project root.\n\n- You may export an object or a function `(env, argv) => config`.\n- All fields are optional.\n\n```js\nmodule.exports = {\n  src: 'src',                // Source directory\n  output: 'dist',            // Output directory\n  serverEntry: 'server.js',  // Server entry file\n  client: {                  // (Optional) Client entry points\n    main: {\n      entry: 'src/app.js',   // Path to client entry file\n      basepath: '/',         // (Optional) URL base path for this entry\n    }\n  },\n  workers: {                 // (Optional) Worker entry points\n    myClientWorker: {\n      entry: 'src/workers/myClientWorker.js', // Path to worker entry file\n      client: true,                           // true = browser worker (bundled into public/workers/)\n    },\n    myServerWorker: {\n      entry: 'src/workers/myServerWorker.js', // Path to worker entry file\n      client: false,                          // false = server worker (bundled into workers/)\n    }\n  },\n  moduleSuffixes: {          // (Optional) Custom module resolution suffixes\n    client: ['.browser', '.web', ''],\n    server: ['.node', '.server', '.web', '']\n  },\n  polyfills: {},             // (Optional) Polyfill options for Babel\n  postcss: {},               // (Optional) PostCSS configuration\n  options: {                 // (Optional) Webpack and build options\n    resolve: {},             // Custom resolve options (e.g., alias)\n    externals: {},           // Webpack externals\n    plugins: [],             // Additional Webpack plugins\n    module: {\n      rules: []              // Additional Webpack module rules\n    },\n    server: {\n      plugins: [],           // Server-specific plugins\n      module: {\n        rules: []            // Server-specific module rules\n      }\n    }\n  }\n};\n```\n\n## TypeScript Setup\n\nTo enable JSX support with Frosty in TypeScript, update your `tsconfig.json`:\n\n```json\n{\n  \"compilerOptions\": {\n    \"jsx\": \"react-jsx\",\n    \"jsxImportSource\": \"frosty\"\n  }\n}\n```\n\nThis configures TypeScript to use Frosty's JSX runtime.\n\n## Babel Setup\n\nTo use Frosty with Babel, add the following to your Babel config:\n\n```json\n{\n  \"presets\": [\n    [\n      \"@babel/preset-react\",\n      {\n        \"runtime\": \"automatic\",\n        \"importSource\": \"frosty\"\n      }\n    ]\n  ]\n}\n```\n\n## Contributing\n\nWe welcome contributions! Please open issues or submit pull requests.\n\n## License\n\nMIT © O2ter Limited\n","publish_time":1740577563946,"_cnpm_publish_time":1740577563946,"dist-tags":{"latest":"0.0.166"}}