https://github.com/strewhella/node-texturepacker-command-line
A simple node wrapper around the TexturePacker command line tool
https://github.com/strewhella/node-texturepacker-command-line
Last synced: 10 months ago
JSON representation
A simple node wrapper around the TexturePacker command line tool
- Host: GitHub
- URL: https://github.com/strewhella/node-texturepacker-command-line
- Owner: strewhella
- Created: 2018-05-08T21:51:02.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-05-15T17:40:02.000Z (over 5 years ago)
- Last Synced: 2025-03-13T09:02:54.634Z (10 months ago)
- Language: JavaScript
- Size: 48.8 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-list - node-texturepacker-command-line
README
A simple wrapper around the TexturePacker (https://www.codeandweb.com/texturepacker) command line tool for build integration. The command line tool must be installed and available on your PATH.
Any valid option can be passed into the main function, just convert it from `--kebab-case` to `camelCase`. Options that require no value, like `multipack` will have the `true` stripped from the command.
_The `path` you specify needs to be specified relative to the script of execution. Check the npm script `example` in package.json for an example_
Usage:
```
texturepacker.exec(path, options);
```
```
const texturepacker = require('texturepacker');
texturepacker.exec('imagefile', {
format: 'phaser-json-hash',
maxSize: 2048,
scaleMode: 'Smooth',
multipack: true
});
```