Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OHRM5X-959: Vite migration #670

Merged
merged 30 commits into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4044731
OHRM5X-959: Vite migration init
Jan 9, 2023
010ac7d
OHRM5X-959: Fix storybook static assets issue
Jan 10, 2023
2178179
OHRM5X-959: Vite migration move components
Jan 10, 2023
1a9b45e
OHRM5X-959: Vite migration move components
Jan 11, 2023
f952496
OHRM5X-959: Update workflow commands, lint fixes
Jan 12, 2023
06c6b47
OHRM5X-959: Initiate build process
Jan 12, 2023
1a0d400
OHRM5X-959: Improve build process
Jan 13, 2023
0c110bf
OHRM5X-959: Type check workflow file added
Jan 16, 2023
cf7ad87
OHRM5X-959: Remove peer dependencies from package.json
Jan 16, 2023
e7796d8
OHRM5X-959: Move static files to public directory
Jan 18, 2023
68c51a5
OHRM5X-959: Fix date-fns locale type errors
Jan 18, 2023
0f61eb2
OHRM5X-1988: Vite css bundle size issue fixes, fonts moved to public dir
Jan 23, 2023
870d5d0
OHRM5X-1988: Collect scss files plugin created
Jan 23, 2023
ac0fbee
OHRM5X-1988: Collect scss files plugin improvements, fix scss issues
Jan 25, 2023
d78ce05
OHRM5X-1988: Update publish workflow
Jan 25, 2023
237ac06
OHRM5X-1988: Update publish workflow
Jan 25, 2023
6f71058
OHRM5X-1988: Bump version to 2.0.0-alpha.2
Jan 26, 2023
e2ab69c
OHRM5X-1988: Remove version check action in publish workflow
Jan 26, 2023
ac2b547
OHRM5X-1988: Fix vue warning messages
Jan 26, 2023
aa52ad6
OHRM5X-1988: Update publish workflow
Jan 27, 2023
e8071f2
OHRM5X-1988: Fix type errors
Jan 27, 2023
21716dd
OHRM5X-1988: Fix OXD file input upload error
Jan 27, 2023
53be254
OHRM5X-1988: Replace sass vars to css vars in lib build
Feb 1, 2023
f327ce7
OHRM5X-1988: Fix report table build issue and story changes
Feb 2, 2023
68b7fb8
OHRM5X-1988: Fix css color variable typos
Feb 7, 2023
2de45be
OHRM5X-1988: Bump version to 2.0.0-alpha.6
Feb 7, 2023
fd2d09e
OHRM5X-1988: Update layout story
Feb 8, 2023
c337d23
OHRM5X-1988: Bump version to 2.0.0-alpha.7
Feb 8, 2023
4e362af
OHRM5X-1988: Third party licence file added
Feb 10, 2023
4883e40
OHRM5X-1988: Disable publish workflow
Feb 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 20 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution');

module.exports = {
root: true,
extends: [
'plugin:vue/vue3-recommended',
'plugin:vue/vue3-strongly-recommended',
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-typescript',
'@vue/eslint-config-prettier',
],
parserOptions: {
ecmaVersion: 'latest',
},
rules: {
'vue/multi-word-component-names': 'off',
},
};
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
- name: Install npm dependencies
run: yarn install
- name: Lint
run: yarn workspace oxd-components lint
run: yarn lint
22 changes: 16 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ on:

jobs:
publish:
if: github.repository == 'orangehrm/oxd'
if: false
#if: github.repository == 'orangehrm/oxd'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -21,8 +22,7 @@ jobs:
run: |
set -x
npm -v
cd scripts
current_version=$(node ./current-version.js)
current_version=$(npm pkg get version | sed 's/"//g')
fetched_current_version=$(npm show @ohrm/oxd@$current_version version) || fetched_current_version=''
echo "current_version=$current_version" >> $GITHUB_ENV
echo "fetched_current_version=$fetched_current_version" >> $GITHUB_ENV
Expand Down Expand Up @@ -50,13 +50,23 @@ jobs:
- name: Build
if: ${{ env.fetched_current_version == '' }}
run: |
cd scripts
node ./build.js
yarn install
yarn build:oxd
cp LICENSE dist/LICENSE
cp README.md dist/README.md
cp THIRD-PARTY-LICENSE dist/THIRD-PARTY-LICENSE
(cat package.json | jq '.peerDependencies += {"vue": "3.x"}' | jq 'del(.private, .scripts, .dependencies.vue, .devDependencies)') > dist/package.json

- name: Upload build files
uses: actions/upload-artifact@v3
with:
name: oxd-build
path: dist

- name: Publish
if: ${{ env.fetched_current_version == '' }}
run: |
cd build
cd dist
npm publish --tag dev
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
- name: Install npm dependencies
run: yarn install
- name: Build Storybook
run: yarn workspace oxd-storybook build
run: yarn build:storybook
26 changes: 26 additions & 0 deletions .github/workflows/type-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Type Check

on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop

jobs:
check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: Install npm dependencies
run: yarn install
- name: Type check
run: yarn type-check
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
run: yarn install

- name: Unit tests
run: yarn workspace oxd-components test:unit --coverage
run: yarn test:unit --coverage

- name: Upload jest coverage
uses: actions/upload-artifact@v3
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,10 @@ pnpm-debug.log*
*.njsproj
*.sln
*.sw?

# Coverage report
src/coverage/*

# Build
dist/
tsconfig.build.tsbuildinfo
25 changes: 25 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const path = require('path');
module.exports = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
],
framework: {
name: '@storybook/vue3-vite',
options: {},
},
docs: {
autodocs: 'tag',
},
async viteFinal(config) {
config.resolve.alias = {
...config.resolve.alias,
'@': path.resolve(__dirname, '../src'),
};

return config;
},
staticDirs: ['../public'],
};
File renamed without changes.
2 changes: 1 addition & 1 deletion storybook/.storybook/manager.js → .storybook/manager.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {version} from '../package.json';
import {addons} from '@storybook/addons';
import {create} from '@storybook/theming';
import {version} from '../../package.json';

const orangehrmTheme = create({
base: 'light',
Expand Down
5 changes: 5 additions & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<link rel="stylesheet" href="fonts.css" />
<link rel="stylesheet" href="icons.css" />
<script>
window.global = window;
</script>
6 changes: 6 additions & 0 deletions storybook/.storybook/preview.js → .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,10 @@ export const parameters = {
...customViewports,
},
},
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
};
510 changes: 263 additions & 247 deletions .yarn/releases/yarn-3.3.0.cjs → .yarn/releases/yarn-3.3.1.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-3.3.0.cjs
yarnPath: .yarn/releases/yarn-3.3.1.cjs
17 changes: 17 additions & 0 deletions THIRD-PARTY-LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Third Party Licenses
====================

This project includes material from the projects listed below.
The original copyright notice and the license under which we received
such Third Party IP, are set forth below.

- Bootstrap Icons (https://github.com/twbs/icons)
Copyright (c) 2019-2021 The Bootstrap Authors
The MIT License, https://opensource.org/licenses/MIT

- Nunito Font (https://github.com/googlefonts/NunitoSans)
Copyright (c) Vernon Adams <[email protected]>
Jacques Le Bailly <[email protected]>
Manvel Shmavonyan <[email protected]>
Alexei Vanyashin <[email protected]>
SIL OPEN FONT LICENSE, https://opensource.org/licenses/OFL-1.1
4 changes: 0 additions & 4 deletions components/.browserslistrc

This file was deleted.

38 changes: 0 additions & 38 deletions components/.eslintrc.js

This file was deleted.

24 changes: 0 additions & 24 deletions components/.gitignore

This file was deleted.

15 changes: 0 additions & 15 deletions components/babel.config.js

This file was deleted.

8 changes: 0 additions & 8 deletions components/jest.config.js

This file was deleted.

44 changes: 0 additions & 44 deletions components/package.json

This file was deleted.

This file was deleted.

Loading