Closed facinick closed 4 years ago
If i use two plugin: new SpritesmithPlugin({}) new SpritesmithPlugin({})
the lower one overrides few options of upper one like Handle bar template location.
--------------------------actual code where this happened----------------------------------------
new SpritesmithPlugin({ src: { cwd: imagesPath, glob: "**/*.{jpg,png}", }, target: { image: path.resolve(__dirname, "..", "dist/images/") + "/sprite.png", // this file will be used to import and access sprites.png css: [ [ path.resolve(__dirname, "..", "src/app/styles/") + "/sprites.less", { format: "handlebars_based_template" }, ], ], }, apiOptions: { cssImageRef: "sprite.png", }, customTemplates: { handlebars_based_template: path.resolve(__dirname, "..", "src/app/images/") + "/handlebarsStr.css.handlebars", }, }), new SpritesmithPlugin({ src: { cwd: path.resolve(__dirname, "..", "src/app/thirdparty/bjnui/src/sprites"), glob: "**/*.{jpg,png}", }, target: { image: path.resolve(__dirname, "..", "src/app/thirdparty/bjnui/src/images") + "/sprite.png", css: [ [ path.resolve(__dirname, "..", "src/app/thirdparty/bjnui/src/styles") + "/sprites.less", { format: "handlebars_based_template", }, ], ], }, apiOptions: { cssImageRef: "sprite.png", }, customTemplates: { handlebars_based_template: path.resolve(__dirname, "..", "src/app/thirdparty/bjnui/src/sprites") + "/handlebarsStr.css.handlebars", }, }),
How can I use this plugin to generate different sprites from different sources?
Use different format names.
Thanks!
If i use two plugin: new SpritesmithPlugin({}) new SpritesmithPlugin({})
the lower one overrides few options of upper one like Handle bar template location.
--------------------------actual code where this happened----------------------------------------