From c19258a3e31aabc1a0aca42cbf3d6af2eee61c8f Mon Sep 17 00:00:00 2001 From: dacctal <120422854+dacctal@users.noreply.github.com> Date: Fri, 13 Mar 2026 09:50:28 +0000 Subject: init --- .editorconfig | 8 ++++++++ .gitattributes | 8 ++++++++ .gitignore | 27 +++++++++++++++++++++++++++ main.v | 12 ++++++++++++ v.mod | 7 +++++++ 5 files changed, 62 insertions(+) create mode 100644 .editorconfig create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 main.v create mode 100644 v.mod diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..01072ca --- /dev/null +++ b/.editorconfig @@ -0,0 +1,8 @@ +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.v] +indent_style = tab diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9a98968 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,8 @@ +* text=auto eol=lf +*.bat eol=crlf + +*.v linguist-language=V +*.vv linguist-language=V +*.vsh linguist-language=V +v.mod linguist-language=V +.vdocignore linguist-language=ignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..93a5d35 --- /dev/null +++ b/.gitignore @@ -0,0 +1,27 @@ +# Binaries for programs and plugins +main +prile +*.exe +*.exe~ +*.so +*.dylib +*.dll + +# Ignore binary output folders +bin/ + +# Ignore common editor/system specific metadata +.DS_Store +.idea/ +.vscode/ +*.iml + +# ENV +.env + +# vweb and database +*.db +*.js + +# Ignore installed modules through `v install --local`: +modules/ diff --git a/main.v b/main.v new file mode 100644 index 0000000..e6f8d95 --- /dev/null +++ b/main.v @@ -0,0 +1,12 @@ +import os + +fn main() { + if os.args.len <= 1 { + println("usage: prile [filename]...") + exit(1) + } + for arg in os.args[1..] { + if !os.is_file(arg) { continue } + println(os.read_file(arg) or {""}) + } +} diff --git a/v.mod b/v.mod new file mode 100644 index 0000000..def5807 --- /dev/null +++ b/v.mod @@ -0,0 +1,7 @@ +Module { + name: 'prile' + description: 'print the contents of a file to stdout' + version: '0.0.0' + license: 'MIT' + dependencies: [] +} -- cgit v1.2.3