TypeScript y Prettier
This commit is contained in:
parent
2b8e3c8319
commit
857e9b2e16
7 changed files with 71 additions and 1 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
build/
|
||||||
|
node_modules/
|
2
.prettierignore
Normal file
2
.prettierignore
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
pnpm-lock.yaml
|
||||||
|
build/
|
8
demo/index.html
Normal file
8
demo/index.html
Normal 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
3
index.ts
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
export function prueba() {
|
||||||
|
console.log("¡Hola desde hyperpop.js!");
|
||||||
|
}
|
10
package.json
10
package.json
|
@ -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
28
pnpm-lock.yaml
Normal 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
19
tsconfig.json
Normal 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
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue