Skip to main content

Fantastic SASS and SCSS compilation for python

Project description

sasstastic

CI Coverage pypi versions license

Fantastic SASS and SCSS compilation for python

Installation

pip install sasstastic

run

sasstastic --help

To check sasstastic is install and get help info.

Usage

Define a config file sasstastic.yml:

download:
  # downloaded files will be saved in this directory
  dir: styles/.libs
  sources:
    # download a font css file from google fonts and save it to goog-fonts.css
    - url: >
       https://fonts.googleapis.com/css?
       family=Merriweather:400,400i,700,700i|Titillium+Web|Ubuntu+Mono&display=swap
      to: google-fonts.css

    # download a style sheet from select2, this will be saved to "select2.css" as
    # the name can be inferred from the url
    - url: 'https://raw.githubusercontent.com/select2/select2/4.0.13/dist/css/select2.css'

    # download the full bootstrap 4 bundle and extract the scss files to the bootstrap/ directory
    - url: https://github.com/twbs/bootstrap/archive/v4.4.1.zip
      extract:
        'bootstrap-4.4.1/scss/(.+)$': bootstrap/


# SCSS and SASS files will be build from this directory
build_dir: styles/
# and saved to this directory
output_dir: css/
# the output directory "css/" will be deleted before all builds
wipe_output_dir: true

Then run sasstastic to build your sass files.

note:

  • if you sasstastic.yml file isn't in the current working directory you can pass the path to that file as an argument to sasstastic, e.g. sasstastic path/to/sasstastic.yml or just sasstastic path/to/
  • by default the paths defined in sasstastic.yml: download.dir, build_dir and output_dir are **relative to the the sasstastic.yml file
  • you can override the output directory ouput_dir using the -o argument to the CLI, see sasstastic --help for more info
  • sasstastic can build in "development" or "production" mode:
    • in development mode css is not compressed, a map file is created and all files from build_dir and download.dir are copied into output_dir so map files work correctly
    • in production mode css is compressed, no other files are added to output_dir

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sasstastic-0.0.2.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

sasstastic-0.0.2-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file sasstastic-0.0.2.tar.gz.

File metadata

  • Download URL: sasstastic-0.0.2.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for sasstastic-0.0.2.tar.gz
Algorithm Hash digest
SHA256 38069d50031475180815030e6cdfdc2aba025b4f7bc9fdc5d26e560136b6b730
MD5 c1f0b5bc15868ee7284fcb7f5bd4fd14
BLAKE2b-256 b94485a57893d86e0705538a526f01696d8e5e06de806ef8bba8265eb123e2d8

See more details on using hashes here.

File details

Details for the file sasstastic-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: sasstastic-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for sasstastic-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2c7b3fbdf197a57d535a53375133e80f1c2f014e054915595ca45fa2a925b4f4
MD5 7604d4272c59cb1c242f8a7723bb26b2
BLAKE2b-256 b9275883511f48843b113574784264ab4c2b5517de332b4bdd8a5fef99e11d2d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page