Skip to content

Commit

Permalink
add different configs for building
Browse files Browse the repository at this point in the history
  • Loading branch information
dzencot committed Feb 25, 2024
1 parent 81bc8a8 commit 064e0bb
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
run: npm run build-app
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
Expand All @@ -48,4 +48,4 @@ jobs:
path: './dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v2
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Run tests
run: make test
- name: Run build
run: make build
run: make build-lib
- name: Publish
run: |
npm config set //registry.npmjs.org/:_authToken ${{ secrets.npmjs_com }}
Expand Down
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ install:
start:
npm run dev

build:
npm run build
build-lib:
npm run build-lib

lint:
npm run lint
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"name": "@hexlet/chatbot-v2",
"version": "0.2.0",
"version": "0.2.1",
"type": "module",
"homepage": "https://hexlet.github.io/react-flowbot-ui-kit/",
"files": [
"dist"
"dist",
"src"
],
"main": "./dist/hexlet-flowbot.umd.cjs",
"module": "./dist/hexlet-flowbot.js",
Expand All @@ -19,10 +20,10 @@
},
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"build-app": "tsc && vite build --config vite.config.app.ts",
"build-lib": "tsc && vite build --config vite.config.lib.ts",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"predeploy": "npm run build",
"deploy": "gh-pages -d build"
},
"dependencies": {
Expand Down
9 changes: 9 additions & 0 deletions vite.config.app.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react';

// for deploying on github pages

export default defineConfig({
plugins: [react()],
base: '/react-flowbot-ui-kit/'
})
9 changes: 1 addition & 8 deletions vite.config.ts → vite.config.lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,4 @@ export default defineConfig({
},
},
},
})

// for deploying on github pages

// export default defineConfig({
// plugins: [react()],
// base: '/react-flowbot-ui-kit/'
// })
});

0 comments on commit 064e0bb

Please sign in to comment.