Comments (3)
@felixsanz: I'm relatively new as a snel contributor. It seems you explored the details on that pretty thoroughly already. Would it be possible for you to raise a pull request suggesting a solution?
one spontaneous thought from my side was that it might be interesting how what you describe fits together with: https://github.com/crewdevio/Snel/blob/main/install.ts#L15
from snel.
sorry i don't know how to fix it
from snel.
I was having issues with svelte/store
in addition to typescript transpilation. After migrating to node based svelte, the problem persisted and I discovered that the issue lied in my windows project directory path containing a single apostrophe/quote (ie: C:/some-dir/client's website/proj/
). Changing the directory to a apostrophe/quotation-free path fixed the issue with both snel and regular node svelte. So I guess the problem lies more or less with sveltejs or the preprocessors, not snel.
Give it a shot with the test project below:
If the output site functions correctly, you should see a random 9-digit id that turns into **A SECRET**
after 3 seconds
C:/temp> snel create proj
C:/temp> cd proj
// <!-- "C:/temp/proj/src/sitestore.ts" -->
import { writable } from "svelte/store"
export const uuid: string = writable(Math.random().toString().replace("0.", "").slice(0, 9))
<!-- "C:/temp/proj/src/components/Home.svelte" -->
<script lang="ts">
import { uuid } from "~/sitestore.ts"
export let name: string;
// keep in mind that whenever reading a store value, you must prefix the variable name with a $ dollar symbol
// in the console log below, it would be incorrect to use "uuid" to acquire the value. you must use "$uuid" instead
console.log(`this session\'s id is ${$uuid}`)
</script>
<h1>Hello {name}!</h1>
<h1>Your unique id is: {$uuid}</h1>
<style>
h1 {
color: #ff3e00;
text-transform: uppercase;
font-size: 4em;
font-weight: 100;
}
</style>
<!-- ""C:/temp/proj/src/App.svelte"" -->
<script>
import Home from "~/components/Home.svelte";
import { fade } from "svelte/transition";
import { uuid } from "~/sitestore.ts"
let name = "World";
setTimeout(() => {uuid.set("**A SECRET**")}, 3000)
</script>
<main transition:fade>
<Home {name} />
</main>
<style>
main {
text-align: center;
}
</style>
C:/temp/proj> snel serve
from snel.
Related Issues (20)
- Installation fails on Windows machine
- Discord channel HOT 3
- Uncaught SyntaxError: deno/acorn.js' does not provide an export named 'default' while installing snel HOT 3
- Installation error HOT 1
- [help wanted] on CSS Libraries / Modules Preparation HOT 2
- Cannot import components with typescript enabled
- Strange error when importing https://deno.land/x/web3.... HOT 4
- Installation error on M1 Macbook HOT 3
- Strange error while just using snel. HOT 5
- Docs: Using third-party components? HOT 1
- hostname: invalid option -- 'I' HOT 3
- failed to execute snel create [projectname] - error: Uncaught TypeError: Yl.plugin is not a function HOT 4
- trex run build generates incomplete href attribute(s) HOT 3
- Running the install commands hangs HOT 3
- Example app fails to build due to css processing error HOT 1
- Unable to install snel with install.ts HOT 7
- Issue installing Snel ...... missing or deprecated "[email protected]" and "[email protected]" HOT 1
- Failed to install snel HOT 2
- Snel install fails on windows HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snel.