Skip to content

Instantly share code, notes, and snippets.

@abuiles
Created February 2, 2015 17:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abuiles/e7c5cf6d6fadd7a2e4c7 to your computer and use it in GitHub Desktop.
Save abuiles/e7c5cf6d6fadd7a2e4c7 to your computer and use it in GitHub Desktop.
var EmberRouterGenerator = require('./index.js');
var fs = require('fs');
var source = fs.readFileSync('./tests/fixtures/basic-route.js');
var routes = new EmberRouterGenerator(source);
var newRoutes = routes.add('foos/bar/baz', {type: 'resource'});
fs.writeFileSync('out.js', newRoutes.code());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment