sca

spritesmith-cli-aj

spritesmith-cli

Showing:

Popularity

Downloads/wk

0

Maintenance

No Maintenance Data Available

Package

Dependencies

4

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

spritesmith cli

install

npm install spritesmith-cli-aj

use

const spritesmith = require('spritesmith-cli-aj')

// return promise object

spritesmith([{
  glob: '**/icon-*.{png,gif,jpg}',
  imageDist: path.resolve(process.cwd(), './dist/sprite-icon.png'),
  styleDist: path.resolve(process.cwd(), './dist/sprite-icon.styl'),
  prefix: 'icon-',
  multiple: 1,
  // spritesmith package option
  options: {
    ...
  }
}, {
  glob: '**/icon-*.{png,gif,jpg}',
  imageDist: path.resolve(process.cwd(), './dist/sprite-icon1.png'),
  styleDist: path.resolve(process.cwd(), './dist/sprite-icon1.styl'),
  prefix: 'icon-',
  multiple: 1,
  // spritesmith package option
  options: {
    ...
  }
}])

//or
spritesmith({
  glob: '**/icon-*.{png,gif,jpg}',
  imageDist: path.resolve(process.cwd(), './dist/sprite-icon.png'),
  styleDist: path.resolve(process.cwd(), './dist/sprite-icon.styl'),
  prefix: 'icon-',
  multiple: 1,
  // spritesmith package option
  options: {
    ...
  }
})

cli

spritesmith --config <config path> // config default './.spritesmith.js'

//config file
module.exports = [{
  glob: '**/icon-*.{png,gif,jpg}',
  imageDist: path.resolve(process.cwd(), './dist/sprite-icon.png'),
  styleDist: path.resolve(process.cwd(), './dist/sprite-icon.styl'),
  prefix: 'icon-',
  multiple: 1,
  // spritesmith package option
  options: {
    ...
  }
}, {
  glob: '**/icon-*.{png,gif,jpg}',
  imageDist: path.resolve(process.cwd(), './dist/sprite-icon1.png'),
  styleDist: path.resolve(process.cwd(), './dist/sprite-icon1.styl'),
  prefix: 'icon-',
  multiple: 1,
  // spritesmith package option
  options: {
    ...
  }
}]

//or

module.exports = {
  glob: '**/icon-*.{png,gif,jpg}',
  imageDist: path.resolve(process.cwd(), './dist/sprite-icon1.png'),
  styleDist: path.resolve(process.cwd(), './dist/sprite-icon1.styl'),
  prefix: 'icon-',
  multiple: 1,
  // spritesmith package option
  options: {
    ...
  }
}

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial