🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

uni-parse-pages

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uni-parse-pages

#### 介绍 读取 uni-app 项目 pages.json 中的配置,转换为 uni-mini-router 的路由表结构

latest
npmnpm
Version
0.0.1
Version published
Weekly downloads
171
21.28%
Maintainers
1
Weekly downloads
 
Created
Source

uni-parse-pages

介绍

读取 uni-app 项目 pages.json 中的配置,转换为 uni-mini-router 的路由表结构

安装

Yarn
yarn add uni-parse-pages -D
npm
npm install uni-parse-pages --save

使用

读取pages.json文件生成uni-mini-router的路由表。在router配置文件中增加已下配置:

// router.ts

// 导入pages.json
import pagesJson from '../pages.json'
// 引入uni-parse-pages
import pagesJsonToRoutes from 'uni-parse-pages'
// 生成路由表
const routes = pagesJsonToRoutes(pagesJson)

Keywords

uni-app

FAQs

Package last updated on 31 May 2023

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