gulp-iconutil
v1.2.2
Published
gulp-iconutil creates .icns from .iconset
Downloads
21
Maintainers
Readme
gulp-iconutil
gulp-iconutil is a Gulp plugin that provides iconutil
wrapper.
This plugin requires macOS's iconutil
command.
Usage
npm install gulp-iconutil
const gulp = require("gulp");
const iconutil = require("gulp-iconutil");
gulp.task("icon", () => {
gulp
.src("./app.iconset/icon_*.png")
.pipe(iconutil("app.icns"))
.pipe(gulp.dest("./"));
});
When you pass .png files through iconutil()
, these files must be named like icon_512x512.png or [email protected].
Create .icns from .sketch w/ gulp-sketch
.sketch files, which use for creating icons, must have artboard or slice named like icon_512x512 or icon_128x128.
const gulp = require('gulp')
const sketch = require('gulp-sketch')
const iconutil = require('gulp-iconutil')
gulp.task('icon', () => {
gulp.src('./icons/sketch/*.sketch')
.pipe(sketch({
exports: 'artboards',
format: 'png',
scales: '1.0,2.0'
}))
.pipe(iconutil('app.icns'))
.pipe(gulp.dest('./'))
Test
$ git clone https://github.com/uetchy/gulp-iconutil.git
$ cd gulp-iconutil
$ npm install
$ npm test
Contribution
- Fork it ( https://github.com/uetchy/gulp-iconutil/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request