Skip to content
This repository has been archived by the owner on May 29, 2020. It is now read-only.

generate two stylesheets with different templates #395

Open
zypA13510 opened this issue Aug 5, 2019 · 2 comments
Open

generate two stylesheets with different templates #395

zypA13510 opened this issue Aug 5, 2019 · 2 comments

Comments

@zypA13510
Copy link

This used to work in v1.4.0, now(v1.7.2) it will only generate one file, whichever run last, i.e. if webfont:css is run, it will clean up the scss file and generate a css file, vice versa for webfont:scss. I want to keep both the scss file and the css.

Gruntfile.js:

module.exports = function(grunt) {
  grunt.initConfig({
    webfont: {
      options: {
        ...
      },
      css: {
        src: 'svg/*.svg',
        dest: 'build',
        options: {
          template: 'lib/template.css',
        },
      },
      scss: {
        src: 'svg/*.svg',
        dest: 'build',
        options: {
          stylesheet: 'scss',
          template: 'lib/template.scss',
        },
      },
    },
    
    clean: ['build/*'],
  })
  
  grunt.loadNpmTasks('grunt-contrib-clean')
  grunt.loadNpmTasks('grunt-webfont')
  
  grunt.registerTask('build', ['clean', 'webfont'])
}
@zypA13510
Copy link
Author

I think #349 breaks this. v1.5.0 is fine and v1.6.0 becomes broken.

@zypA13510
Copy link
Author

The way I see it, either we add a lot of template options, e.g. templateCss, templateScss, like what has been done for destCss, or roll back the change. Both of which should be considered to be "breaking" (one breaks v1.5 while the other breaks v1.6-v1.7) and should probably be released as v2.
Either way, I will stick to v1.5 for the time being.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant