Skip to content

making sure that execution of scripts defined in build.json->exec are calling back into the main execution path#117

Merged
caridy merged 1 commit intoyui:masterfrom
caridy:callback-exec
Mar 11, 2014
Merged

making sure that execution of scripts defined in build.json->exec are calling back into the main execution path#117
caridy merged 1 commit intoyui:masterfrom
caridy:callback-exec

Conversation

@caridy
Copy link
Member

@caridy caridy commented Mar 10, 2014

If you're using require('shifter').add() to add new files into the queue to be executed, and you use exec, shifter will exit without continuing the execution of the queue. This patch fix that. Here is an example file:

{
    "name": "stencil",
    "exec": ["./resources/shifter_exec.js"],
    "builds": {
        "stencil-css": {
            "cssfiles": [
                "dist/base.css",
                "dist/grid.css",
                "dist/grid-responsive.css",
                "dist/table.css",
                "dist/skins.css",
                "dist/components.css",
                "dist/helpers.css",
                "dist/declarations.css",
                "dist/fx.css"
            ],
            "assets": true
        }
    },
    "shifter": {
        "coverage": false,
        "lint": false
    }
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

essentially, this method run the exec script, waits for it to finish, updates the original input of the callee, and execute the callee again, in which case the exec is gone, and shifter can continue the process.

the bug was that the 3rd argument of the callee was not propagated.

@clarle
Copy link
Contributor

clarle commented Mar 10, 2014

👍, makes sense to me. I wonder why it was missing at the beginning.

caridy added a commit that referenced this pull request Mar 11, 2014
@caridy caridy merged commit 5cc65d6 into yui:master Mar 11, 2014
@caridy
Copy link
Member Author

caridy commented Mar 11, 2014

  • shifter@0.4.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants