Skip to content

Boilerplate for setting up webpack 4 configuration with awesome-typescript-loader for es6 modules, react + redux for views and state, Istanbul for code coverage and mocha + chai + enzyme for testing.

Notifications You must be signed in to change notification settings

DerekCL/cookiecutter-typescript-webpack

Repository files navigation

Cookiecutter-webpack

CircleCI

Cookiecutter-webpack

Boilerplate for setting up webpack 4 configuration with awesome-typescript-loader for es6 modules, react + redux for views and state, Istanbul for code coverage and mocha + chai + enzyme for testing.

Getting Started

Download cookiecutter to a global python path

$ pip install cookiecutter

In your project directory run

$ cookiecutter https://github.com/DerekCL/cookiecutter-typescript-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 git@github.com:DerekCL/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
  • css_extension: [sass, less, none ] - use less or sass to preprocess styles.

Contributing

Accepting pull requests!

Clone the project:

$ git clone git@github.com:DerekCL/cookiecutter-typescript-webpack.git

Install python and npm dependencies:

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

Run build tests:

$ make test