Socket
Socket
Sign inDemoInstall

ember-router-generator

Package Overview
Dependencies
Maintainers
5
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-router-generator

MicroLib to add or remove routes from your Ember.js router.


Version published
Weekly downloads
89K
decreased by-21.56%
Maintainers
5
Weekly downloads
 
Created

What is ember-router-generator?

The ember-router-generator npm package is a utility for programmatically manipulating Ember.js router files. It allows developers to add, remove, and modify routes in an Ember.js application with ease.

What are ember-router-generator's main functionalities?

Add Route

This feature allows you to add a new route to the Ember.js router file. The `addRoute` function takes the path to the router file and an object representing the new route, and returns the updated router content.

const { addRoute } = require('ember-router-generator');
const routerFile = 'app/router.js';
const newRoute = { name: 'about', path: '/about' };
const updatedRouter = addRoute(routerFile, newRoute);
console.log(updatedRouter);

Remove Route

This feature allows you to remove an existing route from the Ember.js router file. The `removeRoute` function takes the path to the router file and the name of the route to be removed, and returns the updated router content.

const { removeRoute } = require('ember-router-generator');
const routerFile = 'app/router.js';
const routeName = 'about';
const updatedRouter = removeRoute(routerFile, routeName);
console.log(updatedRouter);

Modify Route

This feature allows you to modify an existing route in the Ember.js router file. The `modifyRoute` function takes the path to the router file, the name of the route to be modified, and an object representing the new route, and returns the updated router content.

const { modifyRoute } = require('ember-router-generator');
const routerFile = 'app/router.js';
const routeName = 'about';
const newRoute = { name: 'about-us', path: '/about-us' };
const updatedRouter = modifyRoute(routerFile, routeName, newRoute);
console.log(updatedRouter);

Other packages similar to ember-router-generator

FAQs

Package last updated on 03 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc