WarriorJS Docs
  • Player
  • Maker
  • 社区
  • 中文
    • English
    • العربية
    • Català
    • Čeština
    • Deutsch
    • Ελληνικά
    • Español
    • Français
    • Italiano
    • Polskie
    • Русский
    • Српски језик (Ћирилица)
    • Svenska
    • Türkçe
    • 繁體中文
    • 帮助翻译
  • GitHub

›向导

向导

  • 介绍
  • Creating Your Tower
  • 增加级别
  • Defining Abilities
  • Defining Units
  • Refactoring
  • Testing
  • 发布

制造者 API

  • 空间 API
  • 单元 API
Translate

发布

这是一个塔程序包的最小结构:

warriorjs-tower-got
├── index.js
└── package.json

其中 index. js 将包含我们通过本指南编写的代码, 以及 package. json -npm 软件包信息:

{
  "name": "warriorjs-tower-got",
  "version": "0.1.0",
  "description": "There is only one war that matters: the Great War. And it is here.",
  "main": "index.js",
  "keywords": ["warriorjs-tower"],
  "dependencies": {
    "@warriorjs/geography": "^0.4.0"
  }
}

一些特殊注意事项

  • 包名必须从 warriorjs-tower- 开始, 以便 WarriorJS 自动加载该塔。
  • warriorjs-tower 应该在 "keywords" 域中, 以便你的塔具有更好的可检索性.

When working on a tower, you can use npm pack to create a tarball for it, and then install it where you installed @warriorjs/cli by doing:

npm install <path/to/tarball>

After doing that, running warriorjs should load your tower automatically.

Once you've tested and adjusted your tower, you're ready to publish it to npm for others to play it. Follow this guide to learn how to publish a package to npm.

← Testing空间 API →
WarriorJS Docs
Docs
PlayerMaker
Community
SpectrumTwitterFollow WarriorJS on Twitter
More
DonateGitHubStar