-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
11,410 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
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 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"commit": true, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "public", | ||
"baseBranch": "master", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
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 @@ | ||
.DS_Store | ||
node_modules | ||
dist | ||
ignore | ||
.env | ||
.env.* | ||
!.env.example | ||
|
||
package-lock.json | ||
docs | ||
bin |
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,22 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier" | ||
], | ||
"plugins": ["@typescript-eslint", "prettier", "unused-imports"], | ||
"ignorePatterns": ["*.cjs"], | ||
"parserOptions": { | ||
"sourceType": "module", | ||
"ecmaVersion": 2016 | ||
}, | ||
"rules": { | ||
"unused-imports/no-unused-imports": "error" | ||
}, | ||
"env": { | ||
"browser": true, | ||
"es2016": true | ||
} | ||
} |
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,23 @@ | ||
name: Publish docs site to GitHub Pages | ||
on: | ||
repository_dispatch: | ||
types: [npm-published] | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
cache: 'npm' | ||
|
||
- run: npm install --frozen-lockfile | ||
- run: | | ||
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | ||
npm run docs:publish -- -u "github-actions-bot <[email protected]>" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,33 @@ | ||
name: Publish to NPM | ||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
cache: 'npm' | ||
|
||
- run: npm install --frozen-lockfile | ||
- name: Create Release Pull Request or Publish | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
publish: npm run publish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Notify if published | ||
if: steps.changesets.outputs.published == 'true' | ||
uses: peter-evans/repository-dispatch@v2 | ||
with: | ||
event-type: npm-published |
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,4 @@ | ||
node_modules/ | ||
dist/ | ||
coverage/ | ||
docs/ |
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,10 @@ | ||
.DS_Store | ||
node_modules | ||
coverage | ||
dist | ||
.env | ||
.env.* | ||
!.env.example | ||
|
||
package-lock.json | ||
docs |
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 @@ | ||
{ | ||
"semi": true, | ||
"useTabs": true, | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"printWidth": 80 | ||
} |
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,12 @@ | ||
{ | ||
"$schema": "http://json.schemastore.org/swcrc", | ||
"jsc": { | ||
"parser": { | ||
"syntax": "typescript" | ||
}, | ||
"target": "es2016" | ||
}, | ||
"module": { | ||
"type": "commonjs" | ||
} | ||
} |
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,49 @@ | ||
# vault | ||
|
||
A small, type inferred container designed for dependency injection 🫙 | ||
|
||
![npm version](https://badgen.net/npm/v/@web-pacotes/vault) ![npm total downloads](https://badgen.net/npm/dt/@web-pacotes/vault) ![bundlephobia bundle size](https://badgen.net/bundlephobia/min/@web-pacotes/vault) | ||
|
||
--- | ||
|
||
## How to use | ||
|
||
todo: describe usage | ||
|
||
```typescript | ||
todo: include usage code here | ||
``` | ||
|
||
Additionally, you can a small, type inferred container designed for dependency injection 🫙. Execute the following command for more info: | ||
|
||
```bash | ||
vault --help | ||
``` | ||
|
||
## Features | ||
|
||
todo: enumerate features package currently provides | ||
|
||
### Upcoming features | ||
|
||
todo: enumerate features package does not provide | ||
|
||
--- | ||
|
||
## Bugs and Contributions | ||
|
||
Found any bug (including typos) in the package? Do you have any suggestion | ||
or feature to include for future releases? Please create an issue via | ||
GitHub in order to track each contribution. Also, pull requests are very | ||
welcome! | ||
|
||
To contribute, start by setting up your local development environment. The [setup.md](setup.md) document will onboard you on how to do so! | ||
|
||
## Contact | ||
|
||
This template was prepared by: | ||
|
||
- João Freitas, @freitzzz | ||
- Rute Santos, @rutesantos4 | ||
|
||
Contact us for freelancing work! |
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 @@ | ||
import sum from 'vault'; | ||
|
||
function main() { | ||
console.log(sum(40, 2)); | ||
} | ||
|
||
main(); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,14 @@ | ||
{ | ||
"name": "vault-example", | ||
"version": "0.0.0", | ||
"description": "Example project to test vault", | ||
"main": "dist/index.js", | ||
"module": "dist/index.cjs", | ||
"types": "dist/index.d.ts", | ||
"sideEffects": false, | ||
"author": "web-pacotes", | ||
"license": "none", | ||
"dependencies": { | ||
"vault": "file:../" | ||
} | ||
} |
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,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
script_file_name=$(basename $0) | ||
script_dir_path=$(dirname $(realpath $0)) | ||
git_hooks_dir_path="$script_dir_path/../.git/hooks" | ||
|
||
dir_files=$(ls $script_dir_path) | ||
|
||
if [[ ! -d $git_hooks_dir_path ]] | ||
then | ||
mkdir $git_hooks_dir_path | ||
fi | ||
|
||
for file in ${dir_files[@]}; do | ||
file_path="$script_dir_path/$file" | ||
|
||
if [[ -f $file_path && "$file" != "$script_file_name" ]] | ||
then | ||
cp $file_path $git_hooks_dir_path | ||
fi | ||
done |
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 @@ | ||
#!/usr/bin/env bash | ||
|
||
npm run lint | ||
|
||
if [[ $? != 0 ]]; then | ||
npm run format | ||
|
||
exit 1 | ||
fi | ||
|
||
exit 0 |
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,23 @@ | ||
/* | ||
* For a detailed explanation regarding each configuration property and type check, visit: | ||
* https://jestjs.io/docs/configuration | ||
*/ | ||
export default { | ||
// Automatically clear mock calls, instances, contexts and results before every test | ||
clearMocks: true, | ||
|
||
// Indicates whether the coverage information should be collected while executing the test | ||
collectCoverage: true, | ||
|
||
// The directory where Jest should output its coverage files | ||
coverageDirectory: 'coverage', | ||
|
||
// Indicates which provider should be used to instrument code for coverage | ||
coverageProvider: 'v8', | ||
|
||
// A preset that is used as a base for Jest's configuration | ||
preset: 'ts-jest', | ||
|
||
// A list of paths to directories that Jest should use to search for files in | ||
roots: ['src'] | ||
}; |
Oops, something went wrong.