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

temp-test-scripts

v0.0.30

Published

Configuration and scripts for Create SP Vue.

Downloads

20

Readme

项目简介

  • 提供命令行工具 sp-scripts

    sp-scripts --help 获取帮助 sp-scripts new PROJECT_NAME 创建微前端子应用模板代码 sp-scripts new -t main PROJECT_NAME 创建微前端主应用模板代码

  • 提供全局的 webpack 配置文件,在模板项目里面通过安装 sp-scripts 来实现

  • 提供自动化构建部署脚本,通过 config.js 配置

使用

1, 配置 registry

 npm config set registry https://tmobile.dgg188.cn

2, 全局安装

 yarn global add temp-test-scripts
 npm install -g temp-test-scripts

3, 创建模板项目

sp-scripts new PROJECT_NAME
或者
sp-scripts new -t main PROJECT_NAME

4, 在项目根目录下安装依赖包

yarn

sp-scripts 版本管理和发布

每次发布 sp-scripts 的时候,需要首先将 package.json 里面的 version 版本号升级, 然后执行下面的命令。

npm publish

关于 vendor

我们的基础架构会将不常更改的三方库,例如 vue 等(配置scripts/vendor.js),打包到 vendor 目录中。

需要注意的是,vendor 是由版本号控制(utils.js中的 vendorVersion)的。每次修改scripts/vendor.js中的三方包,都需要将版本号+1,然后发现新一版的 sp-scripts。

在产品功能发布中,一个 vendor 版本号只能被构建一次,不允许重复使用一个版本号进行多次构建。

没有特殊情况,不要私自向 package.json 中添加三方依赖。

技术栈

vue+single-spa+webpack+babel+eslint+jenkins

模板代码目录结构说明

各目录以实际项目为准,以下为常用目录:

  • api 接口请求

  • assets 为静态资源目录,有 images、styles、fonts 等。

  • components 为通用组件目录。

  • constants 为常量目录。

  • router 路由配置

  • store 全局状态

  • utils 工具方法

  • views 各路由模块

  • plugins 插件模块

  • config 配置