-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from TheRealBarenziah/dev
Dev
- Loading branch information
Showing
21 changed files
with
7,288 additions
and
261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
node_modules | ||
node_modules | ||
.env | ||
/lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"printWidth": 80, | ||
"trailingComma": "all", | ||
"singleQuote": false, | ||
"semi": true, | ||
"tabWidth": 2, | ||
"useTabs": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
language: node_js | ||
node_js: | ||
- lts/* | ||
install: npm install | ||
script: npm run build && npm run test | ||
env: | ||
secure: lzEN89Zt8Bbz8TZKXt7fqkvQ/+uhTeAQiWQt73Goo+5v2pA62/zdMvEqoXo8gmMXL5X4ixbd4frhqA8n0GShsQBYWrEZilzc/bvuMV2scFRl1ALfdY5ygIXfkReFpfeIvNlJgxl9q/mBPRyeHkDWF3oLyAFrXTOO5EHToLUHA3aL15ZGRwiuSY1iDY53YNiCQ32OUK7TYfszXdBsL0TWpPKetV8b4JBeu/51nkQ9SoXe95PwIGBficMsyUoQ/cDLiNOmFwCpfxogm2ZUwPS7YTghPci98oW0wtFlEq76d4Cdg6wwSJmh9LOZdbYgi8u6kZRcPme1B3/h4W8I7rW01X0TqPtnAOXxpVkySXMqIIdNPgsHAs20OcyaN1IvHlHCs4aeU7jLhhKO2ThS4gIOiotV77sMNQEbhXo9MP4DC9SeeXDPtd/b+pydl4kCii6bAe69IRo41J2FhT366kd8Ou9HsE0ABY8lYLKB+iJgYBFLEgY/vqtUVFAB0aopmotool891jhz3IdDgT713zeo0Pk7QPwssKB3/BQ6BmrsbRXJUNDwgPTIw/fOuQj0VL2PMXKDVNIHjwitc6b48FckaNW/tRau3POhS0yAcYnyC+EnHqF1dDmQVicT1LCPSES0sDffJqFFRRbS2E7EEJ3+dXZrKhDLwmaS3RpoVnmq4kQ= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# 1.1.0 | ||
|
||
Module overhaul: | ||
Seeing some people found this module useful made me glad, so I decided to give it some love. | ||
|
||
- Becomes dependency-free | ||
The respectable `request` module was the only external dependency, but now that's unsupported, as `npm install` spams everytime, it's problematic. | ||
While I could have replaced it with Axios, I preferred reinventing that wheel using standard node `https`. It should hold for the years to come. | ||
|
||
- TypeScript support | ||
TypeScript is all the rage and I'm still in the process of learning it. That's why I thought it was interesting to make this module TS compatible, **without breaking compatibility** for the `require();` users. | ||
|
||
- Better integration for VSCode | ||
I've discovered JSDoc since then. It should benefit even non-TypeScript users. | ||
|
||
- Change code style | ||
I have semi colons everywhere except in this little module. Fixed that. Long live semi colons :) | ||
|
||
- Upgraded file architecture & CI | ||
[This is the resource](https://itnext.io/step-by-step-building-and-publishing-an-npm-typescript-package-44fe7164964c) that guided me through the TS/Jest stack, it was an interesting adventure. | ||
I made my best to ensure this update won't break anything for you, but if it is the case, please open an issue :) | ||
|
||
Todo: | ||
Write more in CONTRIBUTING.md so this module remains easy to fork & tweak. It may look more bloated than before, but I'm convinced decent documentation should fix it. | ||
|
||
Making .mjs import work. Hopefully soon | ||
Supporting browsers (afterall why not) | ||
Supporting passing filename parameter | ||
Supporting arrays (in the very bottom of the list tbh) | ||
|
||
# 1.0.1 | ||
|
||
Fix README | ||
|
||
# 1.0.0 | ||
|
||
Replace `var` and `function` with proper ES6 syntax & update README |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# tl;dr | ||
|
||
- Clone project | ||
- `npm i` | ||
- compile the code in `src` into `lib` folder: `npm run build` | ||
- run the tests defined in `src/__tests__`: `npm run test` | ||
- typical combo while tweaking: `npm run build && npm run test` | ||
|
||
See more scrpits in package.json | ||
|
||
If you don't know the purpose of some config files, [this excellent resource](https://itnext.io/step-by-step-building-and-publishing-an-npm-typescript-package-44fe7164964c) should guide you through. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"transform": { | ||
"^.+\\.(t|j)sx?$": "ts-jest" | ||
}, | ||
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$", | ||
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"], | ||
"verbose": false, | ||
"setupFiles": ["dotenv/config"] | ||
} |
Oops, something went wrong.