From 4d9ebaaa6eec92bc80afbf35496ca3f04ccb243d Mon Sep 17 00:00:00 2001 From: Erica Marigold Date: Fri, 15 Sep 2023 17:26:43 +0530 Subject: [PATCH] init: basic structure & functionality --- .gitignore | 169 ++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 15 +++++ build.ts | 13 ++++ bun.lockb | Bin 0 -> 4051 bytes bunfig.toml | 1 + package.json | 11 ++++ tsconfig.json | 22 +++++++ 7 files changed, 231 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 build.ts create mode 100644 bun.lockb create mode 100644 bunfig.toml create mode 100644 package.json create mode 100644 tsconfig.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f81d56e --- /dev/null +++ b/.gitignore @@ -0,0 +1,169 @@ +# Based on https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore + +# Logs + +logs +_.log +npm-debug.log_ +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) + +report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json + +# Runtime data + +pids +_.pid +_.seed +\*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover + +lib-cov + +# Coverage directory used by tools like istanbul + +coverage +\*.lcov + +# nyc test coverage + +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) + +.grunt + +# Bower dependency directory (https://bower.io/) + +bower_components + +# node-waf configuration + +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) + +build/Release + +# Dependency directories + +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) + +web_modules/ + +# TypeScript cache + +\*.tsbuildinfo + +# Optional npm cache directory + +.npm + +# Optional eslint cache + +.eslintcache + +# Optional stylelint cache + +.stylelintcache + +# Microbundle cache + +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history + +.node_repl_history + +# Output of 'npm pack' + +\*.tgz + +# Yarn Integrity file + +.yarn-integrity + +# dotenv environment variable files + +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) + +.cache +.parcel-cache + +# Next.js build output + +.next +out + +# Nuxt.js build / generate output + +.nuxt +dist + +# Gatsby files + +.cache/ + +# Comment in the public line in if your project uses Gatsby and not Next.js + +# https://nextjs.org/blog/next-9-1#public-directory-support + +# public + +# vuepress build output + +.vuepress/dist + +# vuepress v2.x temp and cache directory + +.temp +.cache + +# Docusaurus cache and generated files + +.docusaurus + +# Serverless directories + +.serverless/ + +# FuseBox cache + +.fusebox/ + +# DynamoDB Local files + +.dynamodb/ + +# TernJS port file + +.tern-port + +# Stores VSCode versions used for testing VSCode extensions + +.vscode-test + +# yarn v2 + +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.\* diff --git a/README.md b/README.md new file mode 100644 index 0000000..adfaafb --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# bun-luau-loader + +To install dependencies: + +```bash +bun install +``` + +To run: + +```bash +bun run src/index.ts +``` + +This project was created using `bun init` in bun v1.0.0. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. diff --git a/build.ts b/build.ts new file mode 100644 index 0000000..f15cebc --- /dev/null +++ b/build.ts @@ -0,0 +1,13 @@ +import plugin from "./src/index"; + +const out = await Bun.build({ + plugins: [plugin], + entrypoints: ["./examples/run.ts"], +}); + +if (out.success) { + eval(await out.outputs[0].text()) +} else { + console.warn("Build failed:") + console.warn(out.logs.map((v) => " " + v.message).join("\n")) +} \ No newline at end of file diff --git a/bun.lockb b/bun.lockb new file mode 100644 index 0000000000000000000000000000000000000000..4ad2e83b8841c87109e604b6a909ea3bc250b48e GIT binary patch literal 4051 zcmY#Z)GsYA(of3F(@)JSQ%EY!;{sycoc!eMw9K4T-L(9o+{6;yG6OCq1_lQI_id|% z?oSkNF}c8}opDjMS0I+(Il(VndPzaWb%q(T&ip_{K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