|
| 1 | +import { |
| 2 | + bootstrap, |
| 3 | + build, |
| 4 | + discard, |
| 5 | + download, |
| 6 | + downloadArtifacts, |
| 7 | + execute, |
| 8 | + exportFile, |
| 9 | + exportPatches, |
| 10 | + fixLineEndings, |
| 11 | + importPatches, |
| 12 | + init, |
| 13 | + licenseCheck, |
| 14 | + melonPackage, |
| 15 | + reset, |
| 16 | + run, |
| 17 | + setBranch, |
| 18 | + status, |
| 19 | + test |
| 20 | +} from "./commands"; |
| 21 | +import { Cmd } from "./types"; |
| 22 | + |
| 23 | +export const commands: Cmd[] = [ |
| 24 | + { |
| 25 | + cmd: "bootstrap", |
| 26 | + description: "Bootstrap Dot Browser.", |
| 27 | + controller: bootstrap |
| 28 | + }, |
| 29 | + { |
| 30 | + cmd: "build [os]", |
| 31 | + aliases: ["b"], |
| 32 | + description: |
| 33 | + "Build Dot Browser. Specify the OS param for cross-platform builds.", |
| 34 | + options: [ |
| 35 | + { |
| 36 | + arg: "--a, --arch <architecture>", |
| 37 | + description: |
| 38 | + "Specify architecture for build" |
| 39 | + } |
| 40 | + ], |
| 41 | + controller: build |
| 42 | + }, |
| 43 | + { |
| 44 | + cmd: "discard <file>", |
| 45 | + description: "Discard a files changes.", |
| 46 | + options: [ |
| 47 | + { |
| 48 | + arg: "--keep, --keep-patch", |
| 49 | + description: |
| 50 | + "Keep the patch file instead of removing it" |
| 51 | + } |
| 52 | + ], |
| 53 | + controller: discard |
| 54 | + }, |
| 55 | + { |
| 56 | + cmd: "download [ffVersion]", |
| 57 | + description: "Download Firefox.", |
| 58 | + controller: download |
| 59 | + }, |
| 60 | + { |
| 61 | + cmd: "download-artifacts", |
| 62 | + description: |
| 63 | + "Download Windows artifacts from GitHub.", |
| 64 | + flags: { |
| 65 | + platforms: ["win32"] |
| 66 | + }, |
| 67 | + controller: downloadArtifacts |
| 68 | + }, |
| 69 | + { |
| 70 | + cmd: "execute", |
| 71 | + description: |
| 72 | + "Execute a command inside the engine directory.", |
| 73 | + controller: execute |
| 74 | + }, |
| 75 | + { |
| 76 | + cmd: "export-file <file>", |
| 77 | + description: "Export a changed file as a patch.", |
| 78 | + controller: exportFile |
| 79 | + }, |
| 80 | + { |
| 81 | + cmd: "export", |
| 82 | + aliases: ["export-patches"], |
| 83 | + description: |
| 84 | + "Export the changed files as patches.", |
| 85 | + controller: exportPatches |
| 86 | + }, |
| 87 | + { |
| 88 | + cmd: "lfify", |
| 89 | + aliases: ["fix-le"], |
| 90 | + description: |
| 91 | + "Convert CRLF line endings to Unix LF line endings.", |
| 92 | + controller: fixLineEndings |
| 93 | + }, |
| 94 | + { |
| 95 | + cmd: "import [type]", |
| 96 | + aliases: ["import-patches", "i"], |
| 97 | + description: "Import patches into the browser.", |
| 98 | + options: [ |
| 99 | + { |
| 100 | + arg: "-m, --minimal", |
| 101 | + description: |
| 102 | + "Import patches in minimal mode" |
| 103 | + }, |
| 104 | + { |
| 105 | + arg: "--noignore", |
| 106 | + description: |
| 107 | + "Bypass .gitignore. You shouldn't really use this." |
| 108 | + } |
| 109 | + ], |
| 110 | + controller: importPatches |
| 111 | + }, |
| 112 | + { |
| 113 | + cmd: "init <source>", |
| 114 | + aliases: ["initialise", "initialize"], |
| 115 | + description: "Initialise the Firefox directory.", |
| 116 | + controller: init |
| 117 | + }, |
| 118 | + { |
| 119 | + cmd: "license-check", |
| 120 | + aliases: ["lc"], |
| 121 | + description: |
| 122 | + "Check the src directory for the absence of MPL-2.0 header.", |
| 123 | + controller: licenseCheck |
| 124 | + }, |
| 125 | + { |
| 126 | + cmd: "package", |
| 127 | + aliases: ["pack"], |
| 128 | + description: |
| 129 | + "Package the browser for distribution.", |
| 130 | + controller: melonPackage |
| 131 | + }, |
| 132 | + { |
| 133 | + cmd: "reset", |
| 134 | + description: |
| 135 | + "Reset the source directory to stock Firefox.", |
| 136 | + controller: reset |
| 137 | + }, |
| 138 | + { |
| 139 | + cmd: "run [chrome]", |
| 140 | + aliases: ["r", "open"], |
| 141 | + description: "Run the browser.", |
| 142 | + controller: run |
| 143 | + }, |
| 144 | + { |
| 145 | + cmd: "set-branch <branch>", |
| 146 | + description: "Change the default branch.", |
| 147 | + controller: setBranch |
| 148 | + }, |
| 149 | + { |
| 150 | + cmd: "status", |
| 151 | + description: |
| 152 | + "Status and files changed for src directory.", |
| 153 | + controller: status |
| 154 | + }, |
| 155 | + { |
| 156 | + cmd: "test", |
| 157 | + description: |
| 158 | + "Run the test suite for Dot Browser.", |
| 159 | + controller: test |
| 160 | + } |
| 161 | +]; |
0 commit comments