Skip to content

Commit

Permalink
Merge pull request #280 from sanger/develop
Browse files Browse the repository at this point in the history
DPL-890-2 Replace webpack with vite(to merge develop into master)
  • Loading branch information
Sangeetha-Bheeman authored Dec 5, 2023
2 parents c3bf0b8 + 344d4b4 commit 1ef8f57
Show file tree
Hide file tree
Showing 44 changed files with 11,515 additions and 21,157 deletions.
8 changes: 4 additions & 4 deletions .env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NODE_ENV=development
VUE_APP_SEQUENCESCAPE_BASE_URL=http://localhost:3000/api/v2
VUE_APP_SEQUENCESCAPE_API_KEY=development
VUE_APP_PRINT_MY_BARCODE_BASE_URL=http://localhost:3000
VUE_APP_LABEL_TEMPLATE_ID=33
VITE_SEQUENCESCAPE_BASE_URL=http://localhost:3000/api/v2
VITE_SEQUENCESCAPE_API_KEY=development
VITE_PRINT_MY_BARCODE_BASE_URL=http://localhost:3000
VITE_LABEL_TEMPLATE_ID=33
8 changes: 4 additions & 4 deletions .env.production
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VUE_APP_SEQUENCESCAPE_BASE_URL=REPLACE_VUE_APP_SEQUENCESCAPE_BASE_URL
VUE_APP_SEQUENCESCAPE_API_KEY=REPLACE_VUE_APP_SEQUENCESCAPE_API_KEY
VUE_APP_PRINT_MY_BARCODE_BASE_URL=REPLACE_VUE_APP_PRINT_MY_BARCODE_BASE_URL
VUE_APP_LABEL_TEMPLATE_ID=REPLACE_VUE_APP_LABEL_TEMPLATE_ID
VITE_SEQUENCESCAPE_BASE_URL=REPLACE_VITE_SEQUENCESCAPE_BASE_URL
VITE_SEQUENCESCAPE_API_KEY=REPLACE_VITE_SEQUENCESCAPE_API_KEY
VITE_PRINT_MY_BARCODE_BASE_URL=REPLACE_VITE_PRINT_MY_BARCODE_BASE_URL
VITE_LABEL_TEMPLATE_ID=REPLACE_VITE_LABEL_TEMPLATE_ID
8 changes: 4 additions & 4 deletions .env.uat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VUE_APP_SEQUENCESCAPE_BASE_URL=REPLACE_VUE_APP_SEQUENCESCAPE_BASE_URL
VUE_APP_SEQUENCESCAPE_API_KEY=REPLACE_VUE_APP_SEQUENCESCAPE_API_KEY
VUE_APP_PRINT_MY_BARCODE_BASE_URL=REPLACE_VUE_APP_PRINT_MY_BARCODE_BASE_URL
VUE_APP_LABEL_TEMPLATE_ID=REPLACE_VUE_APP_LABEL_TEMPLATE_ID
VITE_SEQUENCESCAPE_BASE_URL=REPLACE_VITE_SEQUENCESCAPE_BASE_URL
VITE_SEQUENCESCAPE_API_KEY=REPLACE_VITE_SEQUENCESCAPE_API_KEY
VITE_PRINT_MY_BARCODE_BASE_URL=REPLACE_VITE_PRINT_MY_BARCODE_BASE_URL
VITE_LABEL_TEMPLATE_ID=REPLACE_VITE_LABEL_TEMPLATE_ID
11 changes: 7 additions & 4 deletions .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@ module.exports = {
env: {
node: true,
},
extends: ['plugin:vue/essential', 'eslint:recommended', 'prettier'],
extends: [
'plugin:vue/essential',
'plugin:vue/recommended',
'eslint:recommended',
'prettier', // make sure this plugin is last since it turns conflicting rules off
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'prefer-const': 'error',
'vue/multi-word-component-names': 'off',
},
parserOptions: {
parser: 'babel-eslint',
'vue/require-prop-types': 0,
},
}
6 changes: 3 additions & 3 deletions .github/workflows/js_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ jobs:
- name: Cypress run
uses: cypress-io/github-action@v5
with:
start: npm run serve --legacy-peer-deps
wait-on: http://localhost:8080/
start: npm run serve
wait-on: http://localhost:3000/
spec: 'tests/e2e/**/*'
config-file: cypress.config.js
config-file: cypress.config.cjs
config: video=false
install: false
timeout-minutes: 5
Expand Down
11 changes: 11 additions & 0 deletions babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
presets: ['@babel/preset-env'],
plugins: [
[
'babel-plugin-transform-vite-meta-env',
{
include: ['VITE_LABEL_TEMPLATE_ID'],
},
],
],
}
3 changes: 0 additions & 3 deletions babel.config.js

This file was deleted.

2 changes: 1 addition & 1 deletion compile-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
set -ev

# Building assets
npm run build -- --dest $2/public --report
npm run build

# Storing revision hash
git rev-parse HEAD > $2/REVISION
Expand Down
2 changes: 1 addition & 1 deletion cypress.config.js → cypress.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = defineConfig({
setupNodeEvents(on, config) {},
specPattern: 'tests/e2e/specs/**/*.{js,jsx,ts,tsx}',
supportFile: 'tests/e2e/support/index.js',
baseUrl: 'http://localhost:8080/',
baseUrl: 'http://localhost:3000/',
experimentalRunAllSpecs: true,
},
})
File renamed without changes.
4 changes: 2 additions & 2 deletions public/index.html → index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<link rel="icon" href="/favicon.ico" />
<title>quanthub</title>
</head>
<body>
Expand All @@ -15,6 +15,6 @@
>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
<script type="module" src="/src/main.js"></script>
</body>
</html>
18 changes: 18 additions & 0 deletions jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
roots: ['src/', 'tests/'],
moduleFileExtensions: ['js', 'json', 'vue'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'^@tests/(.*)$': '<rootDir>/tests/$1',
},
modulePaths: ['<rootDir>/tests/support/'],
transform: {
'\\.[jt]sx?$': 'babel-jest',
'^.+\\.(vue)$': '@vue/vue2-jest',
},
transformIgnorePatterns: ['/!node_modules\\/lodash-es/'],
testEnvironmentOptions: {
url: 'http://localhost/',
},
testEnvironment: 'jsdom',
}
17 changes: 0 additions & 17 deletions jest.config.js

This file was deleted.

Loading

0 comments on commit 1ef8f57

Please sign in to comment.