schickling/chromeless

Windows Build Compatibility

Open

#70 opened on Jul 28, 2017

View on GitHub
 (5 comments) (0 reactions) (0 assignees)TypeScript (606 forks)batch import
APIProxyhelp wanted

Repository metrics

Stars
 (13,240 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

I found a couple issues while trying to build this on Windows.

  1. For "npm run build" --> "rm -rf dist; tsc -d"

    • "rm -rf dist;" doesn't make sense on windows since the rm command doesn't exist. The command to remove a directory in windows is "rmdir"
    • I'm open to suggestions on how to solve this one, my only thought is to have 2 different build scripts (one for windows and one for mac/linux)
  2. https://github.com/graphcool/chromeless/blob/master/src/chrome/local-runtime.ts#L204-L205

    • This line sets the tmp directory as "/tmp". On windows this refers to "C:/tmp". I think we should change this line to refer to just "tmp/" so that it refers to a tmp folder inside the current directory.
    • Also, fs.writeFileSync() assumes the tmp folder exists, I think we need code in here to check for the folder and add the folder if it doesn't exist.

Once we have solid solutions to these 2 things, I can implement a PR.

Contributor guide