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 🙏

© 2026 – Pkg Stats / Ryan Hefner

generator-phaser-practice

v0.2.4

Published

yeoman generator of phaser practice

Readme

generator-phaser-practice

phaser练习使用的Yeoman Generator

使用方法

安装

1.安装yo

$ npm install -g yo

2.安装generator-phaser-practice

$ npm install -g generator-phaser-practice

相关工具安装

由于练习用的项目多为静态页面,没有serve工具,生成项目使用时需要手动serve。建议使用live-server;

$ npm install -g live-server

live-server当文件变化时会自动重新刷新

生成JavaScript的练习项目

  • 创建一个基于javascript最简单的练习用项目,没有任何的构建工具,没有State。
$ yo phaser-practice
  • 创建一个基于javascript的练习用项目,带有State。
$ yo phaser-practice:state
以下为 ts 部分

生成TypeScript的练习项目

创建一个基于typescript最简单的练习用项目,没有自动构建工具,没有State。

使用
$ yo phaser-practice:tssimple
启动页面
  1. Build. 点击vscode菜单栏任务,点击 运行生成任务 或者 使用快捷键 windows默认为 Ctrl + Shift + B
  2. Server. cd bin;live-server
目录结构
│  package.json
│  tsconfig.json
│
├─.vscode
│      tasks.json
│
├─bin
│  │  index.html
│  │
│  ├─assets
│  │      angry.png
│  │      happy.png
│  │
│  └─js
│          phaser.min.js
│
├─defs
│      p2.d.ts
│      phaser.d.ts
│      pixi.d.ts
│
└─src
        game.ts
  • defs 为phaser定义文件,用于vscode中使用编写phaser项目时使用代码提示
  • src ts 文件所在的项目路径
  • bin 项目最终输出的,能够运行的文件夹
  • .vscode vscode项目配置文件。tasks.json 为使用vscode task所需的配置文件
  • package.json npm命令所需的配置文件
  • tsconfig.json typescript tsc命令所需的配置文件