File tree Expand file tree Collapse file tree 11 files changed +84
-64
lines changed
packages/template-blank-svelte Expand file tree Collapse file tree 11 files changed +84
-64
lines changed Original file line number Diff line number Diff line change 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 ="  " />
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 >
Original file line number Diff line number Diff line change @@ -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
+
Original file line number Diff line number Diff line change 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 , { } )
Original file line number Diff line number Diff line change
1
+ <page >
2
+ <actionBar title =" Home" />
3
+ <gridLayout >
4
+ <label class =" info" >
5
+ <formattedString >
6
+ <span class =" fas" text ="  " />
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 >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 3
3
"main" : " app/app.ts" ,
4
4
"displayName" : " Blank Svelte" ,
5
5
"templateType" : " App template" ,
6
- "version" : " 8.1.0 " ,
6
+ "version" : " 8.1.1 " ,
7
7
"description" : " Blank template for NativeScript apps using Svelte" ,
8
8
"author" :
" NativeScript Team <[email protected] >" ,
9
9
"license" : " Apache-2.0" ,
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
],
43
43
"dependencies" : {
44
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
49
"@nativescript/types" : " ~8.1.1" ,
50
50
"@nativescript/webpack" : " ~5.0.0" ,
51
- "svelte" : " ~3.35 .0" ,
52
- "svelte-loader-hot " : " ~0. 3.1" ,
53
- "svelte-native-preprocessor" : " ^0.2 .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
55
"typescript" : " ~4.3.5"
56
56
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 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
+ }
Original file line number Diff line number Diff line change 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
}
Original file line number Diff line number Diff line change
1
+ /// <reference path="../node_modules/@nativescript/types/index.d.ts" />
You can’t perform that action at this time.
0 commit comments