update: Add tsconfig.build.json

Signed-off-by: bcakmakoglu <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
bcakmakoglu
2022-02-21 10:40:41 +01:00
committed by Braks
parent b7abb31c24
commit b51c26f6bb
3 changed files with 49 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
<script lang="ts" setup>
import { CSSProperties } from 'vue'
import { Handle, NodeProps, Position } from '@braks/vue-flow'
interface RGBNodeProps extends NodeProps {
@@ -33,11 +34,13 @@ const colorVal = computed({
emit('change', { color, val })
},
})
const style = { '--color': color } as CSSProperties
</script>
<template>
<div class="wrapper">
<div class="text-md" :style="{ color }">{{ `${color} Amount`.toUpperCase() }}</div>
<input v-model="colorVal" class="slider nodrag" :style="{ '--color': color }" type="range" min="0" max="255" />
<input v-model="colorVal" class="slider nodrag" :style="style" type="range" min="0" max="255" />
<Handle type="source" :position="Position.Right" :style="{ backgroundColor: color }" />
</div>
</template>

View File

@@ -28,7 +28,7 @@
"scripts": {
"prepare": "ts-patch install -s",
"dev": "vite",
"build": "export NODE_OPTIONS=\"--max-old-space-size=5120\" && vite build && vue-tsc --declaration --emitDeclarationOnly && tsc && rm -rf tmp",
"build": "export NODE_OPTIONS=\"--max-old-space-size=5120\" && vite build && vue-tsc --declaration --emitDeclarationOnly && tsc -p tsconfig.build.json && rm -rf tmp",
"prepublishOnly": "yarn build",
"test": "cypress run-ct",
"test:open": "cypress open-ct",

44
tsconfig.build.json Normal file
View File

@@ -0,0 +1,44 @@
{
"compilerOptions": {
"outDir": "./tmp",
"baseUrl": ".",
"module": "ESNext",
"target": "es2017",
"lib": [
"DOM",
"ESNext"
],
"declaration": true,
"declarationDir": "./dist",
"strict": true,
"esModuleInterop": true,
"incremental": false,
"skipLibCheck": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"noUnusedLocals": false,
"strictNullChecks": true,
"forceConsistentCasingInFileNames": true,
"types": [
"vite/client",
"cypress"
],
"paths": {
"~/*": [
"src/*"
]
},
"plugins": [
// Transform paths in output .d.ts files (Include this line if you output declarations files)
{ "transform": "typescript-transform-paths", "afterDeclarations": true }
]
},
"include": ["src"],
"exclude": [
"examples",
"node_modules",
"build",
"dist",
"cypress"
]
}