wesber
A simple web resource dependencies finder and replacer.
Why make this? When we try to build web static files, we should trace all of the resources which the page depends. Then need a tool to help find the dependencies and replace their url (using hash as placeholder), which is wesber.
Usage
API
const css html =
Example
result:
result = file: '/Users/boom/Github/wesber/test/files/style.css' source: '.icon-a{\nbackground: url(foo.png)no-repeat;\n}\n' replacer: '.icon-a{\nbackground: url(#b0b5895c)no-repeat;\n}' dependencies: file: 'foo.png' hash: '#b0b5895c' entireUri: false base64: false path: '/Users/boom/Github/wesber/test/files/foo.png' exists: false
License
MIT