atma-io-middleware-clean-css

1.1.21 • Public • Published

CleanCSS (Atma Plugin)

The Plugin extends:

  • atma-io with a custom middleware to write minified JavaScript to files
  • Atma Toolkit with a atma-io-middleware-clean-css action
How to use
Embed into the Project
  • atma plugin install atma-io-middleware-clean-css

    This adds atma-loader-babel npm dependency and the package.json would look like:

        {
            "devDependencies": {
                "atma-io-middleware-clean-css"
            },
            "atma": {
                "plugins": [
                    "atma-io-middleware-clean-css"
                ],
                "settings": {
    				"atma-io-middleware-clean-css": {
    					"minify" : true,
    					"clean-css": {} //clean css options
    				}
                }
            }
        }
  • Extend your build.js file

    module.exports = {
        // other actions
        'compress': {
            action: 'atma-io-middleware-clean-css',
            files: [ 'source/lib.js' ],
            output: 'release/',
    
            // optionaly, define constants for the CleanCSS compressor
            'clean-css': {
                
            }
        }
    }
  • Run

    $ atma compress

The MIT License

Readme

Keywords

none

Package Sidebar

Install

npm i atma-io-middleware-clean-css

Weekly Downloads

1

Version

1.1.21

License

MIT

Unpacked Size

4.74 kB

Total Files

5

Last publish

Collaborators

  • tenbits