Skip to content

Commit c5d23f9

Browse files
authored
Merge pull request #10 from DerekCL/develop
1.0.0 Release
2 parents 41ba8fe + 5612973 commit c5d23f9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1364
-1072
lines changed

.gitignore

Lines changed: 201 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,222 @@
1-
### OSX ###
2-
.DS_Store
3-
.AppleDouble
4-
.LSOverride
51

6-
### SublimeText ###
7-
# cache files for sublime text
8-
*.tmlanguage.cache
9-
*.tmPreferences.cache
10-
*.stTheme.cache
2+
# Created by https://www.gitignore.io/api/node,python,sublimetext,visualstudiocode
113

12-
# workspace files are user-specific
13-
*.sublime-workspace
4+
### Node ###
5+
# Logs
6+
logs
7+
*.log
8+
npm-debug.log*
9+
yarn-debug.log*
10+
yarn-error.log*
1411

15-
# project files should be checked into the repository, unless a significant
16-
# proportion of contributors will probably not be using SublimeText
17-
# *.sublime-project
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
1817

19-
# sftp configuration file
20-
sftp-config.json
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
24+
# nyc test coverage
25+
.nyc_output
26+
27+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
28+
.grunt
2129

22-
# Basics
30+
# Bower dependency directory (https://bower.io/)
31+
bower_components
32+
33+
# node-waf configuration
34+
.lock-wscript
35+
36+
# Compiled binary addons (https://nodejs.org/api/addons.html)
37+
build/Release
38+
39+
# Dependency directories
40+
node_modules/
41+
jspm_packages/
42+
43+
# TypeScript v1 declaration files
44+
typings/
45+
46+
# Optional npm cache directory
47+
.npm
48+
49+
# Optional eslint cache
50+
.eslintcache
51+
52+
# Optional REPL history
53+
.node_repl_history
54+
55+
# Output of 'npm pack'
56+
*.tgz
57+
58+
# Yarn Integrity file
59+
.yarn-integrity
60+
61+
# dotenv environment variables file
62+
.env
63+
64+
# parcel-bundler cache (https://parceljs.org/)
65+
.cache
66+
67+
# next.js build output
68+
.next
69+
70+
# nuxt.js build output
71+
.nuxt
72+
73+
# vuepress build output
74+
.vuepress/dist
75+
76+
# Serverless directories
77+
.serverless
78+
79+
### Python ###
80+
# Byte-compiled / optimized / DLL files
81+
__pycache__/
2382
*.py[cod]
24-
__pycache__
83+
*$py.class
2584

26-
# Logs
27-
*.log
85+
# C extensions
86+
*.so
87+
88+
# Distribution / packaging
89+
.Python
90+
build/
91+
develop-eggs/
92+
dist/
93+
downloads/
94+
eggs/
95+
.eggs/
96+
lib/
97+
lib64/
98+
parts/
99+
sdist/
100+
var/
101+
wheels/
102+
*.egg-info/
103+
.installed.cfg
104+
*.egg
105+
MANIFEST
106+
107+
# PyInstaller
108+
# Usually these files are written by a python script from a template
109+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
110+
*.manifest
111+
*.spec
112+
113+
# Installer logs
28114
pip-log.txt
115+
pip-delete-this-directory.txt
29116

30117
# Unit test / coverage reports
118+
htmlcov/
119+
.tox/
31120
.coverage
32-
.tox
121+
.coverage.*
33122
nosetests.xml
34-
htmlcov
35-
.cache/
36-
build_test/
37-
38-
# egg
39-
*.egg-info
123+
coverage.xml
124+
*.cover
125+
.hypothesis/
126+
.pytest_cache/
40127

41128
# Translations
42129
*.mo
43130
*.pot
44131

45-
# Pycharm
46-
.idea
132+
# Django stuff:
133+
local_settings.py
134+
db.sqlite3
47135

48-
# Vim
136+
# Flask stuff:
137+
instance/
138+
.webassets-cache
49139

50-
*~
51-
*.swp
52-
*.swo
140+
# Scrapy stuff:
141+
.scrapy
142+
143+
# Sphinx documentation
144+
docs/_build/
145+
146+
# PyBuilder
147+
target/
148+
149+
# Jupyter Notebook
150+
.ipynb_checkpoints
151+
152+
# pyenv
153+
.python-version
154+
155+
# celery beat schedule file
156+
celerybeat-schedule
157+
158+
# SageMath parsed files
159+
*.sage.py
160+
161+
# Environments
162+
.venv
163+
env/
164+
venv/
165+
ENV/
166+
env.bak/
167+
venv.bak/
168+
169+
# Spyder project settings
170+
.spyderproject
171+
.spyproject
172+
173+
# Rope project settings
174+
.ropeproject
175+
176+
# mkdocs documentation
177+
/site
178+
179+
# mypy
180+
.mypy_cache/
181+
182+
### SublimeText ###
183+
# Cache files for Sublime Text
184+
*.tmlanguage.cache
185+
*.tmPreferences.cache
186+
*.stTheme.cache
187+
188+
# Workspace files are user-specific
189+
*.sublime-workspace
190+
191+
# Project files should be checked into the repository, unless a significant
192+
# proportion of contributors will probably not be using Sublime Text
193+
# *.sublime-project
194+
195+
# SFTP configuration file
196+
sftp-config.json
197+
198+
# Package control specific files
199+
Package Control.last-run
200+
Package Control.ca-list
201+
Package Control.ca-bundle
202+
Package Control.system-ca-bundle
203+
Package Control.cache/
204+
Package Control.ca-certs/
205+
Package Control.merged-ca-bundle
206+
Package Control.user-ca-bundle
207+
oscrypto-ca-bundle.crt
208+
bh_unicode_properties.cache
209+
210+
# Sublime-github package stores a github token in this file
211+
# https://packagecontrol.io/packages/sublime-github
212+
GitHub.sublime-settings
213+
214+
### VisualStudioCode ###
215+
.vscode/*
216+
!.vscode/settings.json
217+
!.vscode/tasks.json
218+
!.vscode/launch.json
219+
!.vscode/extensions.json
53220

54-
# npm
55-
node_modules/
56221

57-
# Compass
58-
.sass-cache
222+
# End of https://www.gitignore.io/api/node,python,sublimetext,visualstudiocode

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
### [2018-07-04]
2+
* Added typescript support
3+
* Added new linting for typescript
4+
* Upgraded dependencies
5+
* Updated readmes
6+
* Update gitignore files
7+
* Changed structure for redux to a Duck modularization
8+
* Fixed Less, Sass, and Css modularization
9+
* Removed large portions of the older codebase
10+
111
### [2018-07-01]
212
* Removed ejs support
313
* Removed existing project support

README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,19 @@ Cookiecutter-webpack
22
====================
33
[![CircleCI](https://circleci.com/gh/goldhand/cookiecutter-webpack.svg?style=svg)](https://circleci.com/gh/goldhand/cookiecutter-webpack)
44

5-
Boilerplate 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.
5+
[![Cookiecutter-webpack](https://img.shields.io/badge/built%20with-Cookiecutter%20Webpack-f38230.svg)][cookiecutter-webpack]
66

7-
[webpack2]: https://github.com/webpack/webpack/tree/v2.1.0-beta.13
8-
[hmr]: https://github.com/gaearon/react-transform-hmr
9-
[babel]: https://babeljs.io/
7+
Boilerplate for setting up [webpack 4][webpack4] configuration with [awesome-typescript-loader][awesome-typescript-loader] for es6 modules, [react][react] + [redux][redux] for views and state, [Istanbul][Istanbul] for code coverage and [mocha][mocha] + [chai][chai] + [enzyme][enzyme] for testing.
8+
9+
[webpack4]: https://github.com/webpack/webpack/tree/v4.14.0
10+
[awesome-typescript-loader]: https://github.com/s-panferov/awesome-typescript-loader/tree/v5.2.0
1011
[react]: https://facebook.github.io/react/
1112
[redux]: http://redux.js.org/index.html
12-
[karma]: https://github.com/karma-runner/karma
13+
[Istanbul]: https://istanbul.js.org/
1314
[mocha]: https://github.com/mochajs/mocha
14-
[expect]: https://github.com/mjackson/expect
15+
[chai]: https://github.com/chaijs/chai/tree/4.1.2
16+
[enzyme]: https://github.com/airbnb/enzyme/tree/v2.9.1
17+
[cookiecutter-webpack]: https://github.com/goldhand/cookiecutter-webpack
1518

1619
Getting Started
1720
---------------
@@ -22,7 +25,7 @@ Download `cookiecutter` to a global python path
2225

2326
In your project directory run
2427

25-
$ cookiecutter https://github.com/goldhand/cookiecutter-webpack.git
28+
$ cookiecutter https://github.com/DerekCL/cookiecutter-typescript-webpack.git
2629

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

@@ -50,7 +53,7 @@ You should also create a new git repo and push it to github
5053
$ git init
5154
$ git add .
5255
$ git commit -m "Init"
53-
$ git remote add origin [email protected]:goldhand/project_name.git
56+
$ git remote add origin [email protected]:DerekCL/project_name.git
5457
$ git push -u origin master
5558
```
5659

@@ -66,7 +69,7 @@ Options
6669
* `author_name`: Your Name
6770
* `description`: A short description of the project for the `README.md` file
6871
* `version`: Project version number
69-
* `css_extension`: [`none`, `less`, `sass`] - use `less` or `sass` to preprocess styles.
72+
* `css_extension`: [`sass`, `less`, `none` ] - use `less` or `sass` to preprocess styles.
7073

7174

7275
Contributing
@@ -76,7 +79,7 @@ Accepting pull requests!
7679

7780
Clone the project:
7881
```sh
79-
$ git clone [email protected]:goldhand/cookiecutter-webpack.git
82+
$ git clone [email protected]:DerekCL/cookiecutter-typescript-webpack.git
8083
```
8184
Install python and npm dependencies:
8285
```sh

build_test_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ default_context:
77
"author_name": "Your Name"
88
"description": "A short description of the project."
99
"version": "0.1.0"
10-
"css_extension": "none"
10+
"css_extension": "sass"
1111
"open_source_license": "ISC"

circle.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
machine:
22
python:
3-
version: 2.7.9
3+
version: 2.7.14
44
node:
5-
version: 5.10.1
5+
version: 6.10.3
6+
npm:
7+
version: 6.1.0
68

79
test:
810
override:

cookiecutter.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
"author_name": "Your Name",
88
"description": "A short description of the project.",
99
"version": "0.1.0",
10-
"css_extension": ["none", "less", "sass"],
10+
"css_extension": ["sass", "less", "none"],
1111
"open_source_license": "ISC"
1212
}

hooks/post_gen_project.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import os
2+
import shutil
3+
4+
# Get the root project directory
5+
PROJECT_DIRECTORY = os.path.realpath(os.path.curdir)
6+
7+
repo_name = '{{ cookiecutter.repo_name }}'
8+
css_extension = '{{ cookiecutter.css_extension }}'
9+
10+
11+
def remove_dir(project_directory, dir_name):
12+
"""Remove a dir."""
13+
dir_location = os.path.join(project_directory, dir_name)
14+
if os.path.isdir(dir_location):
15+
shutil.rmtree(dir_location)
16+
17+
18+
if css_extension != 'less':
19+
"""Remove less files"""
20+
remove_dir(PROJECT_DIRECTORY, 'less')
21+
22+
if css_extension != 'sass':
23+
"""Remove scss files"""
24+
remove_dir(PROJECT_DIRECTORY, 'sass')
25+
26+
if css_extension != 'none':
27+
"""Remove css files"""
28+
remove_dir(PROJECT_DIRECTORY, 'css')

0 commit comments

Comments
 (0)