Skip to content

Commit

Permalink
updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
philwalk committed Oct 7, 2023
1 parent 288a8f4 commit bed5f0d
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 18 deletions.
63 changes: 45 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,43 @@
# pallet
Platform Independent Tooling
Library for Cross-Platform Development

<img alt="pallet image" width=200 src="images/wooden-pallet.png">

Provides support for various expressive idioms typical of scripting languages, with a goal of supporting portable code runnable across platforms with minimal or no customization.
Provides support for various expressive idioms typical of scripting languages, with a goal of supporting portable code runnable across platforms with minimal customization.

* No Dependencies

* Target environments
* Linux
* OSX
* Windows 10+
* Cygwin64
* Msys64
* Mingw64
* Git-bash
* WSL Linux
* Tested on Scala Versions
* `scala 3.3.1`
* `scala 2.13`

#### Usage
* Tested Target environments
* `Linux`
* `Windows`
* `Cygwin64`
* `Msys64`
* `Mingw64`
* `Git-bash`
* `WSL Linux`

Add the following to `build.sbt`
* Soon-to-be Tested
* `OSX`

### Usage

Add the following dependency to `build.sbt`
```sbt
libraryDependencies += "com.palletops" % "pallet" % "0.8.12"
"org.vastblue" % "pallet" % "0.8.12-SNAPSHOT"
```

#### Example script:
### Example script:
```scala
#!/usr/bin/env -S scala -cp @~/.scala3cp
import vastblue.pathextend.*
#!/usr/bin/env -S scala-cli.bat shebang

//> using scala "2.13.12"
//> using lib "org.vastblue::pallet::0.8.4-SNAPSHOT"

import vastblue.pathextend._

def main(args: Array[String]): Unit = {
// show system memory info
Expand All @@ -40,13 +50,30 @@ def main(args: Array[String]): Unit = {
printf("%s\n", p.norm)
}
}
main(args)
```

The classpath may be defined with an `@atFile`
The classpath may also be defined with an `@atFile`

Example `@atFile`
```
-cp /Users/username/.ivy2/local/org.vastblue/pallet_2.13/0.8.4-SNAPSHOT/jars/pallet_2.13.jar
```

```scala
#!/usr/bin/env -S scala -cp @~/.scala3cp
import vastblue.pathextend.*

def main(args: Array[String]): Unit = {
// show system memory info
for (line <- "/proc/meminfo".path.lines) {
printf("%s\n", line)
}
// list child directories of "."
val cwd: Path = ".".path
for ( (p: Path) <- cwd.paths.filter { _.isDirectory }){
printf("%s\n", p.norm)
}
}
```

Binary file modified images/wooden-pallet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions jsrc/palletRef.sc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env -S scala-cli.bat shebang

//> using scala "3.3.1"
//> using lib "org.vastblue::pallet::0.8.4-SNAPSHOT"

import vastblue.pathextend._

def main(args: Array[String]): Unit = {
// show system memory info
for (line <- "/proc/meminfo".path.lines) {
printf("%s\n", line)
}
// list child directories of "."
val cwd: Path = ".".path
for ( (p: Path) <- cwd.paths.filter { _.isDirectory }){
printf("%s\n", p.norm)
}
}
main(args)

0 comments on commit bed5f0d

Please sign in to comment.