npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

css-devendorize

v0.0.2

Published

Tool to remove vendor prefixes from CSS files

Downloads

8

Readme

CSS devendorize - CSS vendor prefixes remover

This can sounds weird to remove CSS vendor prefixes from a CSS, but that in the case you want to use prefix-free for example without changing your vendors' CSS files one by one, you can use this tool to remove the vendors from any source.

While this is still in alpha, it's working and usable.

Installation

  • npm install --save css-devendorize

Usage

CLI tool

  • To use the CLI tool, you can use either css-devendorize or css-unprefix:

      Usage: css-unprefix [options] [files]
    
      Options:
    
        -h, --help               output usage information
        -V, --version            output the version number
        -o, --output <path>      path where the output file(s) will be generated (file or path)
        -b, --base-path <path>   base path when `output` is a directory, default to current directory
        -m, --source-map [path]  generates source-map, relative to current directory or given path
        -r, --recursive          include sub directories
    • -o or --output:
      • if it's a directory, file(s) will be generated in that directory, with the same directory hierarchy as the input file relative to the base path
      • if it's a file, all the input files will be concatenated in that file
    • -b or --base:
      • by default it is the current working directory; it's used to find out the relative path to an output file in the output directory, using its input file's path relative to base path
    • -m or --source-map:
      • used to generate source-amp file(s); if no path given, the input file path will appear relative to the current working directory in the source-map file, else it'll be relative to the given path in this argument value
    • -r or --recursive:
      • if present, it'll look for CSS files in all sub directories fo the given path(s)
  • examples (expect running those from the base path of this project):

    • css-unprefix -r -m -o output test:
      • will look recursively for CSS input files in the test directory, and generate output files in the output directory, as well as source-map files
      • output/test/fixtures/app.css, output/test/fixtures/app.css.map, output/test/fixtures/app.expected.css and output/test/fixtures/app.expected.css.map will be generated
    • css-unprefix -r -o output -b test/fixtures test:
      • will look recursively for CSS input files in the test directory, and generate output files in the output directory using the file relative paths to test/fixture as output path
      • output/app.css and output/app.expected.css will be generated

Library API

  • To remove CSS from an input string getting directly the resulting CSS, use:

    var Cleaner = require('css-devendorize').Cleaner;
    var cleaner = new Cleaner();
    console.log(cleaner.lintCss(cssString));
  • To remove CSS from an AST, with options to keep sourceMaps or such:

    var Cleaner = require('css-devendorize').Cleaner;
    var cleaner = new Cleaner();
    console.log(cleaner.lintAst(cssAST/*, options */));
  • There is also a browserified version, which you can use in your browser directly, in the dist folder.

Authors