All Projects → MicroPyramid → Django Webpacker

MicroPyramid / Django Webpacker

Licence: mit
A django compressor tool that bundles css, js files to a single css, js file with webpack and updates your html files with respective css, js file path.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Django Webpacker

Pychat
webchat via WebSockets/WebRTC that allows messaging/video call/screen sharing
Stars: ✭ 152 (+120.29%)
Mutual labels:  webpack, django
Qikqiak.com
关注容器、kubernetes、devops、python、golang、微服务等技术 🎉🎉🎉
Stars: ✭ 394 (+471.01%)
Mutual labels:  webpack, django
Froggy Service
邱威傑市民服務網站
Stars: ✭ 155 (+124.64%)
Mutual labels:  webpack, django
Docker Django Example
A production ready example Django app that's using Docker and Docker Compose.
Stars: ✭ 86 (+24.64%)
Mutual labels:  webpack, django
Modern Django
Modern Django: A Guide on How to Deploy Django-based Web Applications in 2017
Stars: ✭ 662 (+859.42%)
Mutual labels:  django, pip
Django Project Template
Thorgate's Django project template - Django, React, Sass, optional Docker and more
Stars: ✭ 91 (+31.88%)
Mutual labels:  webpack, django
Django Webpack Loader
Transparently use webpack with django
Stars: ✭ 2,327 (+3272.46%)
Mutual labels:  webpack, django
Django Currentuser
Conveniently store reference to request user on thread/db level.
Stars: ✭ 83 (+20.29%)
Mutual labels:  django, pip
Try
Dead simple CLI tool to try Python packages - It's never been easier! 📦
Stars: ✭ 588 (+752.17%)
Mutual labels:  package, pip
Vue Django
@Django integrated with a full-featured @Webpack + (@vuejs / vue-loader) setup with hot reload, linting, testing & css extraction.
Stars: ✭ 495 (+617.39%)
Mutual labels:  webpack, django
Django React Boilerplate
Django, React, Bootstrap 4 with Python 3 and webpack project boilerplate
Stars: ✭ 1,164 (+1586.96%)
Mutual labels:  webpack, django
React Webpack Django
De-coupled ReactJS client for greater flexibility and less black-box Django magic
Stars: ✭ 24 (-65.22%)
Mutual labels:  webpack, django
Patchman
Patchman is a Linux Patch Status Monitoring System
Stars: ✭ 163 (+136.23%)
Mutual labels:  django, package
Modern Wasm Starter
🛸 Run C++ code on web and create blazingly fast websites! A starter template to easily create WebAssembly packages using type-safe C++ bindings with automatic TypeScript declarations.
Stars: ✭ 140 (+102.9%)
Mutual labels:  webpack, package
Django Newsfeed
A news curator and newsletter subscription package for Django
Stars: ✭ 155 (+124.64%)
Mutual labels:  django, package
Docker Django Webpack Skeleton
Django Skeleton W/ Docker Dev & Production W/ Webpack 2 W/ BabelJS W/ Sass W/ PostgreSQL
Stars: ✭ 191 (+176.81%)
Mutual labels:  webpack, django
Pip Check
pip-check gives you a quick overview of all installed packages and their update status.
Stars: ✭ 134 (+94.2%)
Mutual labels:  package, pip
Django Notifications
GitHub notifications alike app for Django
Stars: ✭ 1,237 (+1692.75%)
Mutual labels:  django, package
Cookiecutter Django Vue
Cookiecutter Django Vue is a template for Django-Vue projects.
Stars: ✭ 462 (+569.57%)
Mutual labels:  webpack, django
Django Rest Booking Api
A Restful api which allows you to book sports events or update existing odds.
Stars: ✭ 24 (-65.22%)
Mutual labels:  django, pip

django-webpacker's documentation:

.. image:: https://readthedocs.org/projects/django-webpacker/badge/?version=latest :target: http://django-webpacker.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status

.. image:: https://coveralls.io/repos/github/MicroPyramid/django-webpacker/badge.svg?branch=master :target: https://coveralls.io/github/MicroPyramid/django-webpacker?branch=master

.. image:: https://travis-ci.org/MicroPyramid/django-webpacker.svg?branch=master :target: https://travis-ci.org/MicroPyramid/django-webpacker

.. image:: https://landscape.io/github/MicroPyramid/django-webpacker/master/landscape.svg?style=flat :target: https://landscape.io/github/MicroPyramid/django-webpacker/master :alt: Code Health

.. image:: https://img.shields.io/github/license/micropyramid/django-webpacker.svg :target: https://pypi.python.org/pypi/django-webpacker/

Introduction:

django-webpacker is a django compressor tool which bundles css, js files to a single css, js file with webpack and updates your html files with respective css, js file path.

It supports django-storages to load compressed files from AWS S3.

Source Code is available in Micropyramid Repository(https://github.com/MicroPyramid/django-webpacker).

Installation Procedure

  1. Install django-web-packer using the following command::

    pip install django-webpacker

     	(or)
    

    git clone git://github.com/micropyramid/django-webpacker.git

    cd django-webpacker

    python setup.py install

  2. Add app name in project settings.py file::

    INSTALLED_APPS = [ '..................', 'django-webpacker', '..................' ]

  3. Run npm init to intialize npm modules and it will create 'package.json' file which will contain package information. Update file with following dependencies::

    "devDependencies": { "babel": "^6.23.0", "babel-core": "^6.24.0", "babel-loader": "^6.4.1", "css-loader": "^0.28.0", "extract-text-webpack-plugin": "^2.1.0", "file-loader": "^0.11.1", "html-webpack-inline-source-plugin": "0.0.7", "html-webpack-plugin": "^2.28.0", "image-webpack-loader": "^3.3.0", "less-loader": "^4.0.3", "node-sass": "^4.5.2", "react": "^15.4.2", "react-hot-loader": "^1.3.1", "sass-loader": "^6.0.3", "script-loader": "^0.7.0", "style-loader": "^0.16.1", "webpack": "^2.3.3", "webpack-bundle-tracker": "^0.2.0", "webpack-dev-server": "^2.4.2" }, "dependencies": { "imports-loader": "^0.7.1", "jquery": "^3.2.1" }

  4. Run npm install to install all package dependencies::

    npm install

  5. Updates Your html file with the following script, link stylesheet tags::

    <script id="packer_js" src="" type="text/javascript"></script>
  6. Create webpack.config.js file with webpack.config.js file data. Update your project entry points with their respective paths. We can give multiple entry points(i.e separate entry point for each app) for the project. After compressing, separate css, file will be genarated with respective entry point name.

  7. Add the following details in settings file about compressing css, js files::

    WEB_PACK_FILES = [ {'html_file_name': {{ HTML_FILE_RELATIVE_PATH }}, 'webpack_js': {{ WEBPACK_ENTRY_POINT_KEY_NAME }}, }, {'html_file_name': {{ HTML_FILE_RELATIVE_PATH }}, 'webpack_js': {{ WEBPACK_ENTRY_POINT_KEY_NAME }}, }, {'html_file_name': {{ HTML_FILE_RELATIVE_PATH }}', 'webpack_js': {{ WEBPACK_ENTRY_POINT_KEY_NAME }}, }, ]

  8. Run python manage.py compress_css_js_files to generate compressed css, js file. It will updates html file with respective compressed css, js files. Link, script tags will be loaded with compressed css, js files.

  9. If you use django storages, then add the following variable to settings file to load compressed css, js files from s3::

    AWS details

    AWS_ACCESS_KEY_ID = "Your AWS Access Key"

    AWS_SECRET_ACCESS_KEY = "Your AWS Secret Key"

    AWS_BUCKET_NAME = "Your AWS Bucket Name"

    ENABLE_DJANGO_WEBPACK_AWS = True

We are always looking to help you customize the whole or part of the code as you like.

Visit our Django Development page Here_

We welcome your feedback and support, raise github ticket_ if you want to report a bug. Need new features? Contact us here_

.. _contact us here: https://micropyramid.com/contact-us/ .. _github ticket: https://github.com/MicroPyramid/django-webpacker/issues .. _Here: https://micropyramid.com/django-development-services/ or mailto:: "[email protected]"

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