@digitak/esrun
Advanced tools
Comparing version 1.0.4 to 1.0.5
{ | ||
"name": "@digitak/esrun", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Execute directly your Typescript/Javascript(with ES modules) files using Esbuild", | ||
@@ -8,3 +8,4 @@ "files": ["src/**/*"], | ||
"bin": { | ||
"esrun": "src/bin.js" | ||
"esrun": "src/bin.js", | ||
"esr": "src/bin.js" | ||
}, | ||
@@ -11,0 +12,0 @@ "scripts": { |
@@ -11,3 +11,3 @@ # esrun | ||
``` | ||
npm i -D esrun | ||
npm i -D @digitak/esrun | ||
``` | ||
@@ -17,4 +17,6 @@ | ||
``` | ||
```py | ||
esrun foo.ts | ||
# or use shortened form : | ||
esr foo.ts | ||
``` | ||
@@ -28,4 +30,15 @@ | ||
The file dependencies will be bundled and executed as well. | ||
All file dependencies will be bundled and executed as well. | ||
If the given entry point is a folder, the following actions will be executed in order to find the right entry file : | ||
- check if a package.json file exists with a `main` field. The entry file will be the value of the `main` field, relative to the package.json directory. | ||
- check if an `index.ts` file exists in the given folder. | ||
- check if an eponym file exists in the given folder. | ||
- check if an eponym file with the `.ts` extension exists in the given folder. | ||
- check if a `main.ts` file exists in the given folder. | ||
- check if a `index.js` file exists in the given folder. | ||
- check if an eponym file with the `.js` extension exists in the given folder. | ||
- check if a `main.js` file exists in the given folder. | ||
## API | ||
@@ -38,3 +51,3 @@ | ||
esrun(filePath: string, ...arguments: string[]): unknown | ||
esrun(filePath: string, arguments: string[]): unknown | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5842
49