Browse Source

Haxelib run: replaced the Neko binary by the `Run` class

tags/v1.0.2
Cédric Belin 1 week ago
parent
commit
db076d6742
8 changed files with 13 additions and 8 deletions
  1. +0
    -1
      .gitattributes
  2. +0
    -1
      .gitignore
  3. +8
    -0
      Run.hx
  4. +1
    -1
      bin/which.ps1
  5. +0
    -1
      haxelib.json
  6. +2
    -2
      src/which/Program.hx
  7. +1
    -1
      tool/clean.ps1
  8. +1
    -1
      tool/publish.ps1

+ 0
- 1
.gitattributes View File

@@ -16,6 +16,5 @@

*.ico binary
*.jpg binary
*.n binary
*.pdf binary
*.png binary

+ 0
- 1
.gitignore View File

@@ -16,5 +16,4 @@
/composer.lock
/npm-debug.log
/package-lock.json
/run.n
/lib/js/which.*

+ 8
- 0
Run.hx View File

@@ -0,0 +1,8 @@
import which.Program;

/** Runs the main program. **/
class Run {

/** Application entry point. **/
static function main() Program.main();
}

+ 1
- 1
bin/which.ps1 View File

@@ -1,4 +1,4 @@
#!/usr/bin/env pwsh
Set-StrictMode -Version Latest
Set-Location (Split-Path $PSScriptRoot)
haxe share/build.hxml --run which.Program @args
haxe share/build.hxml --run Run @args

+ 0
- 1
haxelib.json View File

@@ -4,7 +4,6 @@
"dependencies": {"thenshim": "1.1.1", "tink_cli": "0.5.1", "tink_core": "1.27.1"},
"description": "Find the instances of an executable in the system path. Like the `which` Linux command.",
"license": "MIT",
"main": "which.Progam",
"name": "which",
"releasenote": "Pinned the `tink_core` dependency.",
"tags": ["cross", "find", "path", "system", "utility", "which"],


+ 2
- 2
src/which/Program.hx View File

@@ -14,7 +14,7 @@ import php.Syntax;
#end

/** Find the instances of an executable in the system path. **/
class Program {
@:noDoc class Program {

/** List all instances of executables found (instead of just the first one). **/
public var all = false;
@@ -32,7 +32,7 @@ class Program {
public function new() {}

/** Application entry point. **/
static function main() {
public static function main() {
#if nodejs
Node.process.title = "Which.hx";
#elseif php


+ 1
- 1
tool/clean.ps1 View File

@@ -2,7 +2,7 @@
Set-StrictMode -Version Latest
Set-Location (Split-Path $PSScriptRoot)

foreach ($item in "doc/api", "lib/index.php", "lib/js/which.*", "lib/res", "run.n", "www") {
foreach ($item in "doc/api", "lib/index.php", "lib/js/which.*", "lib/res", "www") {
if (Test-Path $item) { Remove-Item $item -Force -Recurse }
}



+ 1
- 1
tool/publish.ps1 View File

@@ -4,7 +4,7 @@ Set-Location (Split-Path $PSScriptRoot)

tool/dist.ps1

$files = "*.md", "haxelib.json", "run.n", "src"
$files = "*.md", "haxelib.json", "src", "Run.hx"
Compress-Archive $files var/haxelib.zip -Force

haxelib submit var/haxelib.zip


Loading…
Cancel
Save