{"id":18307433,"url":"https://github.com/devgeeks/preact-children-router-repro","last_synced_at":"2025-10-12T09:13:06.762Z","repository":{"id":142086249,"uuid":"69629185","full_name":"devgeeks/preact-children-router-repro","owner":"devgeeks","description":"preact-children-router-repro","archived":false,"fork":false,"pushed_at":"2016-09-30T03:12:30.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T11:23:51.532Z","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/devgeeks.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}},"created_at":"2016-09-30T03:10:37.000Z","updated_at":"2016-09-30T03:10:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"87f25f52-39a2-4ccf-bf6f-f6d030274be8","html_url":"https://github.com/devgeeks/preact-children-router-repro","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devgeeks/preact-children-router-repro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devgeeks%2Fpreact-children-router-repro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devgeeks%2Fpreact-children-router-repro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devgeeks%2Fpreact-children-router-repro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devgeeks%2Fpreact-children-router-repro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devgeeks","download_url":"https://codeload.github.com/devgeeks/preact-children-router-repro/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devgeeks%2Fpreact-children-router-repro/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010959,"owners_count":26084837,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"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-11-05T16:04:14.746Z","updated_at":"2025-10-12T09:13:06.732Z","avatar_url":"https://github.com/devgeeks.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Preact Boilerplate / Starter Kit\n\n[![Build Status](https://travis-ci.org/developit/preact-boilerplate.svg?branch=master)](https://travis-ci.org/developit/preact-boilerplate)\n[![gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/developit/preact)\n\n\u003e :guitar: Ready-to-rock [Preact] starter project, powered by [webpack].\n\u003e\n\u003e :rocket: If you're starting a new project using [Preact], you've come to the right place.\nBelow is a step-by-step guide that takes you straight from downloading this boilerplate to production.\n\u003e\n\u003e **[:boom: View Demo :boom:](https://preact-boilerplate.surge.sh)**\n\n\n---\n\n\n# Quick-Start Guide\n\n- [Installation](#installation)\n- [Development Workflow](#development-workflow)\n- [Structure](#structure)\n- [CSS Modules](#css-modules)\n- [Handling URLS](#handling-urls)\n\n\n## Installation\n\n**1. Clone this repo:**\n\n```sh\ngit clone --depth 1 https://github.com/developit/preact-boilerplate.git my-app\ncd my-app\n```\n\n\n**2. Make it your own:**\n\n```sh\nrm -rf .git \u0026\u0026 git init \u0026\u0026 npm init\n```\n\n\u003e :information_source: This re-initializes the repo and sets up your NPM project.\n\n\n**3. Install the dependencies:**\n\n```sh\nnpm install\n```\n\n\u003e You're done installing! Now let's get started developing.\n\n\n\n## Development Workflow\n\n\n**4. Start a live-reload development server:**\n\n```sh\nnpm run dev\n```\n\n\u003e This is a full web server nicely suited to your project. Any time you make changes within the `src` directory, it will rebuild and even refresh your browser.\n\n**5. Testing with `mocha`, `karma`, `chai`, `sinon` via `phantomjs`:**\n\n```sh\nnpm test\n```\n\n**6. Generate a production build in `./build`:**\n\n```sh\nnpm run build\n```\n\n\u003e You can now deploy the contents of the `build` directory to production!\n\u003e\n\u003e **[Surge.sh](https://surge.sh) Example:** `surge ./build -d my-app.surge.sh`\n\n\n**5. Start local production server with `superstatic`:**\n\n```sh\nnpm start\n```\n\n\u003e This is to simulate a production (CDN) server with gzip. It just serves up the contents of `./build`.\n\n\n\n---\n\n\n## Structure\n\nApps are built up from simple units of functionality called Components. A Component is responsible for rendering a small part of an application, given some input data called `props`, generally passed in as attributes in JSX. A component can be as simple as:\n\n```js\nclass Link extends Component {\n  render({ to, children }) {\n    return \u003ca href={ to }\u003e{ children }\u003c/a\u003e;\n  }\n}\n// usage:\n\u003cLink to=\"/\"\u003eHome\u003c/Link\u003e\n```\n\n\n---\n\n\n## CSS Modules\n\nThis project is set up to support [CSS Modules](https://github.com/css-modules/css-modules).  By default, styles in `src/style` are **global** (not using CSS Modules) to make global declarations, imports and helpers easy to declare.  Styles in `src/components` are loaded as CSS Modules via [Webpack's css-loader](https://github.com/webpack/css-loader#css-modules).  Modular CSS namespaces class names, and when imported into JavaScript returns a mapping of canonical (unmodified) CSS classes to their local (namespaced/suffixed) counterparts.\n\nWhen imported, this LESS/CSS:\n\n```css\n.redText { color:red; }\n.blueText { color:blue; }\n```\n\n... returns the following map:\n\n```js\nimport styles from './style.css';\nconsole.log(styles);\n// {\n//   redText: 'redText_local_9gt72',\n//   blueText: 'blueText_local_9gt72'\n// }\n```\n\nNote that the suffix for local classNames is generated based on an md5 hash of the file. Changing the file changes the hash.\n\n\n---\n\n\n## Handling URLS\n\n:information_desk_person: This project contains a basic two-page app with [URL routing](http://git.io/preact-router).\n\nPages are just regular components that get mounted when you navigate to a certain URL. Any URL parameters get passed to the component as `props`.\n\nDefining what component(s) to load for a given URL is easy and declarative. You can even mix-and-match URL parameters and normal props.\n\n```js\n\u003cRouter\u003e\n  \u003cA path=\"/\" /\u003e\n  \u003cB path=\"/b\" id=\"42\" /\u003e\n  \u003cC path=\"/c/:id\" /\u003e\n\u003c/Router\u003e\n```\n\n\n---\n\n\n## License\n\nMIT\n\n\n[Preact]: https://developit.github.io/preact\n[webpack]: https://webpack.github.io\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevgeeks%2Fpreact-children-router-repro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevgeeks%2Fpreact-children-router-repro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevgeeks%2Fpreact-children-router-repro/lists"}