Comparing version 0.5.2 to 1.0.0
@@ -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'), |
@@ -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); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
20707
538
1
113
3
+ Addedglob@~3.2.8
+ Addedglob@3.2.11(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedlru-cache@2.7.3(transitive)
+ Addedminimatch@0.3.0(transitive)
+ Addedsigmund@1.0.1(transitive)