jacob-8 / kitbook Goto Github PK
View Code? Open in Web Editor NEWDocumentation, Prototyping, Inspection & Testing Workbench Tool for Svelte (SvelteKit Storybook alternative)
Home Page: https://kitbook.vercel.app/
License: MIT License
Documentation, Prototyping, Inspection & Testing Workbench Tool for Svelte (SvelteKit Storybook alternative)
Home Page: https://kitbook.vercel.app/
License: MIT License
instrument panel should have a input with the label name in which edit the contents of the button
nothing is shown in instrument panel
Is it possible to see my components with tailwindcss classes applied?
1.0.0-beta.31
We use Kitbook in our Sveltekit based EShop and we are very happy about it, it is such a powerful and useful tool and became a vital part of our stack. Last week we realized that our staging server does not load the Kitbook giving a 500. It loads but perfectly on our local machines.
This is the error:
This file is being treated as an ES module because it has a '.js' file extension and '/Users/azin/dev/kitbook/packages/kitbook/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
at isFileSystemCaseSensitive (file:///Users/azin/dev/kitbook/packages/kitbook/build/server/chunks/Tools.svelte_svelte_type_style_lang-qhah-Kye.js:6475:43)
at getNodeSystem (file:///Users/azin/dev/kitbook/packages/kitbook/build/server/chunks/Tools.svelte_svelte_type_style_lang-qhah-Kye.js:6263:48)
at file:///Users/azin/dev/kitbook/packages/kitbook/build/server/chunks/Tools.svelte_svelte_type_style_lang-qhah-Kye.js:6684:20
at src/compiler/sys.ts (file:///Users/azin/dev/kitbook/packages/kitbook/build/server/chunks/Tools.svelte_svelte_type_style_lang-qhah-Kye.js:6690:11)
at __init (file:///Users/azin/dev/kitbook/packages/kitbook/build/server/chunks/Tools.svelte_svelte_type_style_lang-qhah-Kye.js:116:60)
at src/compiler/_namespaces/ts.ts (file:///Users/azin/dev/kitbook/packages/kitbook/build/server/chunks/Tools.svelte_svelte_type_style_lang-qhah-Kye.js:130179:9)
at __init (file:///Users/azin/dev/kitbook/packages/kitbook/build/server/chunks/Tools.svelte_svelte_type_style_lang-qhah-Kye.js:116:60)
at src/typescript/_namespaces/ts.ts (file:///Users/azin/dev/kitbook/packages/kitbook/build/server/chunks/Tools.svelte_svelte_type_style_lang-qhah-Kye.js:190571:9)
at __init (file:///Users/azin/dev/kitbook/packages/kitbook/build/server/chunks/Tools.svelte_svelte_type_style_lang-qhah-Kye.js:116:60)
at src/typescript/typescript.ts (file:///Users/azin/dev/kitbook/packages/kitbook/build/server/chunks/Tools.svelte_svelte_type_style_lang-qhah-Kye.js:190582:9)
After digging deep into the problem I found out that it comes out to importing typescript in CodeMirror.svelte
import ts, { type CompilerOptions } from 'typescript'
Now, this works fine when we run the server using vite preview
command. The problem only appears when we use the node adapter in svelte.config.js
and then start the server with node build
command.
I made a repo that shows the problem.
https://github.com/azinazadi/kitbook-ts-issue.git
In this repo I made these changes:
Use adapter-node
in svelte.config.js
I removed everything extra from CodeMirror.svelte and just left the import there, to create a minimum failing example.
# Navigate to the 'kitbook' package directory
cd packages/kitbook
# Install all required dependencies using pnpm
pnpm install
# Build the project
pnpm build
node build
Now when you open the localhose:3000, you will see the 500 error.
I run on Mac OS M3, Sonoma 14.3
Node 20.14.0
pnpm 9.1.0
As I understood it when you run the server using vite preview
, the vite server handles the imports better and takes better care of modules. The Node server apparently does a more basic job which leads to this problem.
With the recent Svelte Summit Spring talk, Svelte 5 has been moved into Release Candidate (RC) stage. How hard would it be to migrate Kitbook from 4 -> 5 ?
Create breaking version change for Kitbook to use for Svelte v5
No response
No response
Improve body noscroll option for opening modal by learning from https://stackblitz.com/edit/js-mbbmgk?file=style.css
When I run npm run kitbook
it says to add "extends": "./.svelte-kit-kitbook/tsconfig.json"
to tsconfig.json file.
Should I replace my extends value "./.svelte-kit/tsconfig.json"
?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.