diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3e2e84b --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +build/ +node_modules/ diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..25e5f67 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +pnpm-lock.yaml +build/ diff --git a/demo/index.html b/demo/index.html new file mode 100644 index 0000000..8620ab4 --- /dev/null +++ b/demo/index.html @@ -0,0 +1,8 @@ + + +hyperpop.js demo + + diff --git a/index.ts b/index.ts new file mode 100644 index 0000000..8b8c604 --- /dev/null +++ b/index.ts @@ -0,0 +1,3 @@ +export function prueba() { + console.log("¡Hola desde hyperpop.js!"); +} diff --git a/package.json b/package.json index 5420868..2bc7f73 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,10 @@ "description": "Un cliente de API de https://github.com/TangoSoftware/ApiTiendas", "main": "index.js", "scripts": { + "build": "tsc", + "watch-build": "tsc --watch", + "format": "prettier --write .", + "check-format": "prettier --check .", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { @@ -15,5 +19,9 @@ "api" ], "author": "Sutty ", - "license": "SEE LICENSE IN LICENSE" + "license": "SEE LICENSE IN LICENSE", + "devDependencies": { + "prettier": "^2.4.1", + "typescript": "^4.4.3" + } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..84c18b1 --- /dev/null +++ b/pnpm-lock.yaml @@ -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 diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..9c509d4 --- /dev/null +++ b/tsconfig.json @@ -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 + } +}