mixtur / webpack-spritesmith

Webpack plugin that converts set of images into a spritesheet and SASS/LESS/Stylus mixins
498 stars 56 forks source link

add `sss` extension #76

Closed Krasnopir closed 5 years ago

Krasnopir commented 5 years ago

Can you add .sss type Sugarss is custom syntax for PostCSS and many projects are switching to using PostCSS, so it would be wonderful to be able to import the right files.

mixtur commented 5 years ago

Target languages support is depending on https://github.com/twolfson/spritesheet-templates. So it first should be supported there. Another option would be for you to write custom template.

Krasnopir commented 5 years ago
target: {
    ....
    css: [
        [
            path.resolve(__dirname, `/sources/sugarss/sprite.sss`),
            { format: 'sugarss_handlebars' }
        ]
    ]
},
customTemplates: {
    'sugarss_handlebars': path.resolve(__dirname, '/sources/sugarss/pngSpriteTemplate.handlebars')
},

It works!) Fine!)