npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ztes/framework

v0.0.1

Published

PDD Framework

Downloads

5

Readme

PDD Framework

PDD⭐ - 是数企官方开发的纯前端容器框架,在Typescript赋能下基于IOC开发出的OOP框架,同时通过内置模块可快速实现AOP开发。

PDD能带来什么:

  • 统一代码,规范化。
  • 更好的拓展、易于维护。
  • 提升开发效率,开发只需考虑解决具体功能即可。

为什么要做PDD:

  • 1.由于前端只有Vue/React/NG等MVVM框架,缺少像Spring、Laravel、Django这类架构更清晰、生态更完善的框架 [当然现在有了像Nest.js、Midway.js这类Node.js服务端框架] ,导致绝大多数纯前端对开发项目的认知不足。
  • 2.前端缺少较为完整的开发方案,导致整体项目“乱”-高耦合、低聚合。PDD给前端项目开发整体规范化约束。
  • 3.提升可维护性,目前PDD从整体配置到应用层面的拓展都有着明确的规定。大家都怕见到“宝藏代码”,“千人千面”这些给开发者造成的困扰无异乎抛出异常缺没有指出异常具体位置,很难维护。

如何使用:

# 通过npm方式安装
npm i pdd
# 通过cnpm方式安装 
cnpm i pdd 
# 通过yarn方式安装
yarn add pdd 
# 通过pnpm方式安装,推荐
pnpm add pdd 

集成到现有框架中,以Vue3+TS项目为模板来说

// main.ts
/********** PDD Start **********/
import Application from 'pdd'
// PDD AppConfig 获取App配置文件
import AppConfig from './app/config/AppConfig'
// PDD Setting Config
Application.setAppConfig(AppConfig)
// PDD Run
Application.run()
// 如需使用日志系统
import { Log } from 'pdd'
// 日志初始化配置
Log.init({
	// 使用web-sql方式存储
	storage:'WEB_SQL',
	// 存储的总条数,再超出范围后会将最先存储的日志给替换,请参照日志系统文档
	total:10000,
	// 控制台打印的级别,error及以下的级别在控制台打印,默认为debug级别,设置为false时则全部级别不在控制台打印
	console:'error'
})
// 如需使用任务系统
import { Job } from 'pdd'
// 启动任务系统,具体细节请参照任务系统文档
Job.boot()

更多使用方法参照 [官方文档]: https://jxbse4s2oz1.feishu.cn/wiki/wikcnX8DSYtb1agME6mxb6NRfrQ

ChangeLog:

Version 0.3.20

  1. 添加中间件上下文
  2. http方法参数处理更新

Version 0.3.15

  1. 请求中间件和响应中间件添加上下文。
  2. 请求方法添加fetch方法,返回为上下文。

Version 0.3.14

  1. $http.send方法处理自定义request headers会覆盖自动携带数据问题。

Version 0.3.13

  1. GET去除携带Content-Type

Version 0.3.7

  1. 启动BUG处理。

Version 0.3.6

  1. ApplicationServiceProviderHttpServiceMiddlewareContainer等类型进行了深度优化。
  2. PipelineLog部分代码重构,Pipeline做类似Java lite-flow组合式、并联、串联校验,Log使用三方Dexie.js处理SQL处理。