{"id":16171363,"url":"https://github.com/maniator/test-context","last_synced_at":"2026-01-21T02:02:18.203Z","repository":{"id":39673571,"uuid":"142062068","full_name":"maniator/test-context","owner":"maniator","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-20T10:13:01.000Z","size":166,"stargazers_count":1,"open_issues_count":73,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-20T19:39:19.526Z","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/maniator.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-07-23T19:50:23.000Z","updated_at":"2021-03-12T13:21:02.000Z","dependencies_parsed_at":"2024-01-09T18:27:45.044Z","dependency_job_id":"46326ae6-4b21-4e1c-a651-5425c67bc7d6","html_url":"https://github.com/maniator/test-context","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maniator/test-context","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maniator%2Ftest-context","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maniator%2Ftest-context/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maniator%2Ftest-context/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maniator%2Ftest-context/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maniator","download_url":"https://codeload.github.com/maniator/test-context/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maniator%2Ftest-context/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28622472,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T23:49:58.628Z","status":"online","status_checked_at":"2026-01-21T02:00:08.227Z","response_time":86,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-10T03:21:53.612Z","updated_at":"2026-01-21T02:02:18.169Z","avatar_url":"https://github.com/maniator.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![repo-banner](https://user-images.githubusercontent.com/4060187/28923990-050a32d4-782e-11e7-9da7-574ce5a8b455.png)\n\n[![CircleCI](https://circleci.com/gh/jaredpalmer/razzle/tree/master.svg?style=svg)](https://circleci.com/gh/jaredpalmer/razzle/tree/master) ![Razzle-status](https://david-dm.org/jaredpalmer/razzle.svg?path=packages/razzle) [![npm version](https://badge.fury.io/js/razzle.svg)](https://badge.fury.io/js/razzle)\n\nUniversal JavaScript applications are tough to setup. Either you buy into a framework like [Next.js](https://github.com/zeit/next.js) or [react-server](https://github.com/redfin/react-server), fork a boilerplate, or set things up yourself. Razzle aims to fill this void by abstracting all the required tooling for your universal JavaScript application into a single dependency, and then leaving the rest of the architectural decisions about frameworks, routing, and data fetching up to you.\n\n**Razzle comes with the \"battery-pack included\"**:\n\n- :fire: Universal Hot Module Replacement, so both the client and server update whenever you make edits. No annoying restarts necessary\n- Comes with your favorite ES6 JavaScript goodies (through `babel-preset-razzle`)\n- Comes with the same CSS setup as [create-react-app](https://github.com/facebookincubator/create-react-app) \n- Works with [React](https://github.com/facebook/react), [Preact](https://github.com/developit/preact), [Elm](http://elm-lang.org/),  [Reason-React](https://github.com/jaredpalmer/razzle/tree/master/examples/with-reason-react), [Inferno](https://github.com/infernojs), and [Rax](https://github.com/alibaba/rax) as well as [Angular](https://github.com/angular/angular) and [Vue](https://github.com/vuejs/vue) if that's your thing\n- Escape hatches for customization via `.babelrc` and `razzle.config.js`\n- [Jest](https://github.com/facebook/jest) test runner setup with sensible defaults via `razzle test`\n\n\n## Quick Start\n\n```bash\nnpm install -g create-razzle-app\n\ncreate-razzle-app my-app\ncd my-app\nnpm start\n```\n\nThen open http://localhost:3000/ to see your app. Your console should look like this:\n\n\u003cimg src=\"https://cloud.githubusercontent.com/assets/4060187/26324663/b31788c4-3f01-11e7-8e6f-ffa48533af54.png\" width=\"500px\" alt=\"Razzle Development Mode\"/\u003e\n\n**That's it**. You don't need to worry about setting up multiple webpack configs or other build tools. Just start editing `src/App.js` and go!\n\nBelow is a list of commands you will probably find useful.\n\n### `npm start` or `yarn start` \n\nRuns the project in development mode.   \nYou can view your application at `http://localhost:3000`\n\nThe page will reload if you make edits.\n\n### `npm run build` or `yarn build`\nBuilds the app for production to the build folder.      \n\nThe build is minified and the filenames include the hashes.\nYour app is ready to be deployed!\n\n### `npm run start:prod` or `yarn start:prod`\nRuns the compiled app in production.\n\nYou can again view your application at `http://localhost:3000`\n\n### `npm test` or `yarn test`\n\nRuns the test watcher (Jest) in an interactive mode.\nBy default, runs tests related to files changed since the last commit.\n\n### `npm start -- --inspect` or `yarn start -- --inspect`\n\nTo debug the node server, you can use `razzle start --inspect`. This will start the node server and enable the inspector agent. For more information, see [this](https://nodejs.org/en/docs/inspector/).\n\n### `npm start -- --inspect-brk` or `yarn start -- --inspect-brk`\n\nTo debug the node server, you can use `razzle start --inspect-brk`. This will start the node server, enable the inspector agent and Break before user code starts. For more information, see [this](https://nodejs.org/en/docs/inspector/).\n\n---\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n**Table of Contents**\n\n- [Customization](#customization)\n  - [Extending Babel Config](#extending-babel-config)\n  - [Extending Webpack](#extending-webpack)\n  - [Environment Variables](#environment-variables)\n  - [Adding Temporary Environment Variables In Your Shell](#adding-temporary-environment-variables-in-your-shell)\n    - [Windows (cmd.exe)](#windows-cmdexe)\n    - [Linux, macOS (Bash)](#linux-macos-bash)\n  - [Adding Environment Variables In `.env`](#adding-environment-variables-in-env)\n    - [What other `.env` files are can be used?](#what-other-env-files-are-can-be-used)\n- [How Razzle works (the secret sauce)](#how-razzle-works-the-secret-sauce)\n- [Inspiration](#inspiration)\n    - [Author](#author)\n- [Contributors](#contributors)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## CSS\n### Css Modules\nRazzle supports both normal CSS and Css modules, you can read more about the module [here](https://github.com/css-modules/css-modules)\nCheck `src/Home.js` for both approaches. If you import from a `module.css` file make sure to get use the default object that gets imported to access the classNames. F.e.\n```\nimport styles from './Home.module.css'\n\n\u003cdiv className={styles.div}\u003e{children}\u003c/div\u003e\n```\n\nIf you would like not to use CSS modules just import you css the following way and use the classNames as before. Make sure to scope them manually:\n\n```\nimport './Home.css'\n\n\u003cdiv className=\"Home-div\"\u003e{children}\u003c/div\u003e\n```\n\n## Customization\n\n### Extending Babel Config\n\nRazzle comes with most of ES6 stuff you need. However, if you want to add your own babel transformations, just add a `.babelrc` file to the root of your project. \n\n```json\n{\n  \"presets\": [\n    \"razzle/babel\",\n    \"stage-0\"\n   ]\n}\n```\n\n### Extending Webpack\n\nYou can also extend the underlying webpack config. Create a file called `razzle.config.js` in your project's root. \n\n```js\n// razzle.config.js\n\nmodule.exports = {\n  modify: (config, {target, dev}, webpack) =\u003e {\n    // do something to config\n  \n    return config\n  }\n}\n```\n\nA word of advice: `razzle.config.js` is an escape hatch. However, since it's just JavaScript, you can and should publish your `modify` function to npm to make it reusable across your projects. For example, imagine you added some custom webpack loaders and published it as a package to npm as `my-razzle-modifictions`. You could then write your `razzle.config.js` like so:\n\n```\n// razzle.config.js\nconst modify = require('my-razzle-modifictions');\n\nmodule.exports = {\n  modify\n}\n```\n\nLast but not least, if you find yourself needing a more customized setup, Razzle is _very_ forkable. There is one webpack configuration factory that is 300 lines of code, and 4 scripts (`build`, `start`, `test`, and `init`). The paths setup is shamelessly taken from [create-react-app](https://github.com/facebookincubator/create-react-app), and the rest of the code related to logging.\n\n### Environment Variables \n\n**The environment variables are embedded during the build time.** Since Razzle produces a static HTML/CSS/JS bundle and an equivalent static bundle for your server, it cannot possibly read them at runtime. \n\n- `process.env.RAZZLE_PUBLIC_DIR`: Path to the public directory.\n- `process.env.RAZZLE_ASSETS_MANIFEST`: Path to a file containing compiled asset outputs\n- `process.env.REACT_DEV_BUNDLE_PATH`: Relative path to where React will be bundled during development. Unless you are modifying the output path of your webpack config, you can safely ignore this. This path is used by `react-error-overlay` and webpack to power up the fancy runtime error iframe. For example, if you are using common chunks and an extra entry to create a vendor bundle with stuff like react, react-dom, react-router, etc. called `vendor.js`, and you've changed webpack's output to `[name].js` in development, you'd want to set this environment variable to `/static/js/vendor.js`. If you do not make this change, nothing bad will happen, you will simply not get the cool error overlay when there are runtime errors. You'll just see them in the console. Note: This does not impact production bundling.\n- `process.env.VERBOSE`: default is false, setting this to true will not clear the console when you make edits in development (useful for debugging).\n- `process.env.PORT`: default is `3000`, unless changed\n- `process.env.HOST`: default is `0.0.0.0`\n- `process.env.NODE_ENV`: `'development'` or `'production'`\n- `process.env.BUILD_TARGET`: either `'client'` or `'server'`\n\nYou can create your own custom build-time environment variables. They must start\nwith `RAZZLE_`. Any other variables except the ones listed above will be ignored to avoid accidentally exposing a private key on the machine that could have the same name. Changing any environment variables will require you to restart the development server if it is running.\n\nThese environment variables will be defined for you on `process.env`. For example, having an environment variable named `RAZZLE_SECRET_CODE` will be exposed in your JS as `process.env.RAZZLE_SECRET_CODE`.\n\n### Adding Temporary Environment Variables In Your Shell\n\nDefining environment variables can vary between OSes. It’s also important to know that this manner is temporary for the\nlife of the shell session.\n\n#### Windows (cmd.exe)\n\n```cmd\nset RAZZLE_SECRET_CODE=abcdef\u0026\u0026npm start\n```\n\n(Note: the lack of whitespace is intentional.)\n\n#### Linux, macOS (Bash)\n\n```bash\nRAZZLE_SECRET_CODE=abcdef npm start\n```\n\n### Adding Environment Variables In `.env`\n\nTo define permanent environment variables, create a file called .env in the root of your project:\n\n```\nRAZZLE_SECRET_CODE=abcdef\n```\n\n#### What other `.env` files are can be used?\n\n* `.env`: Default.\n* `.env.local`: Local overrides. **This file is loaded for all environments except test.**\n* `.env.development`, `.env.test`, `.env.production`: Environment-specific settings.\n* `.env.development.local`, `.env.test.local`, `.env.production.local`: Local overrides of environment-specific settings.\n\nFiles on the left have more priority than files on the right:\n\n* `npm start`: `.env.development.local`, `.env.development`, `.env.local`, `.env`\n* `npm run build`: `.env.production.local`, `.env.production`, `.env.local`, `.env`\n* `npm test`: `.env.test.local`, `.env.test`, `.env` (note `.env.local` is missing)\n\nThese variables will act as the defaults if the machine does not explicitly set them.\u003cbr\u003e\nPlease refer to the [dotenv documentation](https://github.com/motdotla/dotenv) for more details.\n\n\u003eNote: If you are defining environment variables for development, your CI and/or hosting platform will most likely need\nthese defined as well. Consult their documentation how to do this. For example, see the documentation for [Travis CI](https://docs.travis-ci.com/user/environment-variables/) or [Heroku](https://devcenter.heroku.com/articles/config-vars).\n\n## How Razzle works (the secret sauce)\n\n**tl;dr**: 2 configs, 2 ports, 2 webpack instances, both watching and hot reloading the same filesystem, in parallel during development and a little `webpack.output.publicPath` magic.\n\nIn development mode (`razzle start`), Razzle bundles both your client and server code using two different webpack instances running with Hot Module Replacement in parallel. While your server is bundled and run on whatever port your specify in `src/index.js` (`3000` is the default), the client bundle (i.e. entry point at `src/client.js`) is served via `webpack-dev-server` on a different port (`3001` by default) with its `publicPath` explicitly set to `localhost:3001` (and not `/` like many other setups do). Then the server's html template just points to the absolute url of the client JS: `localhost:3001/static/js/client.js`. Since both webpack instances watch the same files, whenever you make edits, they hot reload at _exactly_ the same time. Best of all, because they use the same code, the same webpack loaders, and the same babel transformations, you never run into a React checksum mismatch error.\n\n## Inspiration\n\n- [palmerhq/backpack](https://github.com/palmerhq/backpack)\n- [nytimes/kyt](https://github.com/nytimes/kyt)\n- [facebookincubator/create-react-app](https://github.com/facebookincubator/create-react-app)\n- [humblespark/sambell](https://github.com/humblespark/sambell)\n- [zeit/next.js](https://github.com/zeit/next.js)\n\n\n#### Author\n- [Jared Palmer](https://twitter.com/jaredpalmer)\n\n---\nMIT License\n\n## Contributors\n\nThanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n| [\u003cimg src=\"https://avatars2.githubusercontent.com/u/4060187?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003eJared Palmer\u003c/sub\u003e](http://jaredpalmer.com)\u003cbr /\u003e[💬](#question-jaredpalmer \"Answering Questions\") [💻](https://github.com/jaredpalmer/razzle/commits?author=jaredpalmer \"Code\") [🎨](#design-jaredpalmer \"Design\") [📖](https://github.com/jaredpalmer/razzle/commits?author=jaredpalmer \"Documentation\") [💡](#example-jaredpalmer \"Examples\") [🤔](#ideas-jaredpalmer \"Ideas, Planning, \u0026 Feedback\") [👀](#review-jaredpalmer \"Reviewed Pull Requests\") [⚠️](https://github.com/jaredpalmer/razzle/commits?author=jaredpalmer \"Tests\") [🔧](#tool-jaredpalmer \"Tools\") | [\u003cimg src=\"https://avatars3.githubusercontent.com/u/1415847?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003eJari Zwarts\u003c/sub\u003e](https://jari.io)\u003cbr /\u003e[💬](#question-jariz \"Answering Questions\") [💻](https://github.com/jaredpalmer/razzle/commits?author=jariz \"Code\") [🤔](#ideas-jariz \"Ideas, Planning, \u0026 Feedback\") [🔌](#plugin-jariz \"Plugin/utility libraries\") [👀](#review-jariz \"Reviewed Pull Requests\") | [\u003cimg src=\"https://avatars0.githubusercontent.com/u/810438?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003eDan Abramov\u003c/sub\u003e](http://twitter.com/dan_abramov)\u003cbr /\u003e[💻](https://github.com/jaredpalmer/razzle/commits?author=gaearon \"Code\") [🤔](#ideas-gaearon \"Ideas, Planning, \u0026 Feedback\") | [\u003cimg src=\"https://avatars0.githubusercontent.com/u/15182?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003eEric Clemmons\u003c/sub\u003e](http://ericclemmons.github.com/)\u003cbr /\u003e[💻](https://github.com/jaredpalmer/razzle/commits?author=ericclemmons \"Code\") [🤔](#ideas-ericclemmons \"Ideas, Planning, \u0026 Feedback\") |\n| :---: | :---: | :---: | :---: |\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaniator%2Ftest-context","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaniator%2Ftest-context","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaniator%2Ftest-context/lists"}