Skip to content

Commit

Permalink
Working version for internal link consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
Munter committed Jul 6, 2014
1 parent e98e598 commit bc4e236
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
28 changes: 28 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
var AssetGraph = require('assetgraph');
var request = require('request');


module.exports = function (options) {
options = options || {};

options.callback = options.callback || function () { console.warn('Done'); };
var ag = new AssetGraph({
root: options.root
});

ag.on('addRelation', function (rel) {
console.log(rel.toString());
});


ag.logEvents()
.loadAssets(options.initialAssets)
.populate({
followRelations: {
type: ['relative', 'rootRelative']
}
})
.run(options.callback);
};


3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
},
"homepage": "https://github.com/Munter/hyperlink",
"dependencies": {
"assetgraph": "^1.6.42"
"assetgraph": "^1.6.42",
"request": "^2.36.0"
}
}

0 comments on commit bc4e236

Please sign in to comment.