nabil-boag / angular-multimocks

Tools for managing mock data scenarios in AngularJS applications.
MIT License
35 stars 11 forks source link

0.6.8 #55

Closed softchris closed 8 years ago

softchris commented 8 years ago

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

nabil-boag commented 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

chrisnoringovo commented 8 years ago

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 )

nabil-boag commented 8 years ago

Yea, the empty file thing should be solved in 0.6.10

chrisiconolly commented 8 years ago

@softchris are you happy for us to close this issue?

chrisnoringovo commented 8 years ago

yes

chrisnoringovo commented 8 years ago

from @softchris :)