requirejs-memfiles
Advanced tools
Comparing version 2.1.15-2 to 2.1.15-3
{ | ||
"name": "requirejs-memfiles", | ||
"version": "2.1.15-2", | ||
"version": "2.1.15-3", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -23,20 +23,23 @@ ## Why requirejs-memfiles? | ||
requirejs.setFiles( files ); | ||
requirejs.optimize({ | ||
appDir: ".", | ||
baseUrl: ".", | ||
dir: "dist", | ||
modules: [{ | ||
name: "output", | ||
include: "main", | ||
create: true | ||
}] | ||
}, function() { | ||
var output = files[ "dist/output.js" ]; | ||
... | ||
requirejs.setFiles( files, function( done ) { | ||
requirejs.optimize({ | ||
appDir: ".", | ||
baseUrl: ".", | ||
dir: "dist", | ||
modules: [{ | ||
name: "output", | ||
include: "main", | ||
create: true | ||
}] | ||
}, function() { | ||
var output = files[ "dist/output.js" ]; | ||
... | ||
done(); | ||
}, function( error ) { | ||
// handle error | ||
... | ||
}, function( error ) { | ||
// handle error | ||
... | ||
done(); | ||
}); | ||
}); | ||
@@ -47,3 +50,3 @@ ``` | ||
- **`requirejs.setFiles( files )`** | ||
- **`requirejs.setFiles( files, callback )`** | ||
@@ -60,2 +63,5 @@ **files** *Object* containing (path, data) key-value pairs, e.g.: | ||
- **callback** *Function* called with one argument: a callback function that | ||
must be called when use is complete. | ||
## Test | ||
@@ -62,0 +68,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12772
71