Skip to content

Commit 8f818d3

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/ns-9
2 parents 6e2ca46 + b5c6005 commit 8f818d3

File tree

34 files changed

+281
-228
lines changed

34 files changed

+281
-228
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
const webpack = require('@nativescript/webpack');
1+
const webpack = require('@nativescript/webpack')
22

33
module.exports = (env) => {
4-
webpack.init(env);
5-
4+
webpack.init(env)
5+
66
webpack.chainWebpack((config) => {
77
config.devServer.hotOnly(true)
88
config.devServer.hot(true)
9-
});
9+
})
1010

11-
return webpack.resolveConfig();
12-
};
11+
return webpack.resolveConfig()
12+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
@tailwind base;
22
@tailwind components;
3-
@tailwind utilities;
3+
@tailwind utilities;
Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
/** @type {import('tailwindcss').Config} */
22
module.exports = {
3-
content: ['./src/**/*.{css,xml,html,vue,svelte,ts,tsx}'],
4-
// use the .ns-dark class to control dark mode (applied by NativeScript) - since 'media' (default) is not supported.
5-
darkMode: ['class', '.ns-dark'],
6-
theme: {
7-
extend: {},
8-
},
9-
plugins: [],
10-
corePlugins: {
11-
preflight: false, // disables browser-specific resets
12-
},
13-
};
14-
15-
3+
content: ['./src/**/*.{css,xml,html,vue,svelte,ts,tsx}'],
4+
// use the .ns-dark class to control dark mode (applied by NativeScript) - since 'media' (default) is not supported.
5+
darkMode: ['class', '.ns-dark'],
6+
theme: {
7+
extend: {},
8+
},
9+
plugins: [],
10+
corePlugins: {
11+
preflight: false, // disables browser-specific resets
12+
},
13+
}

packages/template-blank-solid-vision/tsconfig.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@
1616
"@/*": ["src/*"]
1717
},
1818
"allowJs": true,
19-
"types": [
20-
"node",
21-
"@nativescript-dom/core-types",
22-
"@nativescript-dom/solidjs-types"
23-
],
19+
"types": ["node", "@nativescript-dom/core-types", "@nativescript-dom/solidjs-types"],
2420
"allowSyntheticDefaultImports": true,
2521
"esModuleInterop": true,
2622
"experimentalDecorators": true,
@@ -32,4 +28,4 @@
3228
},
3329
"include": ["src"],
3430
"exclude": ["node_modules", "platforms"]
35-
}
31+
}
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
const webpack = require("@nativescript/webpack");
1+
const webpack = require('@nativescript/webpack')
22
module.exports = (env) => {
3-
webpack.init(env);
3+
webpack.init(env)
44
webpack.chainWebpack((config) => {
5-
config.devServer.hotOnly(true);
6-
config.devServer.hot(true);
7-
});
8-
return webpack.resolveConfig();
9-
};
5+
config.devServer.hotOnly(true)
6+
config.devServer.hot(true)
7+
})
8+
return webpack.resolveConfig()
9+
}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
const webpack = require('@nativescript/webpack');
1+
const webpack = require('@nativescript/webpack')
22

33
module.exports = (env) => {
4-
webpack.init(env);
5-
4+
webpack.init(env)
5+
66
webpack.chainWebpack((config) => {
77
config.devServer.hotOnly(true)
88
config.devServer.hot(true)
9-
});
9+
})
1010

11-
return webpack.resolveConfig();
12-
};
11+
return webpack.resolveConfig()
12+
}

packages/template-blank-svelte-vision/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@nativescript/template-blank-svelte-vision",
33
"main": "src/app.ts",
4-
"version": "8.9.1",
4+
"version": "8.9.2",
55
"description": "Nativescript visionOS Starter with Svelte",
66
"author": "NativeScript Team <[email protected]>",
77
"license": "Apache-2.0",
@@ -39,16 +39,16 @@
3939
"url": "https://github.com/NativeScript/NativeScript/issues"
4040
},
4141
"dependencies": {
42-
"@nativescript/core": "~8.9.0",
43-
"@nativescript-community/svelte-native": "~1.0.29"
42+
"@nativescript-community/svelte-native": "~1.0.29",
43+
"@nativescript/core": "~8.9.9"
4444
},
4545
"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.7.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"
5353
}
5454
}

packages/template-blank-svelte-vision/src/app.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@
1212
font-family: 'Font Awesome 5 Free', 'fa-regular-400';
1313
font-weight: 400;
1414
}
15-
Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,33 @@
11
const sveltePreprocess = require('svelte-preprocess')
2-
const svelteNativePreprocessor = require('svelte-native-preprocessor')
2+
const svelteNativePreprocessor = require('@nativescript-community/svelte-native-preprocessor')
33

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+
}
412
module.exports = {
513
compilerOptions: {
6-
namespace: "foreign"
14+
namespace: 'foreign',
715
},
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+
}

packages/template-blank-svelte/app/app.css

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
@import '@nativescript/theme/css/core.css';
2-
@import '@nativescript/theme/css/default.css';
3-
4-
.fab {
1+
.fab {
52
font-family: 'Font Awesome 5 Brands', 'fa-brands-400';
63
font-weight: 400;
74
}
@@ -15,4 +12,3 @@
1512
font-family: 'Font Awesome 5 Free', 'fa-regular-400';
1613
font-weight: 400;
1714
}
18-

0 commit comments

Comments
 (0)