schickling/chromeless

Windows Build Compatibility

開放

#70 建立於 2017年7月28日

 (5 則留言) (0 個反應) (0 位負責人)TypeScript (606 個分叉)batch import
APIProxyhelp wanted

倉庫指標

星標
 (13,240 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

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.

貢獻者指南