ResourseConverters: Promising, Asynchronous, Pluggable & Reusable
Pre-release
Pre-release
ResourceConverters:
- fix #30 - Both Synchronous & Asynchronous (nodejs callbacks & A+ promises) ResourceConverters
- fix #58 - RC's have options :
a) When creating using the alternative array []
format its the *last item, or it can take the place of convFilename
if that is misisng.
b) When searching, a ['rcname', {some: 'option'}]
style lookup can be used that updates options
. It allows a changed filez
shortcut like ['less', ['myStyle/**/*.less'], { $srcMain: 'style/myMainStyle.less'} ]
- fix #57 - loading RCs from
node_modules/urequire-rc-#{rcname}
if not already on registry. - RC properties passed along with
options: {$: {srcMain:'...', convertFilename: '...'}}
oroptions: { $srcMain: '...', $convertFilename: '...' }
- If the same RC appears in
bundle.resources
more than once, only the last declared one remains. Effectively you change its position. If you really want them twice, clone 'em :-) - All
FileResource
<--TextResource
<--Module
instances now have asrcMainFilepath
&srcMainRealpath
property. - Bug fixed when instantiated and registered a new ResourceConverter
config:
build.deleteErrored
(cleans dst file while src is in error)
Internal / refactoring:
Bundle:
- Many methods now return when/A+ promises
- Minimized usage of
when.promise(resolve, reject)
-when.node.lift
is much better. getBundleFile
methodsrcMain
handling / throwing if not in @filenames- better duplicate src error handling (but still jerky on watch)
- clean dst when source is missing
- improved bundle.printError
Module.convert(@build)
urequire-spec:
- cloning & copying ../urequire_example to temp/urequire_example