Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add webpack for frontend needs #444

Merged
merged 15 commits into from
Nov 11, 2017
Merged

Add webpack for frontend needs #444

merged 15 commits into from
Nov 11, 2017

Conversation

mimischi
Copy link
Owner

I'm getting tired of managing frontend libraries by hand. webpack looks promising to solve this issue.

Adding django-webpack-loader and with the help of this blog post (minus the React part), the project now ships almost without any external JavaScript libraries. The only exception is tagEditor which does not have any npm package.

Changelog

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

@mimischi mimischi merged commit 80989d6 into develop Nov 11, 2017
@mimischi mimischi deleted the webpack branch November 11, 2017 17:17
@codecov-io
Copy link

codecov-io commented Nov 11, 2017

Codecov Report

Merging #444 into develop will increase coverage by 0.41%.
The diff coverage is 73.52%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #444      +/-   ##
===========================================
+ Coverage    85.39%   85.81%   +0.41%     
===========================================
  Files           50       50              
  Lines         1623     1621       -2     
===========================================
+ Hits          1386     1391       +5     
+ Misses         237      230       -7
Impacted Files Coverage Δ
clock/shifts/utils.py 75.34% <ø> (ø) ⬆️
clock/profiles/middleware.py 94.11% <ø> (ø) ⬆️
clock/pages/mixins.py 87.5% <ø> (ø) ⬆️
clock/contracts/views.py 88.09% <ø> (ø) ⬆️
clock/pages/utils.py 95.45% <ø> (ø) ⬆️
clock/contact/urls.py 100% <ø> (ø) ⬆️
clock/contracts/fields.py 40.74% <0%> (ø) ⬆️
clock/profiles/views.py 56.89% <100%> (ø) ⬆️
clock/contracts/urls.py 100% <100%> (ø) ⬆️
clock/pages/views.py 100% <100%> (ø) ⬆️
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1682515...0541cb6. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants