https://github.com/fries-byte/svelteplus
Svelte+ is a "programming language" that can convert simple words into Svelte code, this program is still in beta and use the code at your own risk
https://github.com/fries-byte/svelteplus
svelte sveltejs sveltekit tool
Last synced: 4 months ago
JSON representation
Svelte+ is a "programming language" that can convert simple words into Svelte code, this program is still in beta and use the code at your own risk
- Host: GitHub
- URL: https://github.com/fries-byte/svelteplus
- Owner: Fries-byte
- License: apache-2.0
- Created: 2025-01-06T08:57:00.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-01-09T07:50:22.000Z (6 months ago)
- Last Synced: 2025-01-13T21:16:01.725Z (6 months ago)
- Topics: svelte, sveltejs, sveltekit, tool
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# About
Pages:
[How to use](https://github.com/fries-byte/Svelte-Plus/README.md#how-to-use)
[Code](https://github.com/fries-byte/Svelte-Plus?tab=readme-ov-file#code)
Svelte+ was coded in [StackBlitz](https://stackblitz.com) with its build in Svelte kit.
Svelte plus will create Svelte code with simple and short terms.
Svelte plus is a programming tool made to build a website easier with little to no effort.
Svelte plus is not accosiated in any way with the official Svelte.
Svelte plus is also in development
Svelte plus has been tested and might give you double-code, where it gives you two of the exact same code.# How to use
1, 2, 3, 4, 5, stands for h1, h2 and so on.
!addcss, adds css.
!addscript, adds javascript to the Svelte code.
bgc , will add a background color if css code is added.
ff , ff is a short term of family font, i recommend sans-serif if you want a nice font.
img , after typing img, put the image link.
# Code
```ts
let svelte = `
1 Thank you for using Svelt-Plus,
2 making developing websites easier.!addcss
ff sans-serif
bg grey
`;let imgsrc = '';
let font = '';
let sveltecss = '';
let sveltecode = '';
let svelteSCRIPTADD = 'console.log("Added script");';const lines = svelte.split('\n').map(line => line.trim()).filter(line => line);
lines.forEach((line) => {
if (line.startsWith('!addscript')) {
sveltecode += `${svelteSCRIPTADD}\n`;
}
if (line.startsWith('1 ')) {
const content = line.substring(2).trim();
sveltecode += `${content}
\n`;
}if (line.startsWith('2 ')) {
const content = line.substring(2).trim();
sveltecode += `${content}
\n`;
}
if (line.startsWith('img ')) {
imgsrc = line.substring(4).trim();
sveltecode += `\n`;
}if (line.startsWith('bg ')) {
const bgColor = line.substring(3).trim();
sveltecss += ` background-color: ${bgColor};\n`;
}if (line.startsWith('ff ')) {
font = line.substring(3).trim();
sveltecss += ` font-family: ${font};\n`;
}if (line.startsWith('!addcss')) {
sveltecode += `\nbody {\n${sveltecss}}\n\n`;
}
});console.log(sveltecode);
console.log(sveltecss);
```