From d95c8dc27859c26f04311abf5808b73efd908748 Mon Sep 17 00:00:00 2001 From: Garen Tyler Date: Thu, 10 Dec 2020 00:00:24 -0700 Subject: [PATCH] Project cleanup --- .gitignore | 6 ------ build.rs | 6 ++++++ package-lock.json | 4 +++- package.json | 26 ++++++++++++++++++++++++++ readme.md | 14 +++++++++----- test.pvt | 1 - 6 files changed, 44 insertions(+), 13 deletions(-) create mode 100644 build.rs create mode 100644 package.json delete mode 100644 test.pvt diff --git a/.gitignore b/.gitignore index 0b01ec6..1a236a3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,3 @@ /target node_modules *.wasm - -#Added by cargo -# -#already existing elements were commented out - -#/target diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..2381a9e --- /dev/null +++ b/build.rs @@ -0,0 +1,6 @@ +fn main() { + println!("cargo:rerun-if-changed=test.js"); + println!("cargo:rerun-if-changed=package.json"); + println!("cargo:rerun-if-changed=package-lock.json"); + std::process::Command::new("npm").arg("install").output().expect("could not install npm dependencies"); +} diff --git a/package-lock.json b/package-lock.json index d08bb60..a43c7f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,8 @@ { - "requires": true, + "name": "pivot", + "version": "1.0.0", "lockfileVersion": 1, + "requires": true, "dependencies": { "ansi-regex": { "version": "2.1.1", diff --git a/package.json b/package.json new file mode 100644 index 0000000..4941151 --- /dev/null +++ b/package.json @@ -0,0 +1,26 @@ +{ + "name": "pivot", + "version": "1.0.0", + "description": "Pivot is a new programming language built with Rust by Garen Tyler. Pivot is currently in the alpha stage of development.", + "main": "test.js", + "dependencies": { + "webassembly": "^0.11.0" + }, + "devDependencies": {}, + "scripts": { + "clean": "cargo clean && rm -rf node_modules out.wasm", + "build": "cargo build", + "run": "cargo run && node test.js", + "test": "cargo test" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ElementG9/pivot.git" + }, + "author": "Garen Tyler", + "license": "MIT", + "bugs": { + "url": "https://github.com/ElementG9/pivot/issues" + }, + "homepage": "https://github.com/ElementG9/pivot#readme" +} diff --git a/readme.md b/readme.md index 68fef4d..766d653 100644 --- a/readme.md +++ b/readme.md @@ -1,10 +1,14 @@ # Pivot - +## Version Pivot is a new programming language built with Rust by Garen Tyler. Pivot is currently in the alpha stage of development. --- -### Installation -* Download the repo with `git clone https://github.com/ElementG9/pivot`. -* Install [Rust](https://www.rust-lang.org/). -* Run with `cargo run `. +### Development +* Download the repo with `git clone https://github.com/garentyler/pivot`. +* Make sure you have [Rust](https://www.rust-lang.org/), [NodeJS](https://nodejs.org/en/), and [NPM](https://www.npmjs.com/) installed. +* Scripts: + * `npm run clean` to delete dependencies and output files. + * `npm run build` to build the project. + * `npm run run` to run the example. + * `npm run test` to run the tests. diff --git a/test.pvt b/test.pvt deleted file mode 100644 index 114a326..0000000 --- a/test.pvt +++ /dev/null @@ -1 +0,0 @@ -let x = {2 + 2};