├── contributing.md ├── .gitignore ├── LICENSE ├── README.md ├── deno-script.sh ├── dprintrc.json ├── examples ├── colors.txt ├── deno-executable.js ├── deno-files.js ├── deno-import.js └── deno-ls-like.js ├── install.sh ├── maturity.md ├── run-test.sh ├── test ├── deno-script-test.bats └── some.bash └── tools ├── dprint ├── Dockerfile ├── dprint-rust.Dockerfile ├── dprintrc.json ├── launch.sh ├── local-install.sh ├── test.js └── test.ts ├── esformatter ├── Dockerfile ├── launch.sh ├── local-install.sh └── test.js ├── fmt.sh ├── shfmt └── launch.sh └── test ├── Dockerfile └── build-push.sh / contributing.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | ## Submitting a Pull Request 4 | 5 | Before submitting, please make sure the following is done: 6 | 7 | 1. That there is a related issue and it is referenced in the PR text. 8 | 2. Format your code with `./tools/fmt.sh` (You just need docker) 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ########################## 2 | ## IntelliJ 3 | ########################## 4 | *.iml 5 | .idea/ 6 | *.ipr 7 | *.iws 8 | out/ 9 | .idea_modules/ 10 | ########################## 11 | ## Eclipse 12 | ########################## 13 | .metadata 14 | .classpath 15 | .project 16 | .settings/ 17 | bin/ 18 | tmp/ 19 | *.tmp 20 | *.bak 21 | *.swp 22 | *~.nib 23 | local.properties 24 | .loadpath 25 | ########################## 26 | ## NetBeans 27 | ########################## 28 | nbproject/private/ 29 | build/ 30 | nbbuild/ 31 | dist/ 32 | nbdist/ 33 | nbactions.xml 34 | nb-configuration.xml 35 | ########################## 36 | ## OS X 37 | ########################## 38 | .DS_Store 39 | 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 jiraguha 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # deno-script 🦕 2 | Enhanced scripting support for JavaScript/TypeScript with Deno 🦕 on *nix-based systems. 3 | 4 | [![Maturity badge - Experimental](https://img.shields.io/badge/Maturity-Experimental-yellow.svg)](https://github.com/jiraguha/deno-script/blob/master/maturity.md) 5 | 6 | --- 7 | 8 | It is largely inspired by [kscript](https://github.com/holgerbrandl/kscript). The idea is to leverage the scripting abilities of javascript using [Deno](https://deno.land/). 9 | 10 | I feel that scripting can be so much fun with `Deno` as: 11 | 12 | - It can import modules from any location on the web, 13 | - It is secure by default. Imported module can run in sandbox. 14 | - It is Supports TypeScript out of the box. 15 | - It is much more that `Node` 16 | 17 | ## Requirement 18 | - Os: Mac, linux 19 | - [Installing deno](https://deno.land/#installation) 20 | - Make sure that Deno is on the bin path. If you `homebrew` the last point should be done automatically. If not, make sure to manually add them to your `.bash_profile` (or similar)... see bellow! 21 | ``` 22 | # Add this to your .bash_profile 23 | export DENO_INSTALL="$HOME/.deno" 24 | export PATH=$PATH:$DENO_INSTALL/bin 25 | ``` 26 | ## Installation 27 | 28 | If your are on `zsh`: 29 | ```shell 30 | curl -sSL "https://raw.githubusercontent.com/jiraguha/deno-script/master/install.sh" | bash -s "master" "zsh" 31 | 32 | ``` 33 | 34 | For others: 35 | ```shell 36 | curl -sSL "https://raw.githubusercontent.com/jiraguha/deno-script/master/install.sh" | bash -s "master" "bash" 37 | 38 | ``` 39 | 40 | 41 | ## Script Input Modes 42 | The main mode of operation is `deno run