Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
css_code += css_part.toString();
});
var css = rework(css_code);
css.use(svg(path.dirname(target)));
if (rework_flags.autoprefixer) {
css.use(autoprefixer(rework_flags.autoprefixer).rework);
}
if (rework_flags.at2x) {
css.use(rework.at2x());
}
if (rework_flags.colors) {
css.use(rework.colors());
}
if (rework_flags.extend) {
css.use(rework.extend());
}
if (rework_flags.ease) {
css.use(rework.ease());
}
if (rework_flags.references) {
css.use(rework.references());
}
var css_result = css.toString({
compress: minify
});
fs.writeFile(target_filename, css_result, callback);
};
Style.prototype.toString = function(){
this.use(rework.mixin(mixins));
this.use(rework.keyframes());
this.use(rework.ease());
this.use(rework.prefixValue('linear-gradient'));
this.use(rework.prefixValue('radial-gradient'));
this.use(rework.prefixValue('transform'));
this.use(rework.prefix(props));
this.use(rework.colors());
this.use(rework.references());
this.use(rework.at2x());
this.use(rework.extend());
return this.rework.toString({ compress: this.compress });
};
#!/usr/bin/env node
var rework = require('rework');
var vars = require('rework-vars')();
var extend = require('rework').extend();
var ruleBinding = require('rework-rule-binding');
var autoprefixer = require('autoprefixer');
var program = require('commander');
var pkg = require('./package.json');
var stdin = require('stdin');
program.version(pkg.version).parse(process.argv);
stdin(function(str) {
var options = {};
var pre = rework(str).use(ruleBinding);
var check = 0;
pre.obj.stylesheet.rules.forEach(function(rule) {
rule.declarations.forEach(function(declaration) {
if (declaration.property.match(/^(inherit|extend)s?$/i)) {
Style.prototype.toString = function(){
this.use(rework.mixin(mixins));
this.use(rework.keyframes());
this.use(rework.ease());
this.use(rework.prefixValue('linear-gradient'));
this.use(rework.prefixValue('radial-gradient'));
this.use(rework.prefixValue('transform'));
this.use(rework.prefix(props));
this.use(rework.colors());
this.use(rework.references());
this.use(rework.at2x());
this.use(rework.extend());
return this.rework.toString({ compress: this.compress });
};