Skip to content

Building on Windows #141

Description

@Starmania

Hey Tim, I've been thinking about this for a long time, and Oclif is now able to build (and pack) on windows, so here we are...

Would it be interesting to make the build compatible between windows/linux?

I've done a few tests and according to the Oclif example, here's which version Httptoolkit-server should have:
I only include what should be updated for the sake of brievity

  "dependencies": {
    "@oclif/core": "^4", // from "@oclif/command ^1.5.2
    "@oclif/plugin-help": "^6", //from ^2.2.3
    "@oclif/plugin-plugins": "^5"
    "@oclif/plugin-update": "^4" // from ^1.3.8
  },
  "devDependencies": {
    "@oclif/prettier-config": "^0.2.1",
    "@oclif/test": "^4",
    "eslint": "^8",
    "eslint-config-oclif": "^5",
    "eslint-config-oclif-typescript": "^3",
    "eslint-config-prettier": "^9",
    "oclif": "^4",
    "shx": "^0.3.3",
    "typescript": "^5" // from ~4.7, still compatible
  },
full package.json
{
  "name": "example-cli",
  "description": "A new CLI generated with oclif",
  "version": "0.0.0",
  "author": "Starmania",
  "bin": {
    "text-cli": "./bin/run.js"
  },
  "dependencies": {
    "@oclif/core": "^4",
    "@oclif/plugin-help": "^6",
    "@oclif/plugin-plugins": "^5"
  },
  "devDependencies": {
    "@oclif/prettier-config": "^0.2.1",
    "@oclif/test": "^4",
    "@types/chai": "^4",
    "@types/mocha": "^10",
    "@types/node": "^18",
    "chai": "^4",
    "eslint": "^8",
    "eslint-config-oclif": "^5",
    "eslint-config-oclif-typescript": "^3",
    "eslint-config-prettier": "^9",
    "mocha": "^10",
    "oclif": "^4",
    "shx": "^0.3.3",
    "ts-node": "^10",
    "typescript": "^5"
  },
  "engines": {
    "node": ">=18.0.0"
  },
  "files": [
    "/bin",
    "/dist",
    "/oclif.manifest.json"
  ],
  "license": "MIT",
  "main": "dist/index.js",
  
  "oclif": {
    "bin": "text-cli",
    "dirname": "text-cli",
    "commands": "./dist/commands",
    "plugins": [
      "@oclif/plugin-help",
      "@oclif/plugin-plugins"
    ],
    "topicSeparator": " ",
    "topics": {
      "hello": {
        "description": "Say hello to the world and others"
      }
    }
  },
  "scripts": {
    "build": "shx rm -rf dist && tsc -b",
    "lint": "eslint . --ext .ts",
    "postpack": "shx rm -f oclif.manifest.json",
    "posttest": "npm run lint",
    "prepack": "oclif manifest && oclif readme",
    "test": "mocha --forbid-only \"test/**/*.test.ts\"",
    "version": "oclif readme && git add README.md"
  },
  "types": "dist/index.d.ts"
}

I'm ok to write a PR for that because I know it's boring stuff

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions