svelte-preprocess
imba
svelte-preprocess | imba | |
---|---|---|
23 | 45 | |
1,713 | 6,247 | |
0.7% | 0.4% | |
5.9 | 9.4 | |
22 days ago | 10 days ago | |
TypeScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
svelte-preprocess
-
How to use Sass or Scss in Svelte/Sveltekit
You can learn more about the official svelte-preprocess and other available config here
-
How does the Svelte compiler works with the Typescript compiler?
svelte-preprocess is responsible for processing things like TypeScript and SCSS. The svelte compiler itself is only responsible for turning the svelte file into JavaScript.
-
Sveltekit scss issue
svelte-preprocess should handle scss out-of-the-box, and it’s included in SvelteKit by default if you created your project with create-svelte
-
Create Svelte + Typescript + tailwindcss Project(feat. error solved)
// svelte.config.js import sveltePreprocess from 'svelte-preprocess' export default { // Consult https://github.com/sveltejs/svelte-preprocess // for more information about preprocessors // **here -> postcss: true** preprocess: sveltePreprocess({ postcss: true, }) }
-
SvelteKit adapter-static building a index.html without metatags and html inside JS files
/** @type {import('@sveltejs/kit').Config} */ const config = { // Consult https://github.com/sveltejs/svelte-preprocess // for more information about preprocessors preprocess: preprocess({ typescript: true, postcss: true, scss: { prependData: @import 'src/styles/helpers/functions.scss'; } }), kit: { paths: { assets: '', base: dev ? '' : '/route/in/website' }, trailingSlash: 'always', adapter: adapter({ pages: 'build', assets: 'build', fallback: 'index.html' }), files: { hooks: 'src/hooks', }, prerender: { default: true, }, } };
- Any way to make Svelte look and feel like Vue?
-
How to use autoprefixer and scss together in SvelteKit?
Continue to use tags
- In svelte.config.js ... (import aliases can be whatever you want)
- import svelte_preprocess from 'svelte-preprocess'
- import autoprefixer from 'autoprefixer'
- pass the Svelte preprocessor to Kit's preprocess config option and pass the postcss plugin to that Svelte preprocessor:
svelte.config.js
import svelte_proprocess from 'svelte-process' import autoprefixer from 'autoprefixer' const config = { // Consult https://github.com/sveltejs/svelte-preprocess for more info preprocess: [ svelte_preprocess({ postcss: { plugins: [autoprefixer()] } }) ] }
- In svelte.config.js ... (import aliases can be whatever you want)
-
Attempting to add math rendering to mdsvex, but encountering an error
import adapter from '@sveltejs/adapter-auto'; import preprocess from 'svelte-preprocess'; import { mdsvex } from 'mdsvex'; import remarkMath from 'remark-math'; import rehypeKatex from 'rehype-katex-svelte'; /** @type {import('@sveltejs/kit').Config} */ const config = { extensions: ['.svelte', '.svx', '.md'], // Consult https://github.com/sveltejs/svelte-preprocess // for more information about preprocessors preprocess: [ preprocess(), mdsvex({ extensions: ['.svx', '.md'], smartypants: true, layout: { project: "./src/routes/projects/layout.svelte", post: "./src/routes/blog/layout.svelte", }, remarkPlugins: [remarkMath], rehypePlugins: [rehypeKatex], }), ], kit: { adapter: adapter({ edge: false, external: [], split: false }) } }; export default config;
-
PostCSS- NESTED --- How can i use it inside a component
Have you tried https://github.com/sveltejs/svelte-preprocess
-
Creating your first Svelte App with SvelteKit
// We have changed the adapter line to use adapter-node@next import adapter from '@sveltejs/adapter-node@next'; import preprocess from 'svelte-preprocess'; /** @type {import('@sveltejs/kit').Config} */ const config = { // Consult https://github.com/sveltejs/svelte-preprocess // for more information about preprocessors preprocess: preprocess(), kit: { // We have changed this to point to a build directory adapter: adapter({ out: 'build' }) } }; export default config;
imba
-
Ask HN: What are some unpopular technologies you wish people knew more about?
Imba. The best web programming language ever made.
https://imba.io/
-
Portugal. The Man – Official Website Is a Google Sheets Document
I agree. I was looking for the same thing.
They’re not easy to create but side by side code/result demos like the ones I saw on https://imba.io/ make it very clear on what I’ll be getting into as a developer.
- Imba – The friendly full-stack language
- Clojure is a product design tool
- Fore – Declarative user interfaces in plain HTML
-
Framework for a frontend-only project?
You might get away with Svelte (not Sveltekit) here since it compiles down to javascript. Another fun framework to try out for this might be https://imba.io/, which also has an option to compile things down to pure HTML, CSS & JS (plus it’s very fun to work with).
-
Thoughts on Svelte
I've been using Svelte exclusively for the past 3 years or so. I love it and will keep using it as my main solution for interactivity. It's fast to use and execute, produces small apps, and it's extremely economical in how you express components.
The confusion the author expresses with $: reactive statements and store auto subscription with the $ are unwarranted IMO. It's really just a lack of familiarity but this kind of stuff becomes intuitive very quickly.
My criticism of Svelte is rather that they haven't gone deep enough into the compiler-based approach.
Would be great if there were something like .svelteStore files where you had all the automatic reactivity tracking without having to use a component. Or some kind of improvements into writing styles. With a compiler you can do anything you want and I think Svelte has been a bit timid, maybe to not scare people away.
For example Imba[1] also bet on a compiler-based approach (years before Svelte existed) and created their own language/framework/compiler. They have come up with amazing solutions to many problems. It's a shame they bet on Ruby aesthetics though and also that they aren't investing into marketing/docs.
Of course, one might argue that using a compiler is a bad idea for a number of reasons. And yeah of course there are objective issues to any approach, but you have to pick your poison. All in all, Svelte has made me tremendously productive compared to using other solutions for years (React, Vue, Mithril, Inferno, etc).
I will say though that I would rather use a solution that doesn't have any reactivity at all. Mithril and Imba have this concept of just "redrawing the whole thing" like a game GUI without having to worry about reactivity. Cognitively speaking, no reactivity is the best mental model IMO. With any reactive solution, it's very easy to fall into complex reactive dependencies which can be hard to track. The author of Imba has a video from 2018 where he talks about this[2].
[1] https://imba.io/
[2] https://www.youtube.com/watch?v=jwoApTLvRdQ
-
The Io Language
A code snippet showing a simple program right on the home page and "selling" whatever features makes it special would go a long way. It's quite off-putting to have to delve deep into a guide in order to get a feel for a language.
Some examples done right:
https://lfe.io
https://elixir-lang.org
https://imba.io
https://ocaml.org
-
Why do so many CS grads seem to look down on webdev?
At the same time, my heart is kind of in the web stuff and I find it a lot more exciting personally so it's hard for me to leave. You can do so much more with web tech and all the new ideas Tcoming from it and the pace it's developing is really . I just don't understand why React is becoming the standard when it's a complete nightmare compared to where we should be. I mean, this is literally insane, especially when things like Svelte exist - or even better, Imba. The day Imba becomes the standard is the day I love web dev again.
What are some alternatives?
vite - Next generation frontend tooling. It's fast!
js-framework-benchmark - A comparison of the performance of a few popular javascript frameworks
style-resources - Style Resources for Nuxt 3
React - The library for web and native user interfaces.
postcss-preset-env - Convert modern CSS into something browsers understand
Tailwind CSS - A utility-first CSS framework for rapid UI development.
sveltekit-blog-template - A SvelteKit blog template
coffeescript - Unfancy JavaScript
svelte-vite-jest-template - Svelte template based on Vite's Svelte template, but includes unit testing setup (Jest and Svelte Testing Library).
htmx - </> htmx - high power tools for HTML
postcss-nested - PostCSS plugin to unwrap nested rules like how Sass does it.
TypeScript - TypeScript is a superset of JavaScript that compiles to clean JavaScript output.