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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@taole/smallgames

v0.2.71

Published

点点小游戏

Readme

数字炸弹说明

https://y-test.tuwan.com/smallGameTips_numBomb https://y-test.tuwan.com/smallGameTips_numBomb

弹幕答题说明

https://y.tuwan.com/smallGameTips_question https://y.tuwan.com/smallGameTips_question

项目介绍

小游戏, 同时支持h5 和 web端npm

项目地址

本地开发环境:https://y-dev.tuwan.com/chartRoom/smallgames

测试环境地址:https://y-test.tuwan.com/smallgames

线上环境地址:https://y.tuwan.com/smallgames

技术栈

svelte、webpack

svelte 官网 webpack 文档地址

项目启动

  • npm i 安装依赖
  • npm run dev 本地开发 访问地址: https://y-dev.tuwan.com:8080/
  • npm run build 打包构建
  • npm run start 运行打包后的项目

跑起不起来用yarn node 版本 16.13.1

其他

  1. 项目支持ts, <script type="ts"> 就可以启用 ts 检测
  2. 打包的配置就一个webpack.config.ts
  3. div 添加点击事件 会报错, 必须给 div 添加 role="presentation"; 这是因为 svelte 的特殊性导致的
  4. 发布npm的时候执行:npm publish --access public

使用

正常npm 安装, 注意样式的引入:

@import "dd-games/public/build/bundle.css"; 

发布测试环境

每次发布请更新版本号(package.json#version)

构建web独立版本(移动端App使用)

  1. npm run build 产物在dist目录下
  2. dist/assets/* 复制到项目 Staticsmallgames/assets/下, 更新至Static项目的master分支即可(本质是将构建产物放至cdn, 更新之后10s左右即可访问, 路径: https://asset.tuwan.com/smallgames/assets/xxx)
  3. dist/index.html的文件内容 覆盖项目 OfficialSite中的 smallgames.htm, 注意OfficialSite项目要使用自己的功能 分支。 同时手动更新测试环境服务器 192.168.0.35@root:/home/web/website/tuwan_www/templets/static/play/smallgames.htm

发布对应npm包(PC web大厅使用)

  1. npm run build-npm 产物在npm目录下
  2. npm publish
  3. 发布完成之后,修改项目ChatRoomSvelteNew中package.json中@taole/smallgames的版本为本次更新的最新版本,更新至其分支master-test-1023 然后在流水线触发ChatRoomSvelteNew-Test

发布到线上

基本类似发布到测试环境

TODO

  • 脚本发布测试环境: 基本完成, 考虑补充一个自动增加小版本号 npm version path