MCPcopy Index your code
hub / github.com/socketstream/socketstream / define

Function define

lib/client/bundler/default.js:42–57  ·  view source on GitHub ↗
(paths)

Source from the content-addressed store, hash-verified

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) {

Callers 5

jquery.min.jsFile · 0.50
lib-1.0.min.jsFile · 0.50
jquery.min.jsFile · 0.50
marked.jsFile · 0.50

Calls 1

includeFlagsFunction · 0.85

Tested by

no test coverage detected