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

builder-amd-css

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

builder-amd-css - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

7

index.js

@@ -50,4 +50,9 @@ var requireCssFiles,

loadFile: function( path ) {
var data;
path = normalizePath( path );
return files[ path ];
data = files[ path ];
if ( config.onCssBuildWrite ) {
data = config.onCssBuildWrite( path, data );
}
return data;
}

@@ -54,0 +59,0 @@ };

2

package.json
{
"name": "builder-amd-css",
"version": "0.0.5",
"version": "0.0.6",
"main": "index.js",

@@ -5,0 +5,0 @@ "repository": {

@@ -14,3 +14,3 @@ var files,

describe( "The CSS dependencies of a JS file", function() {
describe( "CSS dependencies of a JS file", function() {
var css;

@@ -25,3 +25,3 @@

it( "must be included", function() {
it( "should be included", function() {
expect( css ).to.equal( ".bar {}\n" );

@@ -32,3 +32,3 @@ });

describe( "The CSS dependencies of JS dependencies", function() {
describe( "CSS dependencies of JS dependencies", function() {
var css;

@@ -43,3 +43,3 @@

it( "must be included", function() {
it( "should be included", function() {
expect( css ).to.equal( ".foo {}\n.bar {}\n" );

@@ -50,3 +50,3 @@ });

describe( "Using appDir", function() {
describe( "Property appDir", function() {
var css, files;

@@ -74,3 +74,3 @@

describe( "Using appDir and CSSes located in a different subdir", function() {
describe( "Property appDir plus CSSes located in a sibling subdir", function() {
var css, files;

@@ -147,3 +147,3 @@

it( "must be enqueued", function() {
it( "should be enqueued", function() {
expect( barCss ).to.equal( ".bar {}\n" );

@@ -155,1 +155,25 @@ expect( fooCss ).to.equal( ".foo {}\n.bar {}\n" );

describe( "Property onCssBuildWrite", function() {
var css;
before(function( done ) {
AmdCssBuilder( files, {
include: [ "foo" ],
onCssBuildWrite: function( path, data ) {
if ( /bar/.test( path ) ) {
data = data.replace( /bar/, "baz" ).replace( /foo/, "qux" );
}
return data;
}
}, function( error, _css ) {
css = _css;
done( error );
});
});
it( "should allow rewriting CSS content analogous to onBuildWrite for JS", function() {
expect( css ).to.equal( ".foo {}\n.baz {}\n" );
});
});
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