Comparing version 0.2.0 to 0.3.0
@@ -15,2 +15,4 @@ /* | ||
var ignorePath; | ||
var jsPattern = '<script src="{{filePath}}"></script>'; | ||
var cssPattern = '<link rel="stylesheet" href="{{filePath}}" />'; | ||
@@ -58,6 +60,6 @@ var regex = { | ||
css: function (path) { | ||
return '<link rel="stylesheet" href="' + path + '" />'; | ||
return cssPattern.replace('{{filePath}}', path); | ||
}, | ||
js: function (path) { | ||
return '<script src="' + path + '"></script>'; | ||
return jsPattern.replace('{{filePath}}', path); | ||
} | ||
@@ -122,2 +124,5 @@ }[blockType]; | ||
module.exports = function inject(config) { | ||
jsPattern = config.get('js-pattern') || jsPattern; | ||
cssPattern = config.get('css-pattern') || cssPattern; | ||
globalDependenciesSorted = config.get('global-dependencies-sorted'); | ||
@@ -124,0 +129,0 @@ ignorePath = config.get('ignore-path'); |
{ | ||
"name": "wiredep", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Wire dependencies to your source code.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/stephenplusplus/wiredep", |
@@ -13,3 +13,5 @@ # wiredep | ||
ignorePath: 'optional path to ignore from the injected filepath.', | ||
htmlFile: 'the path to the HTML file to take control of.' | ||
htmlFile: 'the path to the HTML file to take control of.', | ||
jsPattern: 'default: <script src="{{filePath}}"></script>', | ||
cssPattern: 'default: <link rel="stylesheet" href="{{filePath}}" />' | ||
}); | ||
@@ -16,0 +18,0 @@ ``` |
Sorry, the diff of this file is not supported yet
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
14777
377
26