{"id":14967402,"url":"https://github.com/goldhand/cookiecutter-webpack","last_synced_at":"2025-10-25T19:30:59.993Z","repository":{"id":57207040,"uuid":"54491374","full_name":"goldhand/cookiecutter-webpack","owner":"goldhand","description":"Boilerplate for webpack 2, babel, react + redux + hmr, and karma. Can be inserted into existing django projects.","archived":false,"fork":false,"pushed_at":"2017-10-13T03:08:25.000Z","size":75,"stargazers_count":92,"open_issues_count":8,"forks_count":16,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-10-06T16:47:57.470Z","etag":null,"topics":["babel","cookiecutter","cookiecutter-webpack","hmr","karma","mocha","react","redux","webpack","webpack2"],"latest_commit_sha":null,"homepage":"","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/goldhand.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2016-03-22T16:33:43.000Z","updated_at":"2024-09-15T12:36:19.000Z","dependencies_parsed_at":"2022-09-08T17:01:27.135Z","dependency_job_id":null,"html_url":"https://github.com/goldhand/cookiecutter-webpack","commit_stats":null,"previous_names":["hzdg/cookiecutter-webpack"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldhand%2Fcookiecutter-webpack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldhand%2Fcookiecutter-webpack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldhand%2Fcookiecutter-webpack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldhand%2Fcookiecutter-webpack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goldhand","download_url":"https://codeload.github.com/goldhand/cookiecutter-webpack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219865149,"owners_count":16555931,"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":["babel","cookiecutter","cookiecutter-webpack","hmr","karma","mocha","react","redux","webpack","webpack2"],"created_at":"2024-09-24T13:38:00.297Z","updated_at":"2025-10-25T19:30:59.669Z","avatar_url":"https://github.com/goldhand.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Cookiecutter-webpack\n====================\n[![CircleCI](https://circleci.com/gh/goldhand/cookiecutter-webpack.svg?style=svg)](https://circleci.com/gh/goldhand/cookiecutter-webpack)\n\nBoilerplate for setting up [webpack 2][webpack2] configuration with [hot reloading][hmr], [babel][babel] for es6 modules, [react][react] + [redux][redux] for views and state, and [karma][karma] + [mocha][mocha] + [expect][expect] for testing.\n\n[webpack2]: https://github.com/webpack/webpack/tree/v2.1.0-beta.13\n[hmr]: https://github.com/gaearon/react-transform-hmr\n[babel]: https://babeljs.io/\n[react]: https://facebook.github.io/react/\n[redux]: http://redux.js.org/index.html\n[karma]: https://github.com/karma-runner/karma\n[mocha]: https://github.com/mochajs/mocha\n[expect]: https://github.com/mjackson/expect\n\nGetting Started\n---------------\n\nDownload `cookiecutter` to a global python path\n\n    $ pip install cookiecutter\n\nIn your project directory run\n\n    $ cookiecutter https://github.com/goldhand/cookiecutter-webpack.git\n\nAnswer the prompts then `cd` into your newly created project directory.\n\nInstall npm packages\n\n    $ npm install\n\nStart the server\n\n    $ npm start\n\nOpen up http://localhost:8080 in your browser.\n\nYou will have a React / Redux counter app running with redux dev-tools. See the generated `README.md` for an explanation of the react / redux project structure.\n\n\nYou can run the test suite\n\n    $ npm test\n\n\nYou should also create a new git repo and push it to github\n\n```\n$ git init\n$ git add .\n$ git commit -m \"Init\"\n$ git remote add origin git@github.com:goldhand/project_name.git\n$ git push -u origin master\n```\n\n\nOptions\n-------\n\n* `project_name`: Your Project Name\n* `repo_name`: Name of this projects git repository\n* `repo_owner`: Your github username\n* `static_root`: Path to where this projects source code lives, or path to static files directory if integrating into an existing project\n* `production_output_path`: Path where your compiled bundles should go\n* `author_name`: Your Name\n* `description`: A short description of the project for the `README.md` file\n* `version`: Project version number\n* `existing_project`: `n` if this is a new project and `y` if you're integrating into an existing project. See the notes below about integrating into an existing project.\n* `css_extension`: [`none`, `less`, `sass`] - use `less` or `sass` to preprocess styles.\n* `use_ejs`: `y` if you want to include `ejs` templates and loaders in the project. Recommended if not using an existing project.\n\n\nIntegrating into existing projects\n----------------------------------\n\nYou can chain this into an existing cookiecutter project by installing via the projects `./hooks/post_gen_project.py` file or just installing it via the command line.\n\n### Using post hooks\nHere is a django project post hook example that chains this through a django cookiecutter project.\n\n```python\nfrom cookiecutter.main import cookiecutter\n\n  cookiecutter(\n      'git@github.com:goldhand/cookiecutter-webpack.git',\n      replay=False, overwrite_if_exists=True, output_dir='../',\n      checkout=None, no_input=True, extra_context={\n          'project_name': '{{ cookiecutter.project_name }}',\n          'repo_name': '{{ cookiecutter.repo_name }}',\n          'repo_owner': 'goldhand',\n          'static_root': '{{ cookiecutter.project_dir }}/static/{{ cookiecutter.project_dir }}',\n          'production_output_path': '{{ cookiecutter.project_dir }}/static/{{ cookiecutter.project_dir }}/dist/',\n          'author_name': '{{ cookiecutter.author_name }}',\n          'description': '{{ cookiecutter.description }}',\n          'version': '{{ cookiecutter.version }}',\n          'existing_project': 'y',\n          'css_extension': 'sass',\n          'use_ejs': 'n'\n      })\n```\n\nThe flag `existing_project` will move/remove some files and dependencies and also add supporting configurations for a django project.\n\n### Using command line\nJust make sure you use the `--overwrite-if-exists` [ or `-f`] flag so cookiecutter can work within your existing project structure. You will also probably want to point to your existing projects parent directory and make sure you use the same `repo_name` as the project directory so your `package.json` files are installed at the project root.\n\n\tcookiecutter -f -output-dir ../ git@github.com:goldhand/cookiecutter-webpack.git\n\n\nContributing\n------------\n\nAccepting pull requests!\n\nClone the project:\n```sh\n$ git clone git@github.com:goldhand/cookiecutter-webpack.git\n```\nInstall python and npm dependencies:\n```sh\n$ pip install -r requirements.txt \u0026\u0026 npm install\n```\nRun build tests:\n```sh\n$ make test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoldhand%2Fcookiecutter-webpack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoldhand%2Fcookiecutter-webpack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoldhand%2Fcookiecutter-webpack/lists"}