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

builder-autoprefixer

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

builder-autoprefixer - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

33

index.js

@@ -1,12 +0,37 @@

var autoprefixer = require('autoprefixer');
var autoprefix = require('autoprefixer');
var crypto = require('crypto');
module.exports = function (browsers) {
return function autoprefix(file, done) {
var cache = Object.create(null);
module.exports = function (options) {
options = options || {};
var browsers = options.browsers;
if (Array.isArray(browsers)) browsers = browsers.join(', ');
if (browsers) autoprefix = autoprefix(browsers);
else browsers = '';
return function autoprefixer(file, done) {
if (file.extension !== 'css') return done();
file.read(function (err, string) {
if (err) return done(err);
file.string = autoprefixer(browsers).process(string).css
var hash = browsers + calculate(string);
var res;
try {
res = cache[hash] = cache[hash] || autoprefix.process(string);
} catch (err) {
done(err);
return;
}
file.string = res.css;
done();
})
}
}
function calculate(string) {
return crypto.createHash('md5')
.update(string)
.digest('hex');
}

24

package.json
{
"name": "builder-autoprefixer",
"description": "autoprefixer plugin for component-builder2.js",
"version": "0.0.0",
"version": "0.0.1",
"author": {
"name": "Jonathan Ong",
"email": "me@jongleberry.com",
"url": "http://jongleberry.com",
"twitter": "https://twitter.com/jongleberry"
"url": "http://jongleberry.com"
},

@@ -14,23 +13,12 @@ "license": "MIT",

"type": "git",
"url": "https://github.com/component/builder-autoprefixer.git"
"url": "https://github.com/component/autoprefixer.git"
},
"bugs": {
"mail": "me@jongleberry.com",
"url": "https://github.com/component/builder-autoprefixer/issues"
"url": "https://github.com/component/autoprefixer/issues"
},
"dependencies": {
"buffer-crc32": "*",
"autoprefixer": "*"
},
"devDependencies": {
"mocha": "^1.17.0",
"should": "^3.0.0",
"gnode": "~0.0.6",
"regenerator": "~0.3.4"
},
"scripts": {
"test": "NODE=gnode make test"
},
"engines": {
"node": ">= 0.11.4"
}
"homepage": "https://github.com/component/autoprefixer"
}
# Builder Autoprefixer
Autoprefixer plugin for [component-builder2](https://github.com/component/builder2.js) using [autoprefixer](https://github.com/ai/autoprefixer).
Autoprefixes your CSS files one by one so that it's streaming!
Autoprefixer plugin for [component-builder2](https://github.com/component/builder2.js). Caches to create incremental builds.

@@ -10,10 +9,7 @@ ## API

var build = require('component-builder2')
var autoprefixer = require('builder-autoprefixer')
var autoprefix = require('builder-autoprefixer')
var browsers = ["last 1 version", "BlackBerry 10", "Android 4"]
build.styles(branches, options)
.use('styles',
build.plugins.css(),
autoprefixer(browsers))
autoprefix('last 2 versions'))
.pipe(process.stdout)

@@ -20,0 +16,0 @@ ```

Sorry, the diff of this file is not supported yet

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