Skip to content

Shifter chokes on comment containing "Y.log" #84

@gzip

Description

@gzip

Started looking at this with @caridy. Create the following two files and run shifter.

build.json

{
    "name": "debug",
    "builds": {
        "module": {
            "jsfiles": [
                "./js/debug.js"
            ]
        }
    }
}

js/debug.js

YUI.add('debug', function (Y, NAME) {
    function Debugger() { }
    Debugger.prototype = {
        debug: function () {
            // using Y.log's warn level
            if (true) {
            } else {
            }
        }
    }
});

It errors out with the following:

shifter [err] compression failed
       Unexpected token punc, expected punc // line 9, pos 15

Remove or modify the comment and it's successful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions