0.2.9 • Published 8 years ago

csspresso v0.2.9

Weekly downloads
-
License
MIT
Repository
github
Last release
8 years ago

csspresso npm version

prefixless without the DSL.

Batteries included

FAQ

Status

You're feeling very, very lucky.

Installation

$ npm install csspresso

Configuration

  • {Array} browsers
  • {string} map
    • default value: .map appended to the file's base name
    • optional pattern to customize the source map file name; the source map file is always a sibling of the target file
      • backreferences:
        • $1: file base name without extension
        • $2: file extension
      • example:
        • base file name: foo.css
        • map option value: $1-$2-map.json
        • map file name: foo-css-map.json
  • {string} source
    • default value: ./source/style
    • all CSS files that match *.css in this directory generate output files; includes must be in sub-directories
  • {string} target
    • default value: ./public/style

CLI usage

package.json

config.csspresso values (if any) are merged with the default values.

{
  "config": {
    "csspresso": {
      "browsers": [
        "any browserlist query"
      ],
      "source": "path/to/source",
      "target": "path/to/target"
    }
  },
  "scripts": {
    "build": "csspresso",
    "develop": "csspresso watch"
  }
}

Terminal

$ npm run build

or

$ npm run develop

Programmatic usage

var csspresso = require('csspresso');
var options = {
    browsers: [
        'any browserlist query'
    ],
    source: 'path/to/source',
    source: 'path/to/target'
}

csspresso(options)
    .then(function () {
        // do something after csspresso is done
    });
  • if options is provided
    • all options must be set
  • else
    • if csspresso is invoked by a script that is executed with npm run
      • configuration is resolved as with CLI usage
    • else the defaults are used

With programmatic usage, watching is not an option (pun intended).

License

MIT

0.2.9

8 years ago

0.2.8

8 years ago

0.2.7

8 years ago

0.2.6

8 years ago

0.2.5

8 years ago

0.2.4

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago