{"id":18332495,"url":"https://github.com/cellular/cellular-scripts","last_synced_at":"2026-02-02T21:42:00.862Z","repository":{"id":57195674,"uuid":"118005812","full_name":"cellular/cellular-scripts","owner":"cellular","description":"Drop-in replacement for react-scripts with custom config options","archived":false,"fork":false,"pushed_at":"2020-06-02T23:46:56.000Z","size":370,"stargazers_count":2,"open_issues_count":24,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-07T02:36:25.750Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cellular.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-18T16:07:58.000Z","updated_at":"2019-04-23T09:27:33.000Z","dependencies_parsed_at":"2022-09-16T12:12:35.583Z","dependency_job_id":null,"html_url":"https://github.com/cellular/cellular-scripts","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cellular%2Fcellular-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cellular%2Fcellular-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cellular%2Fcellular-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cellular%2Fcellular-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cellular","download_url":"https://codeload.github.com/cellular/cellular-scripts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245615024,"owners_count":20644378,"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":"2024-11-05T19:39:13.754Z","updated_at":"2026-02-02T21:41:55.840Z","avatar_url":"https://github.com/cellular.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DEPRECATED ⚠️\n\nThis package is no longer maintained. Please use `npx create-react-app my-app --typescript` instead.\n\n---\n\n[![Build Status](https://travis-ci.org/cellular/cellular-scripts.svg?branch=master)](https://travis-ci.org/cellular/cellular-scripts)\n[![Greenkeeper badge](https://badges.greenkeeper.io/cellular/cellular-scripts.svg)](https://greenkeeper.io/)\n[![version](https://img.shields.io/npm/v/cellular-scripts.svg)](http://npm.im/cellular-scripts)\n\nThis is a drop-in replacement for react-scripts that allows you to optionally provide custom configurations for webpack, Babel, ESLint, prettier, lint-staged and Jest.\n\n# Setup\n\n## Quickstart\n\nYou can bootstrap new projects via [create-react-app](https://github.com/facebookincubator/create-react-app):\n\n```\nnpx create-react-app --scripts-version cellular-scripts myapp\ncd myapp\nnpm start\n```\n\n## Existing projects\n\nFor existing projects run `npm i -D cellular-scripts`, remove all the devDependencies that are already provided by `cellular-scripts` and modify the scripts section of your package.json:\n\n```json\n{\n    \"scripts\": {\n        \"start\": \"cs start\",\n        \"build\": \"cs build\",\n        \"serve\": \"cs serve\",\n        \"test\": \"cs test\",\n        \"lint\": \"cs lint\",\n        \"precommit\": \"cs precommit\",\n        \"postmerge\": \"cs postmerge\"\n    }\n}\n```\n\n__Note__: The `precommit` and `postmerge` npm-scripts are Git-hooks that will be run by [husky](https://github.com/typicode/husky).\n\nModify your [webpack](#webpack), [Babel](#babel) and [ESLint](#eslint) config files to extend the settings that come with `cellular-scripts` or remove your config files altogether if the defaults work for your project.\n\n# CLI\n\nThe `cellular-scripts` package provides a binary called `cs` that takes the name of a script as first argument:\n\n* `cs start [options]`\n  Starts a development server. Options are passed to [webpack-dev-server](https://webpack.js.org/configuration/dev-server/).\n* `cs build [options]` Creates a production build. Options are passed to [webpack](https://webpack.js.org/api/cli/).\n* `cs serve` Serves a previously built production version. Same options as `start`.\n* `cs test [options]` Runs the test. Options are passed on to [Jest](https://facebook.github.io/jest/docs/en/cli.html)\n* `cs lint [options]` Runs the linter. Options are passed to [ESLint](https://eslint.org/docs/user-guide/command-line-interface).\n* `cs precommit` Runs [lint-staged](#lint-staged).\n* `cs postmerge` Runs [install-deps-postmerge](https://github.com/camacho/install-deps-postmerge).\n\nWhen run via npm use `--` to pass options on to the script:\n\n```\nnpm start -- --port 8080 --open\n```\n\n\n# Configuration\n\n## Directories\n\nThe directory layout can be customized via your project's package.json:\n\n```json\n{\n    \"directories\": {\n        \"src\": \"src\",\n        \"dist\": \"dist\",\n        \"static\": \"static\",\n        \"template\": \"static\"\n    }\n}\n```\n\n* `src` where the source files are located. `src/index.js` is the default webpack entry.\n* `dist` where webpack will place the output of production builds.\n* `static` files that will be [copied](https://www.npmjs.com/package/copy-webpack-plugin) to `dist` verbatim.\n* `template` directory containing an `index.html` that will be processed by the [html-webpack-plugin](https://webpack.js.org/plugins/html-webpack-plugin/).\n\n## Webpack\n\nYou can provide a custom webpack configuration by placing a `webpack.config.js` file in your project's root directory.\n\nYou can modify the default configuration like this:\n\n```js\nconst webpackConfig = require('cellular-scripts/webpack');\n\nmodule.exports = function(env) {\n    const config = webpackConfig(env);\n    // modify default config and return it\n    return config;\n}\n```\n\nThe passed in `env` is either `{prod: true}` or `{dev: true}` depending on the script that was used (build or start).\n\nMake sure to pass this information on to the `webpackConfig` function.\n\nYou can pass additional environment entries\nwhich will be exposed via the webpack [DefinePlugin](https://webpack.js.org/plugins/define-plugin/):\n\n```js\nmodule.exports = function(env) {\n    return webpackConfig({\n        ...env,\n        FOO: null, // will be set to process.env.FOO\n        BAR: 'bar', // defaults to 'bar'\n    });\n});\n```\n\nBoth values can be overwritten by setting environment variables.\n\n## Babel\n\nUnder the hood [babel-preset-cellular](https://www.npmjs.com/package/babel-preset-cellular) is used to transpile the source code.\n\nFiles under `node_modules` are run through Babel too, but with a much simpler configuration that only applies `babel-preset-env`.\n\n### Custom Babel Configuration\n\nYou can override the default configuration by placing a `.babelrc` file in your project's root or by adding a `babel` property to `package.json`.\n\nTo extend the default config, add it as a preset:\n\n```json\n{\n    \"presets\": [\"cellular-scripts/babel\"]\n}\n```\n\n## ESLint\n\nYou can override the default configuration by placing a `.eslintrc.js` file in your project's root or by adding a `eslintConfig` property to `package.json`.\n\nThe presence of such a file will also allow IDEs to pick up your configuration, which is why our `create-react-app` template will create the following `.eslintrc.js`:\n\n```js\nmodule.exports = {\n  extends: [\n    require.resolve('cellular-scripts/eslint')\n  ]\n};\n```\n\n__NOTE:__ The default config won't work if `cellular-scripts` are npm-linked or installed with an older npm version that doesn't flatten the dependency tree. See this [GitHub issue](https://github.com/eslint/eslint/issues/3458) for details.\n\n## Prettier\n\nYou can override the default configuration by placing a `.prettierrc` or `.prettier.config.js` file in your project's root or by adding a `prettier` property to `package.json`.\n\nThe default configuration is:\n\n```json\n{ \n    \"singleQuote\": true,\n    \"trailingComma\": \"es5\"\n}\n```\n\n## lint-staged\n\nBy default lint-staged will run `cs lint --fix` and optionally `flow focused-check` (if flow-bin is a dependency) followed by `git add` on all staged `.js`, `.mjs` and `.jsx` files.\n\nYou can override the default configuration by placing a `.lintstagedrc` or `.lint-staged.config.js` file in your project's root or by adding a `lint-staged` property to `package.json`:\n\n```js\nconst defaults = require('cellular-lint/lint-staged.config');\nmodule.exports = Object.assign({}, defaults, {\n  // custom config  \n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcellular%2Fcellular-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcellular%2Fcellular-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcellular%2Fcellular-scripts/lists"}