{"id":25621831,"url":"https://github.com/grovertb/cralib","last_synced_at":"2025-10-23T18:04:31.297Z","repository":{"id":36473207,"uuid":"220335311","full_name":"grovertb/cralib","owner":"grovertb","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-03T05:11:50.000Z","size":512,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-16T09:18:56.771Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grovertb.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-07T21:50:08.000Z","updated_at":"2022-06-10T15:08:32.000Z","dependencies_parsed_at":"2023-01-17T02:01:04.779Z","dependency_job_id":null,"html_url":"https://github.com/grovertb/cralib","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grovertb%2Fcralib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grovertb%2Fcralib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grovertb%2Fcralib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grovertb%2Fcralib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grovertb","download_url":"https://codeload.github.com/grovertb/cralib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240156672,"owners_count":19756815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-22T09:49:39.475Z","updated_at":"2025-10-23T18:04:31.186Z","avatar_url":"https://github.com/grovertb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cralib\n\n\u003e CLI for creating reusable, modern React libraries using Rollup and create-react-app.\n\n[![NPM](https://img.shields.io/npm/v/cralib.svg)](https://www.npmjs.com/package/cralib) [![Build Status](https://travis-ci.com/transitive-bullshit/cralib.svg?branch=master)](https://travis-ci.com/transitive-bullshit/cralib) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n\n## Intro\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"600\" src=\"https://raw.githubusercontent.com/grovertb/cralib/master/media/demo.svg?sanitize=true\"\u003e\n\u003c/p\u003e\n\n\n## Features\n\n- Easy-to-use CLI\n- Handles all modern JS features\n- Bundles `cjs` and `es` module formats\n- [create-react-app](https://github.com/facebookincubator/create-react-app) for example usage and local dev\n- [Rollup](https://rollupjs.org/) for bundling\n- [Babel](https://babeljs.io/) for transpiling\n- Supports complicated peer-dependencies\n- Hundreds of public modules created\n- Thorough documentation :heart_eyes:\n\n\n## Install globally\n\nThis package requires `node \u003e= 4`, but we recommend `node \u003e= 8`.\n\n```bash\nnpm install -g cralib\n```\n\n## Usage with npx\n\n```bash\nnpx cralib\n```\n\n_([npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) comes with npm 5.2+ and higher, see [instructions for older npm versions](https://gist.github.com/gaearon/4064d3c23a77c74a3614c498a8bb1c5f))_\n\n## Creating a New Module\n\n```bash\ncralib\n```\n\nAnswer some basic prompts about your module, and then the CLI will perform the following steps:\n- copy over the template\n- install dependencies via yarn or npm\n- link packages together for local development\n- initialize local git repo\n\nAt this point, your new module should resemble this screenshot and is all setup for local development.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"600\" src=\"https://cdn.rawgit.com/grovertb/cralib/master/media/tree.svg\"\u003e\n\u003c/p\u003e\n\n\nNow, anytime you make a change to your library in `packages/library/src/` or to the example app's `example/src`, `create-react-app` will live-reload your local dev server so you can iterate on your component in real-time.\n\n#### Publishing to npm\n\n```bash\nnpm publish\n```\n\nThis builds `cjs` and `es` versions of your module to `dist/` and then publishes your module to `npm`.\n\nMake sure that any npm modules you want as peer dependencies are properly marked as `peerDependencies` in `package.json`. The rollup config will automatically recognize them as peers and not try to bundle them in your module.\n\n\n#### Deploying to Github Pages\n\n```bash\nnpm run deploy\n```\n\nThis creates a production build of the example `create-react-app` that showcases your library and then runs `gh-pages` to deploy the resulting bundle.\n\n\n## License\n\nMIT © [GroverTB](https://github.com/grovertb)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrovertb%2Fcralib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrovertb%2Fcralib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrovertb%2Fcralib/lists"}