new Manifest(path, options)
Manifest
Parameters:
Name | Type | Description |
---|---|---|
path |
String | File path to the manifest JSON file |
options |
Object |
Properties:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object | the original config from the manifest JSON file | |||||||||
dependencies |
Object | the original dependencies property from the manifest JSON file | |||||||||
globs |
Object | see buildGlobs.globs property | |||||||||
paths |
Object |
Properties
|
- Source:
Methods
forEachDependency(type, callback)
forEachDependency
loops through the dependencies of the specified type and calls the callback for each dependency.
Parameters:
Name | Type | Description |
---|---|---|
type |
String | The type of dependencies you want to loop through. These can be |
callback |
function | Callback called per iteration with the arguments (value, index|key, collection) |
- Source:
- See:
getDependencyByName(name) → {Object}
getDependency
Parameters:
Name | Type | Description |
---|---|---|
name |
String |
- Source:
Returns:
- Type
- Object
getProjectGlobs() → {Object}
getProjectGlobs
gets
- Source:
Returns:
returns an object with properties corresponding to
- Type
- Object
Example
// if you had a manifest with a dependencies property that looked like:
{
"app.js": {
files: [ "scripts/main.js" ],
vendor: [ "vendor/hello-world.js" ]
}
"app.js": {
files: [ "styles/main.css" ],
vendor: [ "vendor/hello-world.css" ]
}
}
// then
manifest.getProjectGlobs();
// will output
{
"js": [
"scripts/main.js"
],
"css": [
"styles/main.css"
]
}