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

sp-base

v2.3.0

Published

Superproject is react + koa framework, sp-base is core code.

Downloads

9

Readme

sp-base [Superproject core]

Superproject 是基于 React + Koa 全栈技术框架。 sp-base 是实现Superproject的基础代码,提供了启动程序和可扩展接口。

扩展点

Client 可以扩展

redux middleware

redux reducer

react router

Server 可以扩展

koa middleware

koa router

// 新的使用use和mount,充分利用koa的中间件机制

接口使用

Client

import { redux, router, createConfigureStore, run } from 'superproject/client'

client.redux.use() // redux中间件
client.redux.reducer.use() // redux的reducer挂载
client.router.use() // react-router挂载
client.run() // 运行客户端

Server

import { middleware, router, commonMiddlewares, run } from 'superproject/server'

server.middleware.use() // koa-middleware中间件
server.router.use() // koa-router挂载
server.run() // 运行服务端

相关扩展(无链接表示未完成)

例子|说明 ----|---- sp-boilerplate|Superproject 项目示例

核心基础|说明 ----|---- sp-base|Superproject基础代码

工具|说明 ----|---- sp-css-loader|处理组件化样式的webpack loader,可与file-loader配合使用

服务端中间件(Koa)|说明 ----|---- sp-react-isomorphic|React(Redux)同构Koa中间件

模块 | 说明 ----|---- sp-css-import | 辅助sp-css-loader加载样式 sp-email|发邮件 sp-sms|发短信 sp-mongo|mongodb 操作对象 sp-qiniu|七牛存储操作

功能|说明 ----|---- sp-wx|微信相关功能 sp-cms|cms模块功能 sp-api|api接口生成 sp-schedule|时间表、计划任务 sp-auth|权限管理+登录

技术栈(计划使用)

组件化 - React 状态管理 - Redux 路由 - React-Router 同构 - React RenderToString Style导入 - wapper-css-loader 打包工具 - webpack2 组件库 - Material-UI CSS编译 - Less \ CSS ES6\7编译 - Babel

单元测试 - Mocha

HTTP服务 - Koa2 静态服务器 - 七牛云 缓存服务 - Redis 数据库 - MongoDB

NodeJS进程管理 - PM2 HTTP反向代理 - Nginx

环境容器 - Docker

代码管理 - Git 持续集成 - Jenkins

约定

Server API Response

{
    "code": 200, // 类似 HTTP Status Code
    "data": [], // or {}
    "msg": "返回提示语"
}