Skip to content

Commit 6b9d8ae

Browse files
Chrystiam Nascimento JuniorChrystiam Nascimento Junior
authored andcommitted
feat(Vite): Adjust project to build with vite
1 parent 01a3b18 commit 6b9d8ae

File tree

4 files changed

+19
-11
lines changed

4 files changed

+19
-11
lines changed

package.json

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,6 @@
88
"module": "./dist/react-native-ui-datepicker.js",
99
"react-native": "./dist/react-native-ui-datepicker.js",
1010
"source": "src/index",
11-
"files": [
12-
"src",
13-
"dist",
14-
"!**/__tests__",
15-
"!**/__fixtures__",
16-
"!**/__mocks__",
17-
"!**/.*"
18-
],
1911
"scripts": {
2012
"cm": "git cz",
2113
"test": "jest",
@@ -160,10 +152,21 @@
160152
"@semantic-release/commit-analyzer",
161153
"@semantic-release/release-notes-generator",
162154
"@semantic-release/changelog",
163-
"@semantic-release/npm",
155+
[
156+
"@semantic-release/npm",
157+
{
158+
"pkgRoot": "dist"
159+
}
160+
],
164161
[
165162
"@semantic-release/git",
166163
{
164+
"assets": [
165+
"CHANGELOG.md",
166+
"package.json",
167+
"package-lock.json",
168+
"dist/**/*.{js,cjs,mjs,png}"
169+
],
167170
"message": "build(release): v${nextRelease.version} [release]"
168171
}
169172
],

tsconfig.build.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"extends": "./tsconfig.json",
33
"exclude": [
4-
"dist",
54
"node_modules",
65
"**/__tests__/*",
76
"**/__mocks__/*"

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"compilerOptions": {
33
"baseUrl": "./",
4+
"outDir": "./dist",
45
"paths": {
56
"react-native-ui-datepicker": ["./src/index"]
67
},

vite.config.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@ export default defineConfig({
88
plugins: [
99
react(),
1010
viteStaticCopy({
11-
targets: [{ src: './src/assets', dest: './' }],
11+
targets: [
12+
{ src: './src/assets', dest: './' },
13+
{ src: './package.json', dest: './' },
14+
{ src: './README.md', dest: './' },
15+
{ src: './CHANGELOG.md', dest: './' },
16+
],
1217
}),
1318
],
1419
build: {

0 commit comments

Comments
 (0)