@nativescript/template-blank-svelte 8.0.4 → 8.1.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.
@@ -20,13 +20,17 @@
20
20
  android:allowBackup="true"
21
21
  android:icon="@mipmap/ic_launcher"
22
22
  android:label="@string/app_name"
23
- android:theme="@style/AppTheme">
23
+ android:theme="@style/AppTheme"
24
+ android:hardwareAccelerated="true">
24
25
 
25
26
  <activity
26
27
  android:name="com.tns.NativeScriptActivity"
27
28
  android:label="@string/title_activity_kimera"
28
29
  android:configChanges="keyboard|keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|locale|uiMode"
29
- android:theme="@style/LaunchScreenTheme">
30
+ android:theme="@style/LaunchScreenTheme"
31
+ android:hardwareAccelerated="true"
32
+ android:launchMode="singleTask"
33
+ android:exported="true">
30
34
 
31
35
  <meta-data android:name="SET_THEME_ON_LAUNCH" android:resource="@style/AppTheme" />
32
36
 
package/app/App.svelte CHANGED
@@ -1,24 +1,7 @@
1
- <page>
2
- <actionBar title="Svelte Native App" />
3
- <gridLayout>
4
- <label class="info" horizontalAlignment="center" verticalAlignment="middle" textWrap="true">
5
- <formattedString>
6
- <span class="fas" text="&#xf135;" />
7
- <span text=" {message}" />
8
- </formattedString>
9
- </label>
10
- </gridLayout>
11
- </page>
1
+ <frame>
2
+ <Home />
3
+ </frame>
12
4
 
13
- <script lang="typescript">
14
- let message: string = "Blank Svelte Native App"
15
- </script>
16
-
17
- <style>
18
- .info .fas {
19
- color: #3A53FF;
20
- }
21
- .info {
22
- font-size: 20;
23
- }
24
- </style>
5
+ <script lang="ts">
6
+ import Home from './components/Home.svelte'
7
+ </script>
package/app/app.css CHANGED
@@ -12,4 +12,20 @@ The imported CSS rules must precede all other types of rules.
12
12
  */
13
13
  @import '@nativescript/theme/css/core.css';
14
14
  @import '@nativescript/theme/css/default.css';
15
- @import './font-awesome.css';
15
+
16
+ /* Font icon class */
17
+ .fab {
18
+ font-family: 'Font Awesome 5 Brands', 'fa-brands-400';
19
+ font-weight: 400;
20
+ }
21
+
22
+ .fas {
23
+ font-family: 'Font Awesome 5 Free', 'fa-solid-900';
24
+ font-weight: 900;
25
+ }
26
+
27
+ .far {
28
+ font-family: 'Font Awesome 5 Free', 'fa-regular-400';
29
+ font-weight: 400;
30
+ }
31
+
package/app/app.ts CHANGED
@@ -1,9 +1,10 @@
1
1
  /*
2
2
  In NativeScript, the app.ts file is the entry point to your application.
3
3
  You can use this file to perform app-level initialization, but the primary
4
- purpose of the file is to pass control to the app’s first module.
4
+ purpose of the file is to pass control to the app’s first page.
5
5
  */
6
6
 
7
- import { svelteNative } from 'svelte-native'
7
+ import { svelteNativeNoFrame } from 'svelte-native'
8
8
  import App from './App.svelte'
9
- svelteNative(App, {})
9
+
10
+ svelteNativeNoFrame(App, {})
@@ -0,0 +1,27 @@
1
+ <page>
2
+ <actionBar title="Home" />
3
+ <gridLayout>
4
+ <label class="info">
5
+ <formattedString>
6
+ <span class="fas" text="&#xf135;" />
7
+ <span text=" {message}" />
8
+ </formattedString>
9
+ </label>
10
+ </gridLayout>
11
+ </page>
12
+
13
+ <script lang="ts">
14
+ let message: string = "Blank Svelte Native App"
15
+ </script>
16
+
17
+ <style>
18
+ .info .fas {
19
+ color: #3A53FF;
20
+ }
21
+
22
+ .info {
23
+ font-size: 20;
24
+ horizontal-align: center;
25
+ vertical-align: center;
26
+ }
27
+ </style>
@@ -30,7 +30,6 @@ module.exports = function (hookArgs) {
30
30
  console.log(error)
31
31
  }
32
32
 
33
-
34
33
  function deleteFolderSync(folderPath) {
35
34
  if (fs.statSync(folderPath).isDirectory()) {
36
35
  fs.readdirSync(folderPath).forEach((file) => {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "main": "app/app.ts",
4
4
  "displayName": "Blank Svelte",
5
5
  "templateType": "App template",
6
- "version": "8.0.4",
6
+ "version": "8.1.2",
7
7
  "description": "Blank template for NativeScript apps using Svelte",
8
8
  "author": "NativeScript Team <oss@nativescript.org>",
9
9
  "license": "Apache-2.0",
@@ -14,10 +14,10 @@
14
14
  "app",
15
15
  "App_Resources",
16
16
  "hooks",
17
+ "types",
17
18
  "tools",
18
19
  "!tools/assets",
19
20
  ".editorconfig",
20
- "references.d.ts",
21
21
  "svelte.config.js",
22
22
  "tsconfig.json"
23
23
  ],
@@ -41,17 +41,17 @@
41
41
  "url": "https://github.com/NativeScript/NativeScript/issues"
42
42
  },
43
43
  "dependencies": {
44
- "@nativescript/core": "~8.0.0",
44
+ "@nativescript/core": "~8.1.1",
45
45
  "@nativescript/theme": "~3.0.1",
46
- "svelte-native": "~0.9.5"
46
+ "svelte-native": "~1.0.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@nativescript/types": "~8.0.0",
50
- "@nativescript/webpack": "beta",
51
- "svelte": "~3.35.0",
52
- "svelte-loader-hot": "~0.3.1",
53
- "svelte-native-preprocessor": "^0.2.0",
49
+ "@nativescript/types": "~8.1.1",
50
+ "@nativescript/webpack": "~5.0.0",
51
+ "svelte": "~3.44.0",
52
+ "svelte-loader": "^3.1.2",
53
+ "svelte-native-preprocessor": "^1.0.0",
54
54
  "svelte-preprocess": "^4.7.0",
55
- "typescript": "~4.0.0"
55
+ "typescript": "~4.3.5"
56
56
  }
57
57
  }
package/svelte.config.js CHANGED
@@ -1,5 +1,9 @@
1
1
  const sveltePreprocess = require('svelte-preprocess')
2
+ const svelteNativePreprocessor = require('svelte-native-preprocessor')
2
3
 
3
4
  module.exports = {
4
- preprocess: sveltePreprocess(),
5
- }
5
+ compilerOptions: {
6
+ namespace: "foreign"
7
+ },
8
+ preprocess: [ sveltePreprocess(), svelteNativePreprocessor() ]
9
+ }
package/tsconfig.json CHANGED
@@ -1,24 +1,26 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "module": "esnext",
3
+ "strict": true,
4
4
  "target": "es2017",
5
+ "module": "esnext",
5
6
  "moduleResolution": "node",
6
- "allowSyntheticDefaultImports": true,
7
- "esModuleInterop": false,
8
- "experimentalDecorators": true,
9
- "emitDecoratorMetadata": true,
10
- "noEmitHelpers": true,
11
- "noEmitOnError": true,
12
- "skipLibCheck": true,
13
7
  "lib": ["dom", "es2017"],
14
- "types": ["svelte"],
8
+ "sourceMap": true,
9
+ "noEmitHelpers": true,
10
+ "importHelpers": true,
15
11
  "baseUrl": ".",
16
12
  "paths": {
17
13
  "~/*": ["app/*"],
18
14
  "@/*": ["app/*"]
19
- }
15
+ },
16
+ "typeRoots": ["types"],
17
+ "types": ["node"],
18
+ "allowSyntheticDefaultImports": true,
19
+ "esModuleInterop": true,
20
+ "experimentalDecorators": true,
21
+ "emitDecoratorMetadata": true,
22
+ "skipLibCheck": true
20
23
  },
21
- "include": ["app/**/*"],
22
- "files": ["./references.d.ts"],
24
+ "include": ["app", "types"],
23
25
  "exclude": ["node_modules", "platforms"]
24
26
  }
@@ -0,0 +1 @@
1
+ /// <reference path="../node_modules/@nativescript/types/index.d.ts" />
@@ -0,0 +1,3 @@
1
+ declare module '*.svelte' {
2
+ export { SvelteComponent as default };
3
+ }
@@ -1,16 +0,0 @@
1
- /* https://fontawesome.com/icons?d=gallery&m=free */
2
-
3
- .far {
4
- font-family: 'Font Awesome 5 Free', 'fa-regular-400';
5
- font-weight: 400;
6
- }
7
-
8
- .fas {
9
- font-family: 'Font Awesome 5 Free', 'fa-solid-900';
10
- font-weight: 900;
11
- }
12
-
13
- .fab {
14
- font-family: 'Font Awesome 5 Brands', 'fa-brands-400';
15
- font-weight: 400;
16
- }
package/references.d.ts DELETED
@@ -1 +0,0 @@
1
- /// <reference path="./node_modules/@nativescript/types/index.d.ts" />