Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aviate

Package Overview
Dependencies
Maintainers
3
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aviate

Small WebPack based SCSS / Javascript compiler

  • 1.0.6
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
22
increased by2100%
Maintainers
3
Weekly downloads
 
Created
Source

Aviate

Small WebPack based SCSS / Javascript compiler

Installation

Install the package

npm install --save aviate

Open package.json and add:

{
    "scripts": {
        "dev": "aviate",
        "build": "aviate build"
    }
}

Create the aviate.config.js

Configuration file

Aviate is configured using the aviate.config.js file at the root of your project.

const path = require('path')

module.exports = {
    // Defaults to http://localhost:8080 when not provided
    host: 'http://localhost:8080/',
    // The external Host is only needed running aviate in a docker container this is the proxy url of the docker container 
    externalHost: '<url of docker container>',
    // Location to copy production assets to (usually one directory)
    distLocations: [
        path.join(__dirname, 'your/production/assets/directory')
    ],
    // Optional location of svgs to create a SVG sprite map. Can also be an object with configuration options for https://github.com/freshheads/svg-spritemap-webpack-plugin
    svgSprite: '**/*.svg',
    // Entirely optional if you don't have any custom postcss plugins
    // This example shows how to add css-mqpacker
    postCss(loader, defaultPlugins) {
        // Optional possibility to disable default postCSS plugins        
        const plugins = defaultPlugins({
            // 'autoprefixer': true,
            // 'lost': true,
            // 'postcss-custom-media': true,
            // 'postcss-zindex': true,
            // 'postcss-discard-duplicates': true,
            // 'postcss-unique-selectors': true,
            // 'postcss-responsive-type': true
        })

        plugins.push(require('css-mqpacker')())

        return plugins
    }
    // Allows you to define custom WebPack properties
    // `config` is a WebPack config object
    // `config.entry` is required
    // Entries will be compiled to `http://localhost:8080/<entrykey>` in development
    // In production the entries will be copied to `distLocations`
    decorateConfig(config) {
        config.entry = Object.assign({}, config.entry, {
            // When using scss that never changes (external dependencies) should be added to the array to greatly improve compilation time
            'styles': [
                path.join(__dirname, 'web/app/themes/wecustom/assets/styles/main.scss')
            ],
            // All javascript goes through Babel. So you can write es2015 (ES6) code. It also includes all requirements for compiling React applications
            'javascript': [
                path.join(__dirname, 'web/app/themes/wecustom/assets/javascript/main.js')
            ],
        })

        return config
    }
}

PostCSS plugins

These plugins are included by default:

  • Autoprefixer (last 2 versions and Internet Explorer 11)
  • Font size responsive Allows you to easily create responsive types
  • Lost Grid Amazing grid system
  • Custom Media W3C compliant custom media queries
  • z-index flattens z-index levels
  • Discard duplicates removes properties that are always overwritten by the same selector at another location
  • Unique selectors deduplicates selectors

FAQs

Package last updated on 21 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc