Skip to content

Commit

Permalink
Merge pull request #444 from mimischi/webpack
Browse files Browse the repository at this point in the history
Add webpack for frontend needs
  • Loading branch information
mimischi authored Nov 11, 2017
2 parents 1682515 + 0541cb6 commit 80989d6
Show file tree
Hide file tree
Showing 206 changed files with 4,839 additions and 13,271 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,10 @@
!.coveragerc
!.env
!.pylintrc
!.yarn_cache
webpack-stats-prod.json
webpack-stats-local.json
node_modules
assets/bundles
assets/dist
.cache
61 changes: 12 additions & 49 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,79 +1,42 @@
### OSX ###
.DS_Store
.AppleDouble
.LSOverride

### SublimeText ###
# cache files for sublime text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache

# workspace files are user-specific
*.sublime-workspace

# project files should be checked into the repository, unless a significant
# proportion of contributors will probably not be using SublimeText
# *.sublime-project

# sftp configuration file
sftp-config.json

# Basics
*.py[cod]
__pycache__

# Logs
*.log
pip-log.txt

# Unit test / coverage reports
.coverage
.tox
nosetests.xml
htmlcov

# Translations
*.mo
*.pot

# Pycharm
.idea/*

# Provided default Pycharm Run/Debug Configurations should be tracked by git
# In case of local modifications made by Pycharm, use update-index command
# for each changed file, like this:
# git update-index --assume-unchanged .idea/clocktest.iml
!.idea/runConfigurations/
!.idea/clocktest.iml
!.idea/vcs.xml
!.idea/webResources.xml

# Vim
*~
*.swp
*.swo

# npm
node_modules/
assets/bundles/
assets/dist/

# yarn
.yarn_cache/*
!.yarn_cache/.gitkeep

# Compass
.sass-cache
# webpack
webpack-stats-local.json
webpack-stats-prod.json

# virtual environments
.env

# User-uploaded media
clocktest/media/

# Hitch directory
tests/.hitch

# MailHog binary
mailhog

# Cache folder
# Cache
.cache/

# Initial data
initial_*.json
# OSX
.DS_Store
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ env:

cache:
apt: true
yarn: true
directories:
- $HOME/.cache/pip
- node_modules


install:
- make
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 2.1 (2017-11-11)

Small rework of the frontend foundation of the project (no direct frontend changes).

* Use `yarn` to pull in all frontend dependencies.
* Use `webpack` to compile a `main.js` bundle including JavaScript code and CSS (minified in `production`).
* The user only makes one HTTP request to the server and not several to retrieve the frontend libraries.
* It's more convinient to add new JavaScript dependencies, as long as we are using this frontend
* Get rid of the unmaintained `django-bootstrap-datetimepicker3` package. Replace with normally embedded `bootstrap-datetimepicker3`.
* Change the DateTimePickers to be `inline` always, thus hiding the `input` field from the user.
* Update formatting and translations.
* Get rid of `from __future__` imports. The codebase should be Python 3 only now.

## 2.0 (2017-11-01)

### Release 2.0
Expand Down
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
init:
pip install pipenv --upgrade
pipenv install --dev --skip-lock
yarn install --dev
yarn build
ci:
pipenv run pytest --cov=./
build:
docker-compose build
rebuild:
docker-compose build --force-rm --no-cache
lang-make:
pipenv run python manage.py makemessages --no-location --no-wrap
lang-compile:
pipenv run python manage.py compilemessages
10 changes: 5 additions & 5 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "pypi"

[packages]

django = "*"
Django = "*"
django-environ = "*"
whitenoise = "*"
django-braces = "*"
Expand All @@ -17,7 +17,6 @@ django-allauth = "*"
pytz = "*"
django-bootstrap-breadcrumbs = "*"
"django-bootstrap3" = "*"
"django-bootstrap3-datetimepicker" = {git = "git://github.com/blag/django-bootstrap3-datetimepicker.git", ref = "f8a78b231b75c331c143d5461456f663827a8af6"}
reportlab = "*"
lxml = "*"
django-recaptcha = "*"
Expand All @@ -26,16 +25,17 @@ raven = "*"
gunicorn = "*"
gevent = "*"
django-anymail = "*"
django-webpack-loader = "*"


[dev-packages]

coverage = "*"
django-coverage-plugin = "*"
django_coverage_plugin = "*"
django-extensions = "*"
werkzeug = "*"
Werkzeug = "*"
django-test-plus = "*"
factory-boy = "*"
factory_boy = "*"
django-debug-toolbar = "*"
ipython = "*"
ipdb = "*"
Expand Down
Loading

0 comments on commit 80989d6

Please sign in to comment.