Closed softchris closed 8 years ago
Hey @softchris.
Sorry your having issues with Multimocks.
I'm having trouble replicating your issue, though I did have some issue with the writefile
library writing empty files. I have fixed this issue and it will be available in version 0.6.10
.
Multimocks makes no assumption of src/dest structure, the src can be an arbitrary path to a directory containing mock files. There is only one file name that is mandated and that is the mock manifest file mockResources.json
that should be in the root of the src
directory that you specify.
Here is an example config that I am using in one of my projects:
multimocks: {
exampleApp: {
src: 'app/src/mocks',
dest: 'app/build/multimocks.mock.js'
}
}
I would like to help resolve your issue so please let know any more details about your setup (node version, os) etc.
Thanks
After a bit fixing I managed to only get the part of empty files when running it with grunt.. looking forward to testing 0.6.10 . Keep up the good work ( softchris through my other account )
Yea, the empty file thing should be solved in 0.6.10
@softchris are you happy for us to close this issue?
yes
from @softchris :)
Seem like when running grunt multimocks grunt.initConfig({ multimocks: { myApp: { src: 'mocks', dest: 'build/multimocks.js', multipleFiles: false } }, // other config here... });
It asumes your structure is multimocks/mocks also it gives you a warning saying "path must be a string" and then it exits... so it doesn't work to generate mocks, at all