Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
postcss-px2upx
Advanced tools
This is a postcss plugin of px2upx.
var postcss = require('postcss');
var px2upx = require('postcss-px2upx');
var originCssText = '...';
var newCssText = postcss().use(px2upx({upxUnit: 64})).process(originCssText).css;
Please see px2upx for more information about the features and usage of px2upx.
npm install gulp-postcss
var gulp = require('gulp');
var postcss = require('gulp-postcss');
var px2upx = require('postcss-px2upx');
gulp.task('default', function() {
var processors = [px2upx({upxUnit: 75})];
return gulp.src('./src/*.css')
.pipe(postcss(processors))
.pipe(gulp.dest('./dest'));
});
npm install postcss-loader
var px2upx = require('postcss-px2upx');
module.exports = {
module: {
loaders: [
{
test: /\.css$/,
loader: "style-loader!css-loader!postcss-loader"
}
]
},
postcss: function() {
return [px2upx({upxUnit: 75})];
}
}
npm install grunt-postcss
module.exports = function(grunt) {
grunt.initConfig({
postcss: {
options: {
processors: [
px2upx({upxUnit: 75})
]
},
dist: {
src: 'src/*.css',
dest: 'build'
}
}
});
grunt.loadNpmTasks('grunt-postcss');
grunt.registerTask('default', ['postcss']);
}
/*px*/
comment).MIT
FAQs
Postcss version of px2upx
We found that postcss-px2upx demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.