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

generate two stylesheets with different templates #395

@zypA13510

Description

@zypA13510

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'])
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions