-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to SvelteKit/Svelte-library style project setup / publishing #161
Comments
Oh, yeah, so far so good! 🥳 Finally I see light concerning a decent project setup with proper TS + ESLint etc. It's going to be much more fun developing + code quality will massively improve (after fixing all ESLint issues). 🚀 |
IMPORTANT notices:
|
- add ability to iterate over manually user-created / svelthree-generated children and $destroy() them - Refactor SvelthreeGLTF.ts accordingly After this I'll migrate to new `SvelteKit`-library project setup (see #161), which will allow me to massively increase code quality and development speed in future. All possible errors with this refactor will be targeted after the migration.
…161) Also: change types `./*` import path to `../types/*`
- different components types import - incl. several ESLint fixes
- `lib/utils` - `lib/ani` - `lib/logic` - `Canvas` etc.
…on declarations from components (#161) `@sveltejs/package's type definitions generator doesn't like exported function declarations. `export function foo` or `export async function foo` will generate `get undefined()` and `set undefined()` accessors in components' `t.ds`.
will change it back later after running format.
…THREE_Foo` from 'three' instead (#161) - I've chosen `THREE_` as prefix, may change in future, but I like it so far. - Also: currently `Scene` and `Object3D` three.js classes and types are always being imported `as THREE_Foo`, but this is actually not always neccessary -> may change before `1.0.0-next.1`
#161) - Fix generic `mat` shorthand property type when using accessors: - Replace `mat` accessors type definitions (accessor getter and setter) -> only `Mesh` and `Points`, this will give us correct intellisense with e.g. `comp_ref.mat = {...}` depending on which material has been asigned to the `Mesh` or `Points` component. - Optimize all accessors-jsdoc-comments: - Copy accessors-comments from `__propDef` to `class` definition. - Fix any comment-indentation issues (_only in `class` definition, leaving generated `__propDef` comments as they are_) - Add svelthree-specific accessors-hint: ◁▶ _svelthree-component accessor_
Type `Mat` to be used with a `mat` object.
done 🥳 |
I've been struggling with project setup issues ever since, especially the correct TypeScript setup. Currently, I'm pretty annoyed by some strange / inconsistent TS behavior inside the
svelthree
-project vs.svelthree
-package installed in newestSvelteKit
-app, so I've decided to take a deeper look atthrelte
which is using aSvelteKit
-setup.I've replaced
threlte
source withsvelthree
source etc., but was not able tonpm i
insidethrelte/packages
folder, getting theconfig.kit.package has been removed — use @sveltejs/package instead
error. I then tried a freshSvelteKit
-app install and have noticed theLibrary
-option while runningnpm create svelte@latest my-app
.There's a link inside the fresh
SvelteKit
-library-project to: https://github.com/sveltejs/kit/tree/master/packages/kitIt seems that switching to
SvelteKit
-setup is the way to go, so let's give it a try!The text was updated successfully, but these errors were encountered: