How to use the stylus.set function in stylus

To help you get started, we’ve selected a few stylus examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Fi2zz / TypePicker / scripts / rollup.js View on Github external
return new Promise((resolve, reject) => {
    const data = fs.readFileSync(source, "utf-8");
    require("stylus")(data)
      .set("compress", true)
      .render(function(err, css) {
        if (err) {
          reject(err);
          return;
        }
        resolve(css);
      });
  });
}
github electrode-io / electrode / packages / electrode-archetype-react-app / support / index.js View on Github external
preprocessCss: function(css, filename) {
          if (filename.endsWith(".styl")) {
            return require("stylus")(css)
              .set("filename", filename)
              .render();
          } else if (filename.endsWith(".scss")) {
            return require("node-sass").renderSync({
              css,
              file: filename
            }).css;
          } else {
            return css;
          }
        },
        processorOpts: { parser: require("postcss-less").parse }