8000 chore: set up repo dev tools (prettier, commitlint, husky, ...) · zdccool/nativescript-vue@fda7405 · GitHub
[go: up one dir, main page]

Skip to content

Commit fda7405

Browse files
heywhyrigor789
authored andcommitted
chore: set up repo dev tools (prettier, commitlint, husky, ...)
1 parent f171c05 commit fda7405

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+4629
-12223
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
indent_style = space
8+
indent_size = 2
9+
end_of_line = lf
10+
charset = utf-8
11+
trim_trailing_whitespace = true
12+
insert_final_newline = true

.husky/commit-msg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
echo "\n---- Commit Lint ----\n";
5+
npx --no-install commitlint --edit "$1"

.husky/pre-commit

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
echo "\n---- Lint Staged ----\n";
5+
npx --no-install lint-staged --config=package.json

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
demo/hooks
2+
demo/platforms
3+
demo/App_Resources
4+
dist/

.vscode/settings.json

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
{
2-
"files.exclude": {
3-
"**/.git": true,
4-
"**/.svn": true,
5-
"**/.hg": true,
6-
"**/CVS": true,
7-
"**/.DS_Store": true,
8-
"**/Thumbs.db": true,
9-
"**/*.js": {
10-
"when": "$(basename).ts"
11-
},
12-
"**/*.map": true,
13-
"**/.idea": false,
14-
"**/.tscache": true,
15-
"**/node_modules": false
2+
"files.exclude": {
3+
"**/.git": true,
4+
"**/.svn": true,
5+
"**/.hg": true,
6+
"**/CVS": true,
7+
"**/.DS_Store": true,
8+
"**/Thumbs.db": true,
9+
"**/*.js": {
10+
"when": "$(basename).ts"
1611
},
12+
"**/*.map": true,
13+
"**/.idea": false,
14+
"**/.tscache": true,
15+
"**/node_modules": false
16+
},
1717

18-
"html.customData": [
19-
"./test.json"
20-
]
21-
}
18+
"html.customData": ["./test.json"]
19+
}

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
<h1 align="center">NativeScript-Vue3 Beta</h1>
66

7-
87
<p align="center">
98
<a href="https://www.npmjs.com/package/nativescript-vue">
109
<img src="https://img.shields.io/npm/v/nativescript-vue/beta.svg" alt="npm">
@@ -14,7 +13,6 @@
1413
</a>
1514
</p>
1615

17-
1816
NativeScript-Vue with Vue3 support now in beta!
1917

2018
## Quick start
@@ -38,7 +36,6 @@ If you encounter any issues, please open a new issue with as much detail as poss
3836

3937
- [Join Discord](https://nativescript.org/discord)
4038

41-
4239
## Looking for V2?
4340

4441
The V2 version has been moved to the [v2 branch](https://github.com/nativescript-vue/nativescript-vue/tree/v2)

build.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import path from "path";
2-
import { fileURLToPath } from "url";
3-
import { build } from "esbuild";
1+
import path from 'path';
2+
import { fileURLToPath } from 'url';
3+
import { build } from 'esbuild';
44

55
const __filename = fileURLToPath(import.meta.url);
66
const __dirname = path.dirname(__filename);
@@ -9,17 +9,17 @@ try {
99
await build({
1010
bundle: true,
1111
sourcemap: true,
12-
format: "cjs",
12+
format: 'cjs',
1313
// target: "node",
14-
external: ["@nativescript/core"],
15-
entryPoints: [path.join(__dirname, "src", "index.ts")],
16-
outdir: path.join(__dirname, "dist"),
14+
external: ['@nativescript/core'],
15+
entryPoints: [path.join(__dirname, 'src', 'index.ts')],
16+
outdir: path.join(__dirname, 'dist'),
1717
// outExtension: { ".js": ".mjs" },
1818
define: {
1919
__VUE_OPTIONS_API__: true,
20-
__VUE_PROD_DEVTOOLS__: true
21-
}
20+
__VUE_PROD_DEVTOOLS__: true,
21+
},
2222
});
2323
} catch {
2424
process.exitCode = 1;
25-
}
25+
}

commitlint.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional'],
3+
};

demo/App_Resources/iOS/Podfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1+
platform :ios, '13.0'
2+
13
pod 'FPSCounter', '~> 4.1'
4+
5+
post_install do |installer|
6+
installer.pods_project.targets.each do |target|
7+
target.build_configurations.each do |config|
8+
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
9+
end
10+
end
11+
end

demo/App_Resources/iOS/build.xcconfig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
// You can add custom settings here
22
// for example you can uncomment the following line to force distribution code signing
3-
// CODE_SIGN_IDENTITY = iPhone Distribution
3+
// CODE_SIGN_IDENTITY = iPhone Distribution
44
// To build for device with XCode you need to specify your development team.
55
// DEVELOPMENT_TEAM = YOUR_TEAM_ID;
66
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
77

88
DEVELOPMENT_TEAM = 3462C7DLZZ
9+
10+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;

0 commit comments

Comments
 (0)
0