Composer未运行post-install-cmd中定义的npm install

时间:2016-09-09 17:13:27

标签: node.js composer-php

我是npm的noob,作曲家和咕噜声。这是我的第一个项目,我正在整合grunt,composer和npm。这是项目中的composer.json文件:

{
    "name": "company/project",
    "description": "HTML5 and CSS3 Template",
    "type": "project",
    "keywords": [
        "keyword with three",
        "keyword two",
        "keyword"
    ],
    "homepage": "https://company.com/project",
    "license": "GPL-2.0+",
    "authors": [
        {
            "name": "Mayeenul Islam",
            "email": "me@example.com",
            "homepage": "http://example.com",
            "role": "Designer and Developer"
        }
    ],
    "archive": {
        "exclude": [
            ".gitignore",
            "*.sublime-workspace",
            "*.sublime-project",
            "composer.json",
            "composer.lock",
            "README.md",
            "Gruntfile.js",
            "package.json",
            "/node_modules",
            "/tests",
            "!/vendor"
        ]
    },
    "scripts": {
        "post-install-cmd": "npm install",
        "pre-archive-cmd": "composer install"
    }
}

我有效package.jsonGruntfile.js。我希望我的项目的协作者只需克隆我的repo,然后运行composer install并加载插件依赖项,并执行npm install以便可以准备好grunt环境。

  

注意:我无法使用composer.lockcomposer install在Windows 8 PC中制作任何composer update文件。

但是,在克隆了repo之后,当我正在运行composer install时,它正在加载作曲家的东西,但没有运行npm install中定义的"post-install-cmd"。我之后尝试运行composer update,但它也无效。

我做错了什么?

0 个答案:

没有答案