{"name":"frosty","version":"0.0.30","author":{"name":"Susan Cheng","email":"susan.doggie@gmail.com"},"license":"MIT","_id":"frosty@0.0.30","maintainers":[{"name":"susandoggie","email":"susan.doggie@gmail.com"}],"homepage":"https://github.com/o2ter/frosty#readme","bugs":{"url":"https://github.com/o2ter/frosty/issues"},"dist":{"shasum":"7e6123b91fc3de7a973b483ab4d1dd2ba42ba78f","tarball":"http://registry-npm.ywwl.com/frosty/download/frosty-0.0.30.tgz","fileCount":72,"integrity":"sha512-gNVwG2EmMrdlQNZid6pVBN5Y2ofuASH0B7e0LOTQ6YshrIXM8zO0jrvCLsWRcVmO9asnljEA3Dy67IXvYjLykw==","signatures":[{"sig":"MEUCIQCfl7BfCPZFFEQcT9DSdQnJCu7C+nFj69V9tH3m0MfajAIgJUYrvuObRAy6TCPWA4BS8u1V5MmT698HtAjMf8VUxtQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1255271,"size":155369,"noattachment":false,"key":"/frosty/-/frosty-0.0.30.tgz"},"main":"dist/index","types":"dist/index","module":"dist/index","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"./*":{"import":{"types":"./dist/*.d.ts","default":"./dist/*.mjs"},"require":{"types":"./dist/*.d.ts","default":"./dist/*.js"}}},"gitHead":"f253ac81c41cb7d3773ab53c5db3224ca1349b64","scripts":{"test":"jest","clean":"rm -rf ./dist/*","start":"rm -rf ./tests/server/dist/* && npm-run-all --parallel watch:*","rollup":"yarn clean && rollup -c","gen-data":"node ./scripts/gen-data.mjs","watch:build":"./tests/server/bin/build.sh -w","watch:start":"until [ -f ./tests/server/dist/server.js ]; do sleep 1; done && nodemon --watch ./tests/server/dist ./tests/server/dist/server.js"},"_npmUser":{"name":"susandoggie","actor":{"name":"susandoggie","type":"user","email":"susan.doggie@gmail.com"},"email":"susan.doggie@gmail.com"},"repository":{"url":"git+https://github.com/o2ter/frosty.git","type":"git"},"_npmVersion":"10.9.2","directories":{},"_nodeVersion":"22.16.0","dependencies":{"jsdom":"^26.0.0","lodash":">=4.17.21","csstype":"^3.1.3","nextick":"^0.0.2","postcss":"^8.5.3","myers.js":"^0.0.19","postcss-js":"^4.0.1","@types/jsdom":"^21.1.7","autoprefixer":"^10.4.21","@types/lodash":"^4.17.16","postcss-nested":"^7.0.2","@o2ter/utils-js":"^0.0.19"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","tslib":"^2.8.1","rollup":"^4.22.4","core-js":"^3.41.0","nodemon":"^3.1.9","ts-jest":"^29.2.5","ts-node":"^10.9.2","webidl2":"^24.4.1","webpack":"^5.98.0","babel-jest":"^29.7.0","typescript":"^5.7.3","@babel/core":"^7.24.5","@webref/css":"^6.20.4","@webref/idl":"^3.61.1","npm-run-all":"^4.1.5","webpack-cli":"^6.0.1","babel-loader":"^10.0.0","@webref/events":"^1.18.3","dotenv-webpack":"^8.1.0","@o2ter/server-js":"^0.0.20","@webref/elements":"^2.4.0","@babel/preset-env":"^7.24.5","@types/postcss-js":"^4.0.4","rollup-plugin-dts":"^6.1.1","@babel/preset-react":"^7.26.3","@rollup/plugin-json":"^6.1.0","@rollup/plugin-babel":"^6.0.4","svg-element-attributes":"^2.1.0","@rollup/plugin-commonjs":"^25.0.7","html-element-attributes":"^3.4.0","@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.30_1751007049582_0.642285100056351","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":1751007049820,"_cnpm_publish_time":1751007049820,"dist-tags":{"latest":"0.0.166"}}