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

›Guida

Guida

  • Introduzione
  • Creare la tua torre
  • Aggiungere livelli
  • Definire le abilità
  • Definendo le Unità
  • Refactoring
  • Test
  • Pubblicare

API creatore

  • API relative allo spazio
  • API dell'unità
Translate

Pubblicare

Questa è la struttura minima di un pacchetto torre:

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

In cui index.js conterrebbe il codice che abbiamo scritto attraverso questa guida, e package.json le informazioni del pacchetto 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"
  }
}

Alcune considerazioni speciali:

  • Affinché la torre venga caricata automaticamente da WarriorJS, il nome del pacchetto deve iniziare per warriorjs-tower-.
  • Affinché la tua torre venga trovata più facilmente, warriorjs-tower dovrebbe stare nel campo "keywords".

Mentre stai lavorando su una torre, puoi usarenpm pack per creare un tarball della torre, e poi installa il file dove hai installato anche @warriorjs/cli nel seguente modo:

npm install <path/to/tarball>

Dopo aver fatto ciò, l'esecuzione di warriosjs dovrebbe caricare la tua torre in modo automatico.

Dopo che avrai testato e aggiustato la tua torre, sei pronto per pubblicarla su npm affinché gli altri possano giocarla. Segui questa guida per imparare a pubblicare un pacchetto su npm.

← TestAPI relative allo spazio →
WarriorJS Docs
Docs
PlayerMaker
Community
SpectrumTwitterFollow WarriorJS on Twitter
More
DonateGitHubStar