Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vite-node

Package Overview
Dependencies
Maintainers
3
Versions
256
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-node - npm Package Compare versions

Comparing version 0.28.4 to 0.28.5

1

dist/cli.d.ts

@@ -5,2 +5,3 @@ import { e as ViteNodeServerOptions } from './types-63205a44.js';

root?: string;
script?: boolean;
config?: string;

@@ -7,0 +8,0 @@ watch?: boolean;

2

package.json
{
"name": "vite-node",
"version": "0.28.4",
"version": "0.28.5",
"description": "Vite as Node.js runtime",

@@ -5,0 +5,0 @@ "author": "Anthony Fu <anthonyfu117@hotmail.com>",

@@ -51,2 +51,28 @@ <p align="center">

### Hashbang
If you prefer to write scripts that don't need to be passed into Vite Node, you can declare it in the [hashbang](https://bash.cyberciti.biz/guide/Shebang).
Simply add `#!/usr/bin/env vite-node --script` at the top of your file:
_file.ts_
```ts
#!/usr/bin/env vite-node --script
console.log('argv:', process.argv.slice(2))
```
And make the file executable:
```sh
chmod +x ./file.ts
```
Now, you can run the file without passing it into Vite Node:
```sh
$ ./file.ts hello
argv: [ 'hello' ]
```
Note that when using the `--script` option, Vite Node forwards every argument and option to the script to execute, even the one supported by Vite Node itself.
## Programmatic Usage

@@ -53,0 +79,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc