Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 11, 2014

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
    }
}

@@ -110,7 +110,7 @@ exports.start = function (json, options, buildCallback) {
log.info('found a prebuild, shifting it');
prebuild(json.prebuilds, options, function () {
delete json.prebuilds;
exports.start(json, options);
exports.start(json, options, buildCallback);
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

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