# @urso/tools

> Urso assets opt tools pack

Latest version **0.3.0** (published 2022-11-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @urso/tools
pnpm add @urso/tools
yarn add @urso/tools
bun add @urso/tools
```

Provides the commands `urso-clean`, `urso-pack-images`, `urso-pack-sounds`, `urso-get-localization-keys`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2022-11-01 |
| First published | 2021-11-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=12.0.0 |
| Dependencies | 12 |
| Unpacked size | 247.2 KB |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| Author | Alkott |
| Maintainers | megbrimef, alkott |

## Links

- npm: https://www.npmjs.com/package/@urso/tools
- npm.io page: https://npm.io/package/@urso/tools

## Dependencies (12)

- [args](https://npm.io/package/args.md) ^5.0.1
- [chalk](https://npm.io/package/chalk.md) ^4.1.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [xml2js](https://npm.io/package/xml2js.md) ^0.4.23
- [commander](https://npm.io/package/commander.md) ^8.2.0
- [puppeteer](https://npm.io/package/puppeteer.md) ^19.2.0
- [image-size](https://npm.io/package/image-size.md) ^1.0.0
- [mime-types](https://npm.io/package/mime-types.md) ^2.1.33
- [audiosprite](https://npm.io/package/audiosprite.md) ^0.7.2
- [log-symbols](https://npm.io/package/log-symbols.md) ^4.1.0
- [progress-estimator](https://npm.io/package/progress-estimator.md) ^0.3.0
- [free-tex-packer-core](https://npm.io/package/free-tex-packer-core.md) ^0.3.4

## Recent versions

- 0.3.0 (latest) — 2022-11-01
- 0.2.1 — 2022-10-26
- 0.2.0 — 2022-08-29
- 0.1.9 — 2022-08-01
- 0.1.8 — 2022-05-24
- 0.1.7 — 2022-04-11
- 0.1.6 — 2022-01-26
- 0.1.5 — 2022-01-26
- 0.1.4 — 2022-01-22
- 0.1.3 — 2022-01-05
- 0.1.2 — 2021-12-03
- 0.1.1 — 2021-11-29
- 0.1.0 — 2021-11-25

## README

URSO tools
=============

![ursojs.io logo](https://ursojs.io/img/logo.png)


### About ###

Additional tool for developers.
Urso tools implemented the ability to compile Audiosprite and Image atlases,

### How to ###

First of all, you need to add a dependency in the game package.json file
Code example:
```js
  "dependencies": {
     "@urso/tools": "latest"
   },
```
We recommend using the latest version

### Audiosprite ###

If we want to start the sound assembly, then we need

- In package.json, you need to write in scripts: "make:image": "urso-clean && npm run build:prod && urso-pack-images" 
- Adjust the 'audio' options in assets.config.json file

Basic 'audio' parameters:

1) "sourceFolder": "src/assets/fish/sounds", the path to the files from which we create the atlas

2) "output": "src/assets/fish/soundsAtlas", path where all files are saved after execution.
In a folder along the sourceFolder path, we must save all the sound files that will be used in audiosprite

Then in the terminal, run the "npm run make:sound" or "yarn make:sound" command to create the audiosprite.

After the script finishes, the file we need will appear in the folder along the path specified in the output parameter and in the assets we connect our audiosprite

For example
```js
 { type: Urso.types.assets.AUDIOSPRITE, key: 'audiosprite', path: `${this._soundsPath}audiosprite` }
```

now our audiosprite is connected and ready to go.

### Image atlases ###

Image atlases - a set of images in one file.

In order to create Image atlases we must
- In package.json, you need to write in scripts: "make:image": "urso-clean && npm run build:prod && urso-pack-images"
- Configure settings in assets.config.json file

The main parameters of Image atlases:

1) "groupName": "atlasLoadGroup.js" (default name), group name of the file that will contain the Image atlases

2) "groupsPath": "src/app/templates/groups" (default path), path where all files are saved after execution.

In the terminal, run the Image atlases creation script with the "npm run make:image" or "yarn make:image" command.

After the script finishes, the file we need will appear in the folder along the path specified in the groupsPath parameter and in the _info.js file we include the group as a modification, since the script will create Image atlases of different quality.

Now our Image atlases is connected and ready to go.

### Learn more ###
- You can find more information on the [official website](https://ursojs.io/)
- Explore working [examples](https://ursojs.io/examples.html) demos and see the code structure
- Clone [examples repository](https://github.com/megbrimef/urso-examples) to fast learning
- Join [discord channel](https://discord.gg/JauD9CbDHA) to ask questions and read changelogs


### License ###
Built using Urso web engine.

By Lancecat Games

This content is released under the (http://opensource.org/licenses/MIT) MIT License.

---
_Source: https://npm.io/package/@urso/tools · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
