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

wiredep

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wiredep - npm Package Compare versions

Comparing version 0.5.2 to 1.0.0

12

lib/detect-dependencies.js

@@ -290,4 +290,14 @@ /*

module.exports = function detect(config) {
_.each(config.get('bower.json').dependencies, gatherInfo(config));
var allDependencies = {};
if (config.get('dependencies')) {
_.assign(allDependencies, config.get('bower.json').dependencies);
}
if (config.get('dev-dependencies')) {
_.assign(allDependencies, config.get('bower.json').devDependencies);
}
_.each(allDependencies, gatherInfo(config));
config.set('global-dependencies-sorted', filterExcludedDependencies({

@@ -294,0 +304,0 @@ js: prioritizeDependencies(config, '.js'),

50

lib/inject-dependencies.js

@@ -32,24 +32,52 @@ /*

yaml: {
block: /(([\s\t]*)#\s*bower:*(\S*))(\n|\r|.)*?(#\s*endbower)/gi,
jade: {
block: /(([\s\t]*)\/\/\s*bower:*(\S*))(\n|\r|.)*?(\/\/\s*endbower)/gi,
detect: {
js: /-\s(.+)/gi,
css: /-\s(.+)/gi
js: /script\(.*src=['"](.+)['"]>/gi,
css: /link\(href=['"](.+)['"]/gi
},
replace: {
js: '- {{filePath}}',
css: '- {{filePath}}'
js: 'script(src=\'{{filePath}}\')',
css: 'link(rel=\'stylesheet\', href=\'{{filePath}}\')'
}
},
jade: {
sass: {
block: /(([\s\t]*)\/\/\s*bower:*(\S*))(\n|\r|.)*?(\/\/\s*endbower)/gi,
detect: {
js: /script\(.*src=['"](.+)['"]>/gi,
css: /link\(href=['"](.+)['"]/gi
css: /@import\s['"](.+)['"]/gi,
sass: /@import\s['"](.+)['"]/gi,
scss: /@import\s['"](.+)['"]/gi
},
replace: {
js: 'script(src=\'{{filePath}}\')',
css: 'link(rel=\'stylesheet\', href=\'{{filePath}}\')'
css: '@import {{filePath}}',
sass: '@import {{filePath}}',
scss: '@import {{filePath}}'
}
},
scss: {
block: /(([\s\t]*)\/\/\s*bower:*(\S*))(\n|\r|.)*?(\/\/\s*endbower)/gi,
detect: {
css: /@import\s['"](.+)['"]/gi,
sass: /@import\s['"](.+)['"]/gi,
scss: /@import\s['"](.+)['"]/gi
},
replace: {
css: '@import "{{filePath}}";',
sass: '@import "{{filePath}}";',
scss: '@import "{{filePath}}";'
}
},
yaml: {
block: /(([\s\t]*)#\s*bower:*(\S*))(\n|\r|.)*?(#\s*endbower)/gi,
detect: {
js: /-\s(.+)/gi,
css: /-\s(.+)/gi
},
replace: {
js: '- {{filePath}}',
css: '- {{filePath}}'
}
}

@@ -56,0 +84,0 @@ };

{
"name": "wiredep",
"main": "./wiredep.js",
"version": "0.5.2",
"version": "1.0.0",
"description": "Wire Bower dependencies to your source code.",

@@ -42,4 +42,5 @@ "repository": "stephenplusplus/wiredep",

"lodash": "~1.3.0",
"chalk": "~0.1.1"
"chalk": "~0.1.1",
"glob": "~3.2.8"
}
}

@@ -13,3 +13,3 @@ # wiredep

bowerJson: 'your bower.json file contents.',
src: ['filepaths', 'to take', 'control of.'],
src: ['filepaths', 'and/even/globs/*.html' 'to take', 'control of.'],

@@ -51,2 +51,43 @@ // ----- Advanced Configuration -----

},
jade: {
block: /(([\s\t]*)\/\/\s*bower:*(\S*))(\n|\r|.)*?(\/\/\s*endbower)/gi,
detect: {
js: /script\(.*src=['"](.+)['"]>/gi,
css: /link\(href=['"](.+)['"]/gi
},
replace: {
js: 'script(src=\'{{filePath}}\')',
css: 'link(rel=\'stylesheet\', href=\'{{filePath}}\')'
}
},
sass: {
block: /(([\s\t]*)\/\/\s*bower:*(\S*))(\n|\r|.)*?(\/\/\s*endbower)/gi,
detect: {
css: /@import\s['"](.+)['"]/gi,
sass: /@import\s['"](.+)['"]/gi,
scss: /@import\s['"](.+)['"]/gi
},
replace: {
css: '@import {{filePath}}',
sass: '@import {{filePath}}',
scss: '@import {{filePath}}'
}
},
scss: {
block: /(([\s\t]*)\/\/\s*bower:*(\S*))(\n|\r|.)*?(\/\/\s*endbower)/gi,
detect: {
css: /@import\s['"](.+)['"]/gi,
sass: /@import\s['"](.+)['"]/gi,
scss: /@import\s['"](.+)['"]/gi
},
replace: {
css: '@import "{{filePath}}";',
sass: '@import "{{filePath}}";',
scss: '@import "{{filePath}}";'
}
},
yml: {

@@ -53,0 +94,0 @@ block: /(([\s\t]*)#\s*bower:*(\S*)\s*)(\n|\r|.)*?(#\s*endbower\s*)/gi,

@@ -11,2 +11,3 @@ /*

var glob = require('glob');
var helpers = require('./lib/helpers');

@@ -23,11 +24,18 @@

config.set
('warnings', [])
('global-dependencies', helpers.createStore())
('src', Array.isArray(opts.src) ? opts.src : [opts.src])
('bower.json', opts.bowerJson)
('bower-directory', opts.directory)
('dependencies', opts.dependencies === false ? false : true)
('dev-dependencies', opts.devDependencies)
('exclude', opts.exclude)
('file-types', opts.fileTypes)
('global-dependencies', helpers.createStore())
('ignore-path', opts.ignorePath)
('exclude', opts.exclude);
('src', [])
('warnings', []);
(Array.isArray(opts.src) ? opts.src : [opts.src]).
forEach(function (pattern) {
config.set('src', config.get('src').concat(glob.sync(pattern)));
});
require('./lib/detect-dependencies')(config);

@@ -34,0 +42,0 @@ require('./lib/inject-dependencies')(config);

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