(paths)
| 40 | |
| 41 | |
| 42 | function define(paths) { |
| 43 | |
| 44 | if (typeof paths.view !== 'string') { |
| 45 | throw new Error('You may only define one HTML view per single-page client. Please pass a filename as a string, not an Array'); |
| 46 | } |
| 47 | if (paths.view.lastIndexOf('.') <= 0) { |
| 48 | throw new Error('The \'' + paths.view + '\' view must have a valid HTML extension (such as .html or .jade)'); |
| 49 | } |
| 50 | |
| 51 | // Define new client object |
| 52 | client.paths = ss.bundler.sourcePaths(paths); //TODO how to handle root being deeper than node_modules |
| 53 | client.includes = includeFlags(paths.includes); |
| 54 | client.constants = paths.constants || paths.consts; |
| 55 | client.locals = paths.locals; |
| 56 | client.entryInitPath = ss.bundler.findEntryPoint(client); |
| 57 | } |
| 58 | |
| 59 | //TODO callback(err,output) for pack to flag error |
| 60 | function asset(entry, opts, cb) { |
no test coverage detected