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

assets-expander

Package Overview
Dependencies
Maintainers
0
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

assets-expander - npm Package Compare versions

Comparing version 0.1.2 to 0.2.0

._Readme.md

6

._History.md

@@ -1,4 +0,4 @@

Mac OS X  2��ATTR'/���!�!com.macromates.caret{
column = 5;
line = 0;
Mac OS X  2��ATTR'j���!�!com.macromates.caret{
column = 0;
line = 3;
}

@@ -1,4 +0,4 @@

Mac OS X  2��ATTR'/���"�"com.macromates.caret{
Mac OS X  2��ATTR'j���"�"com.macromates.caret{
column = 40;
line = 0;
}

@@ -1,4 +0,4 @@

Mac OS X  2��ATTR'/���#�#com.macromates.caret{
Mac OS X  2��ATTR'j���#�#com.macromates.caret{
column = 19;
line = 10;
}

@@ -0,1 +1,6 @@

0.2.0 / 2011-04-07
==================
* **type** property (denoting file extension, e.g. 'css') is now passed to processGroup method allowing reuse of single AssetsExpander instance for finding various types of files.
0.1.2 / 2011-04-05

@@ -2,0 +7,0 @@ ==================

@@ -1,4 +0,4 @@

Mac OS X  2��ATTR'/���#�#com.macromates.caret{
column = 33;
line = 92;
Mac OS X  2��ATTR'j���#�#com.macromates.caret{
column = 0;
line = 103;
}

@@ -31,3 +31,3 @@ var fs = require('fs'),

var prefix = asset.substring(0, asset.indexOf('**/*'));
matches.push(self._scanDir(path.join(root, prefix), '*', true));
matches.push(self._scanDir(path.join(root, prefix), '*', true, options.type));
} else if (asset.includes('*')) {

@@ -39,3 +39,3 @@ var prefix = '';

}
matches.push(self._scanDir(path.join(root, prefix), asset));
matches.push(self._scanDir(path.join(root, prefix), asset, false, options.type));
} else {

@@ -71,8 +71,8 @@ var expanded = path.join(root, asset) + '.' + options.type;

processGroup: function(type, name) {
processGroup: function(type, name, localOptions) {
var definition = this.yamlSource[type][name],
assets = [],
options = Object.clone(this.options),
options = Object.merge(Object.clone(this.options), localOptions || {}),
self = this;
options.root = path.join(options.root, type);

@@ -101,4 +101,5 @@

_scanDir: function(root, pathToDir, recursive) {
_scanDir: function(root, pathToDir, recursive, extension) {
var pattern = new RegExp('^' + pathToDir.replace(/\*/, '.*'), 'g'),
extPattern = new RegExp(extension + '$'),
dirs = [],

@@ -116,3 +117,3 @@ matches = [],

if (match.match(pattern) && !stat.isDirectory())
if (match.match(pattern) && match.match(extPattern) && !stat.isDirectory())
matches.push(fullPath);

@@ -125,3 +126,3 @@ if (stat.isDirectory())

dirs.forEach(function(dir) {
matches.push(self._scanDir(dir, '*', true));
matches.push(self._scanDir(dir, '*', true, extension));
});

@@ -128,0 +129,0 @@ }

@@ -11,3 +11,3 @@ {

},
"version": "0.1.2",
"version": "0.2.0",
"main": "index.js",

@@ -14,0 +14,0 @@ "dependencies": {

@@ -1,4 +0,4 @@

Mac OS X  2��ATTR'/���$�$com.macromates.caret{
column = 18;
line = 160;
Mac OS X  2��ATTR'j���$�$com.macromates.caret{
column = 106;
line = 13;
}

@@ -18,7 +18,7 @@ var vows = require('vows'),

function expanderFor(name) {
return new AssetsExpander(path.join(process.cwd(), 'test', 'assets', name), { root: rootPath, type: 'css' });
return new AssetsExpander(path.join(process.cwd(), 'test', 'assets', name), { root: rootPath });
};
function group(groupId) {
return expanderFor('assets.yml').processGroup('stylesheets', groupId);
return expanderFor('assets.yml').processGroup('stylesheets', groupId, { type: 'css' });
};

@@ -25,0 +25,0 @@

@@ -1,4 +0,4 @@

Mac OS X  2��ATTR'/���#�#com.macromates.caret{
Mac OS X  2��ATTR'j���#�#com.macromates.caret{
column = 29;
line = 47;
}

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