Skip to content

Commit

Permalink
- Add missing files to location package
Browse files Browse the repository at this point in the history
  • Loading branch information
alvaro-canepa committed Jan 13, 2024
1 parent 44bcb3a commit c2f65bf
Show file tree
Hide file tree
Showing 12 changed files with 190 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/location/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8

[*.js]
indent_style = space
indent_size = 2

[{package.json,*.yml,*.cjson}]
indent_style = space
indent_size = 2
3 changes: 3 additions & 0 deletions packages/location/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
coverage
dist
8 changes: 8 additions & 0 deletions packages/location/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules
coverage
dist
.vscode
.DS_Store
.eslintcache
*.log*
*.env*
1 change: 1 addition & 0 deletions packages/location/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
21 changes: 21 additions & 0 deletions packages/location/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
61 changes: 61 additions & 0 deletions packages/location/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# packageName

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![bundle][bundle-src]][bundle-href]
[![Codecov][codecov-src]][codecov-href]

This is my package description.

## Usage

Install package:

```sh
# npm
npm install packageName

# yarn
yarn add packageName

# pnpm
pnpm install packageName

# bun
bun install packageName
```

Import:

```js
// ESM
import {} from "packageName";

// CommonJS
const {} = require("packageName");
```

## Development

- Clone this repository
- Install latest LTS version of [Node.js](https://nodejs.org/en/)
- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable`
- Install dependencies using `pnpm install`
- Run interactive tests using `pnpm dev`

## License

Made with 💛

Published under [MIT License](./LICENSE).

<!-- Badges -->

[npm-version-src]: https://img.shields.io/npm/v/packageName?style=flat&colorA=18181B&colorB=F0DB4F
[npm-version-href]: https://npmjs.com/package/packageName
[npm-downloads-src]: https://img.shields.io/npm/dm/packageName?style=flat&colorA=18181B&colorB=F0DB4F
[npm-downloads-href]: https://npmjs.com/package/packageName
[codecov-src]: https://img.shields.io/codecov/c/gh/unjs/packageName/main?style=flat&colorA=18181B&colorB=F0DB4F
[codecov-href]: https://codecov.io/gh/unjs/packageName
[bundle-src]: https://img.shields.io/bundlephobia/minzip/packageName?style=flat&colorA=18181B&colorB=F0DB4F
[bundle-href]: https://bundlephobia.com/result?p=packageName
54 changes: 54 additions & 0 deletions packages/location/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"name": "@planetadeleste/pinia-orm-location",
"version": "1.0.0",
"description": "",
"repository": {
"type": "git",
"url": "https://github.com/planetadeleste/pinia-orm-core.git"
},
"license": "MIT",
"sideEffects": false,
"type": "module",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "unbuild",
"dev": "vitest dev",
"play": "jiti playground",
"lint": "eslint --cache --ext .ts,.js,.mjs,.cjs . && prettier -c src test",
"lint:fix": "eslint --cache --ext .ts,.js,.mjs,.cjs . --fix && prettier -c src test -w",
"prepack": "pnpm build",
"release": "pnpm test && changelogen --release && npm publish && git push --follow-tags",
"test": "pnpm lint && pnpm test:types && vitest run --coverage",
"test:types": "tsc --noEmit --skipLibCheck"
},
"devDependencies": {
"@planetadeleste/pinia-orm-core": "workspace:*",
"@types/node": "^20.10.5",
"@vitest/coverage-v8": "^1.1.0",
"changelogen": "^0.5.5",
"eslint": "^8.56.0",
"eslint-config-unjs": "^0.2.1",
"jiti": "^1.21.0",
"prettier": "^3.1.1",
"typescript": "^5.3.3",
"unbuild": "^2.0.0",
"vitest": "^1.1.0"
},
"peerDependencies": {
"@planetadeleste/pinia-orm-core": "^1.0.0",
"pinia-orm": "^1.7.2"
},
"packageManager": "[email protected]"
}
3 changes: 3 additions & 0 deletions packages/location/playground/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { test } from "../src";

Check failure on line 1 in packages/location/playground/index.ts

View workflow job for this annotation

GitHub Actions / autofix

test not found in '../src'

Check failure on line 1 in packages/location/playground/index.ts

View workflow job for this annotation

GitHub Actions / ci

test not found in '../src'

console.log(test());
3 changes: 3 additions & 0 deletions packages/location/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["github>unjs/renovate-config"]
}
3 changes: 3 additions & 0 deletions packages/location/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export { default as Country } from "./models/Country";
export { default as State } from "./models/State";
export { default as Town } from "./models/Town";
8 changes: 8 additions & 0 deletions packages/location/test/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { expect, it, describe } from "vitest";
import {} from "../src";

describe("packageName", () => {
it.todo("pass", () => {
expect(true).toBe(true);
});
});
10 changes: 10 additions & 0 deletions packages/location/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Node",
"esModuleInterop": true,
"strict": true
},
"include": ["src"]
}

0 comments on commit c2f65bf

Please sign in to comment.