jkphl / grunt-iconizr

SVG + PNG icon kit generator — Grunt plugin wrapping around node-iconizr that creates a CSS icon kit from a bunch of SVG files, serving them as SVG / PNG sprites or embedded data URIs along with suitable CSS / Sass / LESS / Stylus etc. stylesheet resources and a JavaScript loader for easy integration into your HTML documents
http://iconizr.com
MIT License
104 stars 9 forks source link

DEV-BRANCHE: Fatal error: Unterminated string constant #31

Open martiniusDE opened 9 years ago

martiniusDE commented 9 years ago

Hello,

I'm getting the Error "Fatal error: Unterminated string constant" after "Building loader resource".

My gruntfile.js:

'use strict';

module.exports = function(grunt) {

    grunt.initConfig({
        iconizr: {
            dist: {
                src: ['**/*.svg'],
                dest: 'output',
                expand: true,
                cwd: 'svg',
                options: {
                    'dest':'output',
                    'log': 'verbose',
                    'mode': {
                        'css':true,
                        'view':true,
                        'defs':true,
                        'symbol':true,
                        'stack':true
                    },
                    icons: {
                        render: {
                            scss: {
                                dest: 'test2'
                            }
                        }
                    }
                }
            }
        },
    });

    grunt.loadNpmTasks('grunt-iconizr');

};

Here is the output from command line:

D:\tmp\iconizr>grunt iconizr:dist
Running "iconizr:dist" (iconizr) task
2015-05-11 15:59:21 - verbose: Initialized iconizr configuration
2015-05-11 15:59:21 - verbose: Initialized spriter configuration
2015-05-11 15:59:21 - info: Created spriter instance
2015-05-11 15:59:21 - info: Created iconizr instance
2015-05-11 15:59:21 - verbose: Added shape "logo:regular"
2015-05-11 15:59:21 - info: Compiling 1 shapes ...
2015-05-11 15:59:21 - info: Laying out «css» sprite («css» mode)
2015-05-11 15:59:21 - verbose: Created «css» SVG sprite file («css» mode)
2015-05-11 15:59:21 - info: Laying out «view» sprite («view» mode)
2015-05-11 15:59:21 - verbose: Created «view» SVG sprite file («view» mode)
2015-05-11 15:59:21 - info: Laying out «defs» sprite («defs» mode)
2015-05-11 15:59:21 - verbose: Created «defs» SVG sprite file («defs» mode)
2015-05-11 15:59:21 - info: Laying out «symbol» sprite («symbol» mode)
2015-05-11 15:59:21 - verbose: Created «symbol» SVG sprite file («symbol» mode)
2015-05-11 15:59:21 - info: Laying out «stack» sprite («stack» mode)
2015-05-11 15:59:21 - verbose: Created «stack» SVG sprite file («stack» mode)
2015-05-11 15:59:21 - info: Laying out «icons» sprite («view» mode)
2015-05-11 15:59:21 - verbose: Created «icons» SVG sprite file («view» mode)
2015-05-11 15:59:21 - verbose: Returning 1 intermediate SVG files
2015-05-11 15:59:21 - info: Finished «css» + «view» + «defs» + «symbol» + «stack» + «icons» sprite compilation
2015-05-11 15:59:21 - info: Created 7 x SVG
2015-05-11 15:59:21 - verbose: Created css\svg\sprite.css-9ffab087.svg: 2.5 kB
2015-05-11 15:59:21 - verbose: Created defs\svg\sprite.defs.svg: 2.5 kB
2015-05-11 15:59:21 - verbose: Created icons\icons-400091cf.svg: 2.6 kB
2015-05-11 15:59:21 - verbose: Created logo.svg: 2.5 kB
2015-05-11 15:59:21 - verbose: Created stack\svg\sprite.stack.svg: 2.6 kB
2015-05-11 15:59:21 - verbose: Created symbol\svg\sprite.symbol.svg: 2.5 kB
2015-05-11 15:59:21 - verbose: Created view\svg\sprite.view-400091cf.svg: 2.6 kB
2015-05-11 15:59:21 - info: Creating PNG fallbacks
2015-05-11 15:59:24 - info: Optimizing PNG fallbacks
2015-05-11 15:59:28 - verbose: Shrinked "logo.png" to 120 Bytes (23.9%)
2015-05-11 15:59:28 - verbose: Shrinked "icons-400091cf.png" to 120 Bytes (23.9%)
2015-05-11 15:59:28 - info: Building dataURIs
2015-05-11 15:59:28 - info: Building stylesheet resources
2015-05-11 15:59:28 - verbose: Created a «svg-data-uri» strategy «scss» stylesheet resource
2015-05-11 15:59:28 - verbose: Created a «svg-sprite» strategy «scss» stylesheet resource
2015-05-11 15:59:28 - verbose: Created a «fallback-data-uri» strategy «scss» stylesheet resource
2015-05-11 15:59:28 - verbose: Created a «fallback-sprite» strategy «scss» stylesheet resource
2015-05-11 15:59:28 - info: Building loader resource
Fatal error: Unterminated string constant

My Environment: node v0.12.4 npm v2.11.1 Windows 7 grunt v0.4.5 grunt-cli v0.1.13

PS: Maybe it is some disconfiguration because of the lack of documentaion. And because I know your are busy, don't feel pushed! Thanks.

jkphl commented 9 years ago

Could you please try to debug this a little more and get some additional details, like a script name or line number? Otherwise I'll try to reproduce the exact setup at a later time, hoping to yield the same result ...

martiniusDE commented 9 years ago

I'm sorry, but I don't know how to debug grunt tasks - the debug logging option from svg-sprite nor the grunt --debug option helped me...

jkphl commented 9 years ago

I see, no problem. Please be patient while I try to find some time for working on this.