export-helper
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "export-helper", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Nodejs utility to help compile TS modules into sweet es5 & es6 exports", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# export-helper | ||
Rather pretentious name for a tiny **nodejs** module that edits the last line of a file. | ||
Rather pretentious name for a tiny **nodejs** module that edits the last line of a file. | ||
It turns `export = myModule;` into `default export myModule;` between tsc compilations (both ways supported). | ||
@@ -9,3 +9,3 @@ [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier) | ||
### Compatibility | ||
**node** >= 10 | ||
**node >= 10** | ||
@@ -32,8 +32,9 @@ ### Install | ||
const options = { | ||
mode: "es6", // available options: "es5", "es6" | ||
path: "testFile.ts", // path to file (no need ./) | ||
silent: false, // pass it to true to silent the console.log; false by default | ||
linesToTrim: 1 /* default to 1; | ||
you usually don't need to touch this, but if your IDE puts an extra blank line | ||
between your module export and EOF, pass it to 2 and it should do the trick. | ||
mode: "es6", // needed. Available options: "es5", "es6" | ||
path: "testFile.ts", // needed. Path to file (./ is optionnal) | ||
silent: false, // default to false; set to true to remove the log | ||
linesToTrim: 1 /* default to 1. | ||
You usually don't need this, but in case your IDE insert | ||
an extra blank line between your module export and EOF, | ||
incrementing that value should do the trick. | ||
*/ | ||
@@ -40,0 +41,0 @@ }; |
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
6586
51