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

stylus-loader

Package Overview
Dependencies
Maintainers
2
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stylus-loader - npm Package Compare versions

Comparing version 0.6.0 to 1.0.0

9

index.js
var loaderUtils = require('loader-utils');
var stylus = require('stylus');
var nib = require('nib');
var path = require('path');

@@ -23,2 +22,7 @@ var fs = require('fs');

if (options.sourceMap) {
options.sourcemap = { comment: true, inline: true };
delete options.sourceMap;
}
var styl = stylus(source, options);

@@ -72,6 +76,5 @@ var paths = [path.dirname(options.filename)];

styl.use(nib());
styl.render(function(err, css) {
if (err) done(err);
else done(null, css);
else done(null, css, styl.sourcemap);
});

@@ -78,0 +81,0 @@ })

{
"name": "stylus-loader",
"version": "0.6.0",
"version": "1.0.0",
"description": "Stylus loader for webpack",

@@ -20,8 +20,5 @@ "main": "index.js",

"loader-utils": "~0.2.6",
"stylus": "^0.49.3",
"when": "~3.6.x"
},
"peerDependencies": {
"nib": "^1.0.4",
"stylus": "^0.49.3"
},
"devDependencies": {

@@ -34,3 +31,2 @@ "css-loader": "~0.9.1",

"should": "~4.6.1",
"stylus": "^0.49.3",
"webpack-dev-server": "~1.7.0"

@@ -37,0 +33,0 @@ },

@@ -84,2 +84,4 @@ # stylus-loader

## Release History
* 1.0.0 - Basic source map support (@skozin). Remove nib as dep. stylus is now a direct dep (as peerDependencies are deprecated).
* 0.6.0 - Support loader prefixes when resolving paths (@kpdecker).
* 0.5.0 - Disable Stylus parser caching in listImports (@DaQuirm). Update to stylus@0.49.2 and nib@1.0.4 as peerDependencies (@kompot).

@@ -86,0 +88,0 @@ * 0.4.0 - Allow configuration of plugins through webpack config (@bobzoller). Update to stylus 0.47.2 (@shanewilson).

@@ -16,3 +16,3 @@ var should = require("should");

it("should import css with the css-loader", function() {
var css = require("!css-loader!../!./fixtures/import-css.styl");
var css = require("!css-loader!../!./fixtures/import-css.styl").toString();
(typeof css).should.be.eql("string");

@@ -22,3 +22,3 @@ css.should.match(/\.imported-css/);

it("should import stylus", function() {
var css = require("!css-loader!../!./fixtures/import-styl.styl");
var css = require("!css-loader!../!./fixtures/import-styl.styl").toString();
(typeof css).should.be.eql("string");

@@ -103,3 +103,3 @@ css.should.match(/\.imported-stylus/);

it("should compile an @import URL through the CSS loader", function () {
var css = require("!css-loader!../!./fixtures/import-google-font.styl");
var css = require("!css-loader!../!./fixtures/import-google-font.styl").toString();
(typeof css).should.be.eql("string");

@@ -106,0 +106,0 @@ css.should.be.eql('@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic);\n');

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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