Skip to content
This repository was archived by the owner on Dec 18, 2017. It is now read-only.
This repository was archived by the owner on Dec 18, 2017. It is now read-only.

"dnu publish" runs scripts for published project #1833

@anfomin

Description

@anfomin

After some recent change dnu publish invokes command in next order:

  1. Restores packages which causes scripts invocation from project.json.
  2. Publish to destination directory.
  3. Restores packages for published project to write project.lock.json.

I've next scripts configured:

{
    // from project.json
    "exclude": [
        "wwwroot",
        "node_modules",
        "bower_components"
    ],

    "publishExclude": [
        "bin",
        "obj",
        "node_modules",
        "bower_components",
        "bower.json",
        "package.json",
        "gulpfile.js",
        "**.xproj",
        "**.user"
    ],

    "scripts": {
        "postrestore": [ "npm install" ],
        "prepare": [ "gulp default" ]
    }
}

Third action invokes scripts from project.json again. This causes error in npm install and gulp default because published directory does not contains package.json, bower.json and gulpfile.js.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions