|
7 years ago | |
---|---|---|
test | 7 years ago | |
cli.js | 7 years ago | |
index.js | 7 years ago | |
package.json | 7 years ago | |
readme.md | 7 years ago |
This is a simple utility to add browser prefixes to CSS. Its syntax is really simple; just add @prefix
to the beginning of any line, and it will add all relevant browser prefixes to that line. All prefixes will be on the same line, which means all line numbers will match between your source files and the result.
Install with npm:
npm install browser-prefix
To install as a command line application:
npm install -g browser-prefix
var prefix = require("browser-prefix");
prefix("@prefix foo: bar;");
//returns '-moz-foo: bar; -webkit-foo: bar; -o-foo: bar; -ms-foo: bar; foo: bar;'
From stdin:
$ echo "@prefix foo: bar" | browser-prefix
# returns '-moz-foo: bar; -webkit-foo: bar; -o-foo: bar; -ms-foo: bar; foo: bar;'
From file:
$ browser-prefix < infile.css > outfile.css