@nativescript/template-blank-svelte-vision 8.9.0 → 8.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nativescript/template-blank-svelte-vision",
3
3
  "main": "src/app.ts",
4
- "version": "8.9.0",
4
+ "version": "8.9.2",
5
5
  "description": "Nativescript visionOS Starter with Svelte",
6
6
  "author": "NativeScript Team <oss@nativescript.org>",
7
7
  "license": "Apache-2.0",
@@ -39,16 +39,16 @@
39
39
  "url": "https://github.com/NativeScript/NativeScript/issues"
40
40
  },
41
41
  "dependencies": {
42
- "@nativescript/core": "~8.9.0",
43
- "svelte-native": "~1.0.9"
42
+ "@nativescript-community/svelte-native": "~1.0.29",
43
+ "@nativescript/core": "~8.9.9"
44
44
  },
45
45
  "devDependencies": {
46
- "@nativescript/types": "~8.9.0",
47
- "@nativescript/webpack": "~5.0.0",
48
- "svelte": "~4.2.2",
49
- "svelte-loader": "^3.2.0",
50
- "svelte-native-preprocessor": "^1.0.0",
51
- "svelte-preprocess": "^5.1.3",
52
- "typescript": "~5.4.0"
46
+ "@nativescript-community/svelte-native-preprocessor": "^1.0.1",
47
+ "@nativescript/types": "~8.9.1",
48
+ "@nativescript/webpack": "~5.0.24",
49
+ "svelte": "~4.2.20",
50
+ "svelte-loader": "^3.2.4",
51
+ "svelte-preprocess": "^6.0.3",
52
+ "typescript": "~5.9.2"
53
53
  }
54
54
  }
package/src/app.css CHANGED
@@ -12,4 +12,3 @@
12
12
  font-family: 'Font Awesome 5 Free', 'fa-regular-400';
13
13
  font-weight: 400;
14
14
  }
15
-
package/src/app.ts CHANGED
@@ -4,7 +4,7 @@ You can use this file to perform app-level initialization, but the primary
4
4
  purpose of the file is to pass control to the app’s first page.
5
5
  */
6
6
 
7
- import { svelteNativeNoFrame } from 'svelte-native'
7
+ import { svelteNativeNoFrame } from '@nativescript-community/svelte-native'
8
8
  import App from './App.svelte'
9
9
 
10
10
  svelteNativeNoFrame(App, {})
package/svelte.config.js CHANGED
@@ -1,9 +1,33 @@
1
1
  const sveltePreprocess = require('svelte-preprocess')
2
- const svelteNativePreprocessor = require('svelte-native-preprocessor')
2
+ const svelteNativePreprocessor = require('@nativescript-community/svelte-native-preprocessor')
3
3
 
4
+ // this can be called either through svelte-loader where we want either __ANDROID__ or __IOS__ to be defined but not both
5
+ // or through svelte-check where we want both so everything is checked
6
+ const webpack_env = process.env['NATIVESCRIPT_WEBPACK_ENV']
7
+ ? JSON.parse(process.env['NATIVESCRIPT_WEBPACK_ENV'])
8
+ : {
9
+ android: true,
10
+ ios: true,
11
+ }
4
12
  module.exports = {
5
13
  compilerOptions: {
6
- namespace: "foreign"
14
+ namespace: 'foreign',
7
15
  },
8
- preprocess: [ sveltePreprocess(), svelteNativePreprocessor() ]
9
- }
16
+ preprocess: [
17
+ sveltePreprocess({
18
+ replace: [
19
+ [/__ANDROID__/g, !!webpack_env.android],
20
+ [/__IOS__/g, !!webpack_env.ios],
21
+ ],
22
+ typescript: {
23
+ compilerOptions: {
24
+ verbatimModuleSyntax: true,
25
+ target: 'es2020',
26
+ },
27
+ },
28
+ }),
29
+ // if you want bind:text="{email}" to be transformed to text="{email}" on:textChanged="{e => email = e.value}"
30
+ // enable svelteNativePreprocessor. Keep in mind that it is pretty slow
31
+ /* svelteNativePreprocessor() */
32
+ ],
33
+ }