New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nuxt-typed-router

Package Overview
Dependencies
Maintainers
1
Versions
216
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuxt-typed-router - npm Package Compare versions

Comparing version 0.1.8 to 0.1.9

9

lib/module.js

@@ -37,3 +37,3 @@ // @ts-check

const template = `
export const routerPagesNames = ${routesInterfaces};`;
export const ${options.routesObjectName || 'routerPagesNames'} = ${routesInterfaces};`;
const routesEnumsTemplate = `export type RouteNames = ${routesEnum.join('|')};`;

@@ -51,4 +51,7 @@

});
await fs.writeFileSync(path.resolve(process.cwd(), options.filePath), formatedModelsFile);
console.log(chalk.green('[nuxt-typed-router] Route definition file generated'));
const savePath = path.resolve(process.cwd(), options.filePath);
await fs.writeFileSync(savePath, formatedModelsFile);
console.log(
chalk.green(`[nuxt-typed-router] Route definition file generated at ${savePath}`)
);
}

@@ -55,0 +58,0 @@

{
"name": "nuxt-typed-router",
"version": "0.1.8",
"version": "0.1.9",
"description": "Provide autocompletion for pages route names generated by Nuxt router",

@@ -5,0 +5,0 @@ "main": "lib/module.js",

@@ -51,2 +51,14 @@ # 🚦Typed Router Module

Options:
```ts
type Options = {
// Path to where you cant the file to be saved (ex: "./src/models/__routes.ts")
filePath?: string;
// Name of the routesNames object (ex: "routesTree")
// Default: "routerPagesNames"
routesObjectName?: string;
};
```
# Usage in Vue/Nuxt

@@ -53,0 +65,0 @@

@@ -7,2 +7,3 @@ import Vue from 'vue';

filePath?: string;
routesObjectName?: string;
}

@@ -9,0 +10,0 @@

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