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

"dnu publish" runs scripts for published project #1833

Closed
anfomin opened this issue May 10, 2015 · 0 comments
Closed

"dnu publish" runs scripts for published project #1833

anfomin opened this issue May 10, 2015 · 0 comments
Assignees
Milestone

Comments

@anfomin
Copy link

anfomin commented May 10, 2015

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.

@davidfowl davidfowl added this to the 1.0.0-beta5 milestone May 10, 2015
@davidfowl davidfowl self-assigned this May 10, 2015
davidfowl added a commit that referenced this issue May 11, 2015
- Fix slash resolution for lock file
- Skip running events when generating lock file after copy

#1839 #1832 #1833
davidfowl added a commit that referenced this issue May 11, 2015
- Fix slash resolution for lock file
- Skip running events when generating lock file after copy

#1839 #1832 #1833
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants