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

@cgzair/cca-template-alita

v1.4.9

Published

>基于 `Alitajs` 的移动端解决方案,更多使用请前往官网 <https://alitajs.com/>。

Downloads

5

Readme

cca-template-alita

基于 Alitajs 的移动端解决方案,更多使用请前往官网 https://alitajs.com/

开发环境

  • 建议 node 环境 14.18.3及以上,npm 版本 6.14.15及以上
  • 使用 vscode 开发时,运行 npm run extension ,安装所需依赖插件

技术栈

React + Alita + Antd-mobile + Mobx

快速开始

安装依赖

// 项目根目录下执行
yarn

启动

// 默认测试环境
npm run dev

// 预生产
npm run dev:preProd

// 生产环境
npm run dev:prod

// 热备环境
npm run dev:standby

移动端适配

移动端适配编写以 750px*1334px 为设计稿的尺寸,比如铺满横屏只需要写 width: 750px; 即可,程序会自动适配各种手机尺寸屏幕,适配原理采用的是 rem 适配方案,更多请搜索移动端 rem 适配即可。

本地业务组件文档

yarn run docs

模板已集成自动探测组件文档,请打开 http://localhost:9999/ 即可查看当前项目的本地业务组件文档,端口可能会被占用,请以实际运行的端口为准。

发版本

打开 http://jenkins.demo.com/ 在线 Jenkins 平台,平台地址因项目存在多变,具体请咨询运维人员,点击构建部署,选项如下:

// 默认测试环境
build

// 预生产
build:preProd

// 生产环境
build:pord

// 热备环境
build:standby

代码提交

  1. 常规提交须遵循《信息技术部前端编码手册》的Git规约,比如:

    git add .
    git commit -m 'feat: 完善登录'
  2. 可使用交互式命令终端,选择合适的类型以及说明回车保存即可:

    npm run commit

目录结构

这里罗列了项目中约定(或推荐)的目录结构,在项目开发中,请遵照这个目录结构组织代码。

├── config
│   └── config.ts
├── dist
├── mock
│   └── app.ts|tsx
├── public // 资源文件
├── src
│   ├── .umi
│   ├── .umi-production
│   ├── assets // 样式文件
│   ├── ├── fonts
│   └── ├── images
│   │   └── style
│   ├── layouts // 布局
│   │   ├── Layout.tsx
│   │   ├── style.scss
│   ├── common // 通用组件,少量业务逻辑
│   │   ├── components
│   │   │   └── SearchBar
│   │   ├── configs
│   │   │   └── endpoints.ts 
│   │   ├── utils
│   │   ├── store // mbox 状态管理
│   │   │   └── index.ts 
│   │   ├── utils
│   │   │   └── index.ts
│   │   └── constants
│   ├── pages // 通用组件,少量业务逻辑
│   │   ├── Home
│   │   │   ├── components // 业务组件,大量业务逻辑
│   │   │   └── User
│   │   │   ├── style.scss
│   │   │   └── index.tsx
│   │   ├── List
│   │   │   ├── style.scss
│   │   │   └── index.tsx
│   │   └── 404.tsx
│   ├── routes // 路由
│   │   └── index.ts
│   ├── services // 接口
│   │   └── api.ts
│   ├── app.tsx
│   ├── global.ts
│   ├── global.SCSS
│   └── plugin.ts
├── node_modules
│   └── .cache
│       ├── bundler-webpack
│       ├── mfsu
│       └── mfsu-deps
├── .env
├── package.json
├── tsconfig.json
└── typings.d.ts

开发资源指引

第三方库或工具