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

@flyriselink/pai-project

v1.3.0-rc.2

Published

pai-project front-end all-in-one

Downloads

128

Readme

pai-project


介绍

pai-project 是能使前端 工程一体化 插件。


安装使用

安装

npm install @flyriselink/pai-project -S

更新

npm update @flyriselink/pai-project

配置初始化

根目录下新建文件 pai-project/index.js

const PaiProject = require('@flyriselink/pai-project')

PaiProject({
  process: process,
  // log: false,
})

参数说明

| 参数 | 说明 | 默认值 | | --------- | ------------------------ | ------------------ | | process | 环境参数(必填) | process | | main | 主入口 | std | | target | 代码集成入口 | application | | log | 是否输出日志 | true | | parentDir | 项目父级文件夹 | project | | - | | | | format | 项目文件夹格式:需{name} | {name} | | devCmd | 项目命令: 开发运行 | npm run dev | | buildCmd | 项目命令: 编译 | npm run build:prod | | prodCmd | 项目命令: 启动 | npm run prod | | - | | | | isCompare | 进入文件夹差异对比 | |


使用

- 先将代码移入到文件夹:标准版 [std]
- 项目代码,新建 [project] 文件夹下,新建 [项目A] 文件夹,根据 [std] 目录层级:新增、修改文件
- 与 [std] 内代码一样的,不需建在项目下
- 项目启动:最终以 [application] 文件夹下代码进行:运行/编译
- 设置 git 忽略 [application] 文件夹内容提交

├─application                   // 代码运行入口(不需提交git)
├─pai-project                   // 初始化配置文件
├─std                           // 标准版
│  ├─... // 代码
│  └─...
├─project                       // 项目总目录
│  ├─项目A                      // 项目A
│  └─项目B                      // 项目B
│     ├─... // 代码
│     └─...
// 更改 package.json

{
  "scripts": {
    "p-i": "cross-env MODE=install node pai-project/index",
    "p-install": "cross-env MODE=install node pai-project/index",
    "dev": "cross-env MODE=dev node pai-project/index",
    "build": "cross-env MODE=build node pai-project/index",
    ...
  }
}
// 以上为:安装项目依赖、启动项目、编译项目
// 安装插件依赖
$ npm i

// 安装项目依赖(注意:需安装两次依赖)
$ npm run p-i -P 项目名称

// 运行项目
$ npm run dev -P 项目名称

// 编译
$ npm run build -P 项目名称

文件夹差异对比

// 1.开启 isCompare 属性

// 2.执行对比 (在 [package.json] 添加 compare 命令)

   $ npm run compare 项目名称

// 3.对比说明:若项目文件与标准版[无差异],则会被自动删除(可关闭自动删除: autoDel)

更新日志(ChangeLog)

  • 1.3.0

    优化

    • 支持项目依赖另外项目
  • 1.2.0

    优化

    • 文件同步时优化
  • 1.1.0

    优化

    • 初始化时,需传入 process
  • 1.0.2

    优化

    • 文件夹对比差异,删除空文件夹
  • 1.0.1

    新增

    • 文件夹对比差异
  • 1.0.0

    新增

    • 工程一体化 all-in-one

LICENSE

MIT