TypeScript y Prettier

This commit is contained in:
Cat /dev/Nulo 2021-09-22 19:32:17 -03:00
parent 2b8e3c8319
commit 857e9b2e16
7 changed files with 71 additions and 1 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
build/
node_modules/

2
.prettierignore Normal file
View file

@ -0,0 +1,2 @@
pnpm-lock.yaml
build/

8
demo/index.html Normal file
View file

@ -0,0 +1,8 @@
<!doctype html>
<meta charset="utf8">
<title>hyperpop.js demo</title>
<script type="module">
import { prueba } from "../build/index.js"
prueba()
</script>

3
index.ts Normal file
View file

@ -0,0 +1,3 @@
export function prueba() {
console.log("¡Hola desde hyperpop.js!");
}

View file

@ -4,6 +4,10 @@
"description": "Un cliente de API de https://github.com/TangoSoftware/ApiTiendas", "description": "Un cliente de API de https://github.com/TangoSoftware/ApiTiendas",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"build": "tsc",
"watch-build": "tsc --watch",
"format": "prettier --write .",
"check-format": "prettier --check .",
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
"repository": { "repository": {
@ -15,5 +19,9 @@
"api" "api"
], ],
"author": "Sutty <hi@sutty.nl>", "author": "Sutty <hi@sutty.nl>",
"license": "SEE LICENSE IN LICENSE" "license": "SEE LICENSE IN LICENSE",
"devDependencies": {
"prettier": "^2.4.1",
"typescript": "^4.4.3"
}
} }

28
pnpm-lock.yaml Normal file
View file

@ -0,0 +1,28 @@
lockfileVersion: 5.3
specifiers:
prettier: ^2.4.1
typescript: ^4.4.3
devDependencies:
prettier: 2.4.1
typescript: 4.4.3
packages:
/prettier/2.4.1:
resolution:
{
integrity: sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==,
}
engines: { node: ">=10.13.0" }
hasBin: true
dev: true
/typescript/4.4.3:
resolution:
{
integrity: sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==,
}
engines: { node: ">=4.2.0" }
hasBin: true
dev: true

19
tsconfig.json Normal file
View file

@ -0,0 +1,19 @@
{
"compilerOptions": {
/* Visit https://aka.ms/tsconfig.json to read more about this file */
"target": "es5",
"module": "es6",
"outDir": "./build",
"allowJs": false,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true
}
}