GithubHelp home page GithubHelp logo

ercanipek / python-project-minify Goto Github PK

View Code? Open in Web Editor NEW

This project forked from w-kuipers/python-project-minify

0.0 0.0 0.0 26 KB

Compile your python project into the most compact version it can be.

License: MIT License

Python 100.00%

python-project-minify's Introduction

Python Project Minify

GitHub releases PyPI release License: MIT

Compile your python project into the most compact version it can be. This package internally uses the great Python Minifier package.

Installation

Install using PIP

pip install python-project-minify

Note the pip refers to the Python 3 package manager. In environment where Python 2 is also available the correct command may be pip3.

Usage

In console

Run the minify-project command in the terminal. It takes two arguments src and dst.

minify-project path/to/src path/to/dst

Python API

Import python_project_minify:

import python_project_minify

It's simple, just provide a source and destination path:

python_project_minify.directory('path/to/src', 'path/to/dst')

If you are providing paths with backslashes instead of forwardslashes like the example above, make sure to pass it with the r prefix. This way it will be treated as a raw string and won't throw an error.

python_project_minify.directory(r'path\to\src', r'path\to\dst')

Ignoring files and folders:

Create a file called .ppmignore in the root of your project.

## Ignore file in root
file.txt

## Ignore specific file
folder/subfolder/file.txt

## Wildcard ignore file
*file.txt

## Ignore folder in root
/folder

## Ignore specific folder
/folder/subfolder

## Wildcard ignore folder
*/folder

## If for some reason it's necessary to keep the .ppmignore file in the destination folder
PRESERVE_PPMIGNORE

Support

If you found a problem with the software, please create an issue on GitHub.

Maintainer

This project is maintained by Wibo Kuipers.

Contributing

Your contributions are highly appreciated. Please create a pull request on GitHub. Bigger changes need to be discussed with the development team via the issues section at GitHub first.

License

MIT LICENSE

python-project-minify's People

Contributors

w-kuipers avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.