{
    "minimum-stability": "dev",
    "require": {
        "php": ">=5.3.0",
        "yiisoft/yii2": "dev-master",
        "yiisoft/yii2-composer": "dev-master",
        "phpunit/phpunit": "3.7.21"
    },
    "scripts": {
        "post-create-project-cmd": [
            "yii\\composer\\InstallHandler::setPermissions"
        ]
    },
    "extra": {
        "yii-install-writable": [
            "runtime",
            "www/assets"
        ],
        "yii-install-executable": [
            "yii"
        ]
    }
}

{
    "minimum-stability": "dev",
    "require": {
        "php": ">=5.3.0",
        <% if (_.isUndefined(options.yii2)) { %>
        "yiisoft/yii": "dev-master",
        <% } else { %>
        "yiisoft/yii2": "dev-master",
        "yiisoft/yii2-composer": "dev-master",
        <% } %>
        "phpunit/phpunit": "3.7.21"
    },
    "scripts": {
        "post-create-project-cmd": [
            "yii\\composer\\InstallHandler::setPermissions"
        ]
    },
    "extra": {
        "yii-install-writable": [
            "runtime",
            "www/assets"
        ],
        "yii-install-executable": [
            "yii"
        ]
    }
}

Add option to set yii2 dependency
Add option to set yii2 dependency
