All Projects → goldhand → Cookiecutter Webpack

goldhand / Cookiecutter Webpack

Boilerplate for webpack 2, babel, react + redux + hmr, and karma. Can be inserted into existing django projects.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Cookiecutter Webpack

React Redux Universal Boilerplate
An Universal ReactJS/Redux Boilerplate
Stars: ✭ 165 (+89.66%)
Mutual labels:  webpack, babel, mocha, karma
Webpack Core Usage
webpack2完整系列课程,欢迎阅读。同时欢迎移步我的react全家桶文章全集: https://github.com/liangklfangl/react-article-bucket
Stars: ✭ 94 (+8.05%)
Mutual labels:  webpack, webpack2, hmr, babel
App Template
Boilerplate for Angular apps
Stars: ✭ 67 (-22.99%)
Mutual labels:  webpack, mocha, karma
React Starter Kit
React, Redux, Webpack, Material UI, Boostrap 4, Code Splitting, HMR
Stars: ✭ 229 (+163.22%)
Mutual labels:  webpack, hmr, babel
Minimal React Starter
As minimal a react starter as you can get... while also using ES6/Babel and Webpack.
Stars: ✭ 246 (+182.76%)
Mutual labels:  webpack, hmr, babel
Reactly Starter Kit
Deployable React + Webpack 2 starter kit
Stars: ✭ 122 (+40.23%)
Mutual labels:  webpack, webpack2, babel
Iceberg
Front-End Boilerplate built with React + Babel + Webpack + SASS
Stars: ✭ 144 (+65.52%)
Mutual labels:  webpack, webpack2, babel
React Cordova Boilerplate
TodoMVC example for react with development tools to build a cordova application
Stars: ✭ 206 (+136.78%)
Mutual labels:  webpack, webpack2, karma
Electron React Boilerplate
A Foundation for Scalable Cross-Platform Apps
Stars: ✭ 18,727 (+21425.29%)
Mutual labels:  webpack, hmr, babel
React Progressive Web App
An opinionated React based repository which is optimized for Progressive Web App development.
Stars: ✭ 548 (+529.89%)
Mutual labels:  webpack, webpack2, mocha
Nwb
A toolkit for React, Preact, Inferno & vanilla JS apps, React libraries and other npm modules for the web, with no configuration (until you need it)
Stars: ✭ 5,429 (+6140.23%)
Mutual labels:  webpack, babel, karma
Serverless Webpack
Serverless plugin to bundle your lambdas with Webpack
Stars: ✭ 1,595 (+1733.33%)
Mutual labels:  webpack, webpack2, babel
React Ssr Setup
React Starter Project with Webpack 4, Babel 7, TypeScript, CSS Modules, Server Side Rendering, i18n and some more niceties
Stars: ✭ 678 (+679.31%)
Mutual labels:  webpack, hmr, babel
Breko Hub
Babel React Koa Hot Universal Boilerplate
Stars: ✭ 145 (+66.67%)
Mutual labels:  webpack, babel, mocha
React Dynamic Route Loading Es6
Auto chunking and dynamic loading of routes with React Router and Webpack 2
Stars: ✭ 297 (+241.38%)
Mutual labels:  webpack, webpack2, hmr
React Webpack Typescript Starter
Minimal starter with hot module replacement (HMR) for rapid development.
Stars: ✭ 632 (+626.44%)
Mutual labels:  webpack, hmr, babel
Budgeting
Budgeting - React + Redux + Webpack (tree shaking) Sample App
Stars: ✭ 971 (+1016.09%)
Mutual labels:  webpack, webpack2, babel
Starter React Flux
Generate your React PWA project with TypeScript or JavaScript
Stars: ✭ 65 (-25.29%)
Mutual labels:  webpack, babel
Vue
Stars: ✭ 65 (-25.29%)
Mutual labels:  webpack, babel
Vue Web Extension
🛠️ A Vue CLI 3+ preset (previously a Vue CLI 2 boilerplate) for quickly starting a web extension with Vue, Babel, ESLint and more!
Stars: ✭ 1,147 (+1218.39%)
Mutual labels:  webpack, babel

Cookiecutter-webpack

CircleCI

Boilerplate for setting up webpack 2 configuration with hot reloading, babel for es6 modules, react + redux for views and state, and karma + mocha + expect for testing.

Getting Started

Download cookiecutter to a global python path

$ pip install cookiecutter

In your project directory run

$ cookiecutter https://github.com/goldhand/cookiecutter-webpack.git

Answer the prompts then cd into your newly created project directory.

Install npm packages

$ npm install

Start the server

$ npm start

Open up http://localhost:8080 in your browser.

You 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.

You can run the test suite

$ npm test

You should also create a new git repo and push it to github

$ git init
$ git add .
$ git commit -m "Init"
$ git remote add origin [email protected]:goldhand/project_name.git
$ git push -u origin master

Options

  • project_name: Your Project Name
  • repo_name: Name of this projects git repository
  • repo_owner: Your github username
  • static_root: Path to where this projects source code lives, or path to static files directory if integrating into an existing project
  • production_output_path: Path where your compiled bundles should go
  • author_name: Your Name
  • description: A short description of the project for the README.md file
  • version: Project version number
  • 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.
  • css_extension: [none, less, sass] - use less or sass to preprocess styles.
  • use_ejs: y if you want to include ejs templates and loaders in the project. Recommended if not using an existing project.

Integrating into existing projects

You 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.

Using post hooks

Here is a django project post hook example that chains this through a django cookiecutter project.

from cookiecutter.main import cookiecutter

  cookiecutter(
      '[email protected]:goldhand/cookiecutter-webpack.git',
      replay=False, overwrite_if_exists=True, output_dir='../',
      checkout=None, no_input=True, extra_context={
          'project_name': '{{ cookiecutter.project_name }}',
          'repo_name': '{{ cookiecutter.repo_name }}',
          'repo_owner': 'goldhand',
          'static_root': '{{ cookiecutter.project_dir }}/static/{{ cookiecutter.project_dir }}',
          'production_output_path': '{{ cookiecutter.project_dir }}/static/{{ cookiecutter.project_dir }}/dist/',
          'author_name': '{{ cookiecutter.author_name }}',
          'description': '{{ cookiecutter.description }}',
          'version': '{{ cookiecutter.version }}',
          'existing_project': 'y',
          'css_extension': 'sass',
          'use_ejs': 'n'
      })

The flag existing_project will move/remove some files and dependencies and also add supporting configurations for a django project.

Using command line

Just 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.

cookiecutter -f -output-dir ../ [email protected]:goldhand/cookiecutter-webpack.git

Contributing

Accepting pull requests!

Clone the project:

$ git clone [email protected]:goldhand/cookiecutter-webpack.git

Install python and npm dependencies:

$ pip install -r requirements.txt && npm install

Run build tests:

$ make test
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].