Skip to content

Commit 80b8ec4

Browse files
committed
feat: app template dep bumps and cleanup
1 parent 45bed74 commit 80b8ec4

File tree

37 files changed

+267
-44
lines changed

37 files changed

+267
-44
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ To help the rest of the community review your change, please follow the instruct
99

1010
## PR Checklist
1111

12-
- [ ] The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/CONTRIBUTING.md#commit-messages.
12+
- [ ] The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/main/CONTRIBUTING.md#commit-messages.
1313
- [ ] There is an issue for the bug/feature this PR is for. To avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it.
1414
- [ ] You have signed the [CLA](http://www.nativescript.org/cla).
15-
- [ ] All existing tests are passing: https://github.com/NativeScript/NativeScript/blob/master/DevelopmentWorkflow.md#running-unit-tests.
15+
- [ ] All existing tests are passing: https://github.com/NativeScript/NativeScript/blob/main/DevelopmentWorkflow.md#running-unit-tests.
1616

1717
## What is the current behavior?
1818
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->

packages/template-blank-ng/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ns create my-blank-ng --template @nativescript/template-blank-ng
1010

1111
> Note: This command will create a new NativeScript app that uses the latest version of this template published to [npm](https://www.npmjs.com/package/@nativescript/template-blank-ng).
1212
13-
If you want to create a new app that uses the source of the template from the `master` branch, you can execute the following:
13+
If you want to create a new app that uses the source of the template from the `main` branch, you can execute the following:
1414

1515
```
1616
# clone nativescript-app-templates monorepo locally
@@ -20,7 +20,7 @@ git clone [email protected]:NativeScript/nativescript-app-templates.git
2020
ns create my-blank-ng --template nativescript-app-templates/packages/template-blank-ng
2121
```
2222

23-
**NB:** Please, have in mind that the master branch may refer to dependencies that are not on NPM yet!
23+
**NB:** Please, have in mind that the main branch may refer to dependencies that are not on NPM yet!
2424

2525
## Walkthrough
2626

packages/template-blank-react/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ ns run ios
2121
> Note: This command will create a new NativeScript app that uses the latest version of this template published to [npm](https://www.npmjs.com/package/@nativescript/template-blank-react).
2222
2323

24-
**NB:** Please, keep in mind that the master branch may refer to dependencies that are not on NPM yet!
24+
**NB:** Please, keep in mind that the main branch may refer to dependencies that are not on NPM yet!
2525

2626
## Walkthrough
2727

Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
legacy-peer-deps=true

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

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"patches",
2626
"types",
2727
".editorconfig",
28+
".npmrc",
2829
"tailwind.config.js",
2930
"tsconfig.json",
3031
"webpack.config.js"
+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# NativeScript
2+
hooks/
3+
node_modules/
4+
platforms/
5+
6+
# Logs
7+
logs
8+
*.log
9+
npm-debug.log*
10+
yarn-debug.log*
11+
yarn-error.log*
12+
13+
# General
14+
.DS_Store
15+
.AppleDouble
16+
.LSOverride
17+
.idea
18+
.cloud
19+
.project
20+
tmp/
21+
typings/
22+
23+
# Visual Studio Code
24+
.vscode/*
25+
!.vscode/settings.json
26+
!.vscode/tasks.json
27+
!.vscode/launch.json
28+
!.vscode/extensions.json

packages/template-blank-solid/.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
legacy-peer-deps=true
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# NativeScript with Solid Blank Template
2+
App templates help you jump start your native cross-platform apps with built-in UI elements and best practices. Save time writing boilerplate code over and over again when you create new apps.
3+
4+
## Quick Start
5+
Execute the following command to create an app from this template:
6+
7+
```
8+
ns create my-blank-solid --template @nativescript/template-blank-solid
9+
```
10+
11+
> Note: This command will create a new NativeScript app that uses the latest version of this template published to [npm](https://www.npmjs.com/package/@nativescript/template-blank-solid).
12+
13+
If you want to create a new app that uses the source of the template from the `main` branch, you can execute the following:
14+
15+
```
16+
# clone nativescript-app-templates monorepo locally
17+
git clone [email protected]:NativeScript/nativescript-app-templates.git
18+
19+
# create app template from local source (all templates are in the 'packages' subfolder of the monorepo)
20+
ns create my-blank-solid --template nativescript-app-templates/packages/template-blank-solid
21+
```
22+
23+
**NB:** Please, have in mind that the main branch may refer to dependencies that are not on NPM yet!
24+
25+
## Get Help
26+
The NativeScript framework has a vibrant community that can help when you run into problems.
27+
28+
Try [joining the NativeScript community Discord](https://nativescript.org/discord). The Discord channel is a great place to get help troubleshooting problems, as well as connect with other NativeScript developers.
29+
30+
If you have found an issue with this template, please report the problem in the [NativeScript repository](https://github.com/NativeScript/NativeScript/issues).
31+
32+
## Contributing
33+
34+
We love PRs, and accept them gladly. Feel free to propose changes and new ideas. We will review and discuss, so that they can be accepted and better integrated.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { NativeScriptConfig } from '@nativescript/core';
2+
3+
export default {
4+
id: 'org.nativescript.app',
5+
appPath: 'src',
6+
appResourcesPath: 'App_Resources',
7+
android: {
8+
v8Flags: '--expose_gc',
9+
markingMode: 'none',
10+
},
11+
} as NativeScriptConfig;
+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"name": "@nativescript/template-blank-solid",
3+
"main": "src/app.js",
4+
"version": "8.6.3",
5+
"description": "Nativescript Starter with Solid",
6+
"author": "NativeScript Team <[email protected]>",
7+
"license": "Apache-2.0",
8+
"repository": {
9+
"type": "git",
10+
"url": "https://github.com/NativeScript/nativescript-app-templates"
11+
},
12+
"homepage": "https://github.com/NativeScript/nativescript-app-templates",
13+
"bugs": {
14+
"url": "https://github.com/NativeScript/NativeScript/issues"
15+
},
16+
"publishConfig": {
17+
"access": "public"
18+
},
19+
"files": [
20+
"src",
21+
"App_Resources",
22+
"hooks",
23+
"tools",
24+
"!tools/assets",
25+
"patches",
26+
"types",
27+
".editorconfig",
28+
".npmrc",
29+
"tailwind.config.js",
30+
"tsconfig.json",
31+
"webpack.config.js"
32+
],
33+
"keywords": [
34+
"nativescript",
35+
"mobile",
36+
"{N}",
37+
"solid",
38+
"solidjs"
39+
],
40+
"scripts": {},
41+
"dependencies": {
42+
"@nativescript-community/solid-js": "^0.0.6",
43+
"@nativescript/core": "~8.7.0",
44+
"dominative": "^0.1.3",
45+
"solid-js": "^1.8.16",
46+
"undom-ng": "^1.1.2"
47+
},
48+
"devDependencies": {
49+
"@babel/core": "^7.24.4",
50+
"@babel/preset-env": "^7.24.4",
51+
"@babel/preset-typescript": "^7.24.1",
52+
"@nativescript/tailwind": "~2.1.0",
53+
"@nativescript/webpack": "~5.0.0",
54+
"babel": "^6.23.0",
55+
"babel-loader": "^9.1.3",
56+
"babel-preset-solid": "^1.8.8",
57+
"solid-refresh": "^0.7.5",
58+
"tailwindcss": "~3.4.3"
59+
}
60+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
4+
5+
.h-center {
6+
/* {N} specific css */
7+
horizontal-align: center;
8+
}
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { Application } from '@nativescript/core';
2+
import { render } from '@nativescript-community/solid-js';
3+
4+
import { App } from './app.jsx';
5+
6+
document.body.actionBarHidden = false;
7+
render(App, document.body);
8+
9+
const create = () => document;
10+
11+
Application.run({ create });
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { createSignal } from 'solid-js';
2+
import { Component } from './component.jsx';
3+
4+
document.body.actionBarHidden = false;
5+
6+
const App = () => {
7+
const [count, setCount] = createSignal(0);
8+
const increment = () => {
9+
setCount((c) => c + 1);
10+
};
11+
return (
12+
<>
13+
<actionbar title="Hello, SolidJS!"></actionbar>
14+
<stacklayout>
15+
<label class="text-center text-2xl my-4">
16+
You have tapped {count()} time{count() === 1 ? '' : 's'}
17+
</label>
18+
{
19+
// use 'on:___' instead of 'on___' for event handlers
20+
// See https://github.com/SudoMaker/dominative-solid#event-handling for detail
21+
}
22+
<button
23+
class="rounded-full bg-blue-500 text-white text-xl p-2 w-[300]"
24+
on:tap={increment}
25+
>
26+
Tap me!
27+
</button>
28+
<Component count={count} />
29+
</stacklayout>
30+
</>
31+
);
32+
};
33+
34+
export { App };
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
export const Component = (props) => {
2+
const { count } = props;
3+
return (
4+
<label
5+
text={`${count()} tap${count() === 1 ? '' : 's'}`}
6+
on:tap={() => {
7+
alert(`You have tapped ${count()} time${count() === 1 ? '' : 's'}`);
8+
}}
9+
class="text-center text-2xl my-6 text-green-500"
10+
/>
11+
);
12+
};
13+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/** @type {import('tailwindcss').Config} */
2+
module.exports = {
3+
content: ['./src/**/*.{css,xml,html,vue,svelte,ts,tsx,jsx}'],
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+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const webpack = require('@nativescript/webpack');
2+
3+
module.exports = (env) => {
4+
webpack.init(env);
5+
6+
return webpack.resolveConfig();
7+
};

packages/template-blank-svelte/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ns create my-blank-svelte --template @nativescript/template-blank-svelte
1010

1111
> Note: This command will create a new NativeScript app that uses the latest version of this template published to [npm](https://www.npmjs.com/package/@nativescript/template-blank-svelte).
1212
13-
If you want to create a new app that uses the source of the template from the `master` branch, you can execute the following:
13+
If you want to create a new app that uses the source of the template from the `main` branch, you can execute the following:
1414

1515
```
1616
# clone nativescript-app-templates monorepo locally
@@ -20,7 +20,7 @@ git clone [email protected]:NativeScript/nativescript-app-templates.git
2020
ns create my-blank-svelte --template nativescript-app-templates/packages/template-blank-svelte
2121
```
2222

23-
**NB:** Please, have in mind that the master branch may refer to dependencies that are not on NPM yet!
23+
**NB:** Please, have in mind that the main branch may refer to dependencies that are not on NPM yet!
2424

2525
## Get Help
2626
The NativeScript framework has a vibrant community that can help when you run into problems.

packages/template-blank-ts/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ns create my-blank-ts --template @nativescript/template-blank-ts
1010

1111
> Note: This command will create a new NativeScript app that uses the latest version of this template published to [npm](https://www.npmjs.com/package/@nativescript/template-blank-ts).
1212
13-
If you want to create a new app that uses the source of the template from the `master` branch, you can execute the following:
13+
If you want to create a new app that uses the source of the template from the `main` branch, you can execute the following:
1414

1515
```
1616
# clone nativescript-app-templates monorepo locally
@@ -20,7 +20,7 @@ git clone [email protected]:NativeScript/nativescript-app-templates.git
2020
ns create my-blank-ts --template nativescript-app-templates/packages/template-blank-ts
2121
```
2222

23-
**NB:** Please, have in mind that the master branch may refer to dependencies that are not on NPM yet!
23+
**NB:** Please, have in mind that the main branch may refer to dependencies that are not on NPM yet!
2424

2525
## Walkthrough
2626

packages/template-blank-vue-ts/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ns create my-blank-vue-ts --template @nativescript/template-blank-vue-ts
1010

1111
> Note: This command will create a new NativeScript app that uses the latest version of this template published to [npm](https://www.npmjs.com/package/@nativescript/template-blank-vue-ts).
1212
13-
If you want to create a new app that uses the source of the template from the `master` branch, you can execute the following:
13+
If you want to create a new app that uses the source of the template from the `main` branch, you can execute the following:
1414

1515
```
1616
# clone nativescript-app-templates monorepo locally
@@ -20,7 +20,7 @@ git clone [email protected]:NativeScript/nativescript-app-templates.git
2020
ns create my-blank-vue-ts --template nativescript-app-templates/packages/template-blank-vue-ts
2121
```
2222

23-
**NB:** Please, have in mind that the master branch may refer to dependencies that are not on NPM yet!
23+
**NB:** Please, have in mind that the main branch may refer to dependencies that are not on NPM yet!
2424

2525
## Walkthrough
2626

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
],
4040
"dependencies": {
4141
"@nativescript/core": "~8.7.0",
42-
"nativescript-vue": "3.0.0-beta.9"
42+
"nativescript-vue": "rc"
4343
},
4444
"devDependencies": {
4545
"@nativescript/tailwind": "^2.1.0",

packages/template-blank-vue/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ns create my-blank-vue --template @nativescript/template-blank-vue
1010

1111
> Note: This command will create a new NativeScript app that uses the latest version of this template published to [npm](https://www.npmjs.com/package/@nativescript/template-blank-vue).
1212
13-
If you want to create a new app that uses the source of the template from the `master` branch, you can execute the following:
13+
If you want to create a new app that uses the source of the template from the `main` branch, you can execute the following:
1414

1515
```
1616
# clone nativescript-app-templates monorepo locally
@@ -20,7 +20,7 @@ git clone [email protected]:NativeScript/nativescript-app-templates.git
2020
ns create my-blank-vue --template nativescript-app-templates/packages/template-blank-vue
2121
```
2222

23-
**NB:** Please, have in mind that the master branch may refer to dependencies that are not on NPM yet!
23+
**NB:** Please, have in mind that the main branch may refer to dependencies that are not on NPM yet!
2424

2525
## Walkthrough
2626

packages/template-blank/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ns create my-blank-js --template @nativescript/template-blank
1010

1111
> Note: This command will create a new NativeScript app that uses the latest version of this template published to [npm](https://www.npmjs.com/package/@nativescript/template-blank).
1212
13-
If you want to create a new app that uses the source of the template from the `master` branch, you can execute the following:
13+
If you want to create a new app that uses the source of the template from the `main` branch, you can execute the following:
1414

1515
```
1616
# clone nativescript-app-templates monorepo locally
@@ -20,7 +20,7 @@ git clone [email protected]:NativeScript/nativescript-app-templates.git
2020
ns create my-blank-js --template nativescript-app-templates/packages/template-blank
2121
```
2222

23-
**NB:** Please, have in mind that the master branch may refer to dependencies that are not on NPM yet!
23+
**NB:** Please, have in mind that the main branch may refer to dependencies that are not on NPM yet!
2424

2525
## Walkthrough
2626

0 commit comments

Comments
 (0)