spritesmith-cli-aj

    0.0.3 • Public • Published

    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: {
        ...
      }
    }
    

    Keywords

    none

    Install

    npm i spritesmith-cli-aj

    DownloadsWeekly Downloads

    7

    Version

    0.0.3

    License

    MIT

    Last publish

    Collaborators

    • apathyjade