Skip to content

Commit

Permalink
Merge branch 'develop' into dependabot/npm_and_yarn/minimist-1.2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
pverscha committed Jan 8, 2024
2 parents ed2800c + 8437342 commit ee989c1
Show file tree
Hide file tree
Showing 117 changed files with 31,340 additions and 45,121 deletions.
3 changes: 3 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
> 1%
last 2 versions
not dead
32 changes: 17 additions & 15 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
module.exports = {
root: true,
env: {
"node": true,
"browser": true,
node: true,
},
"extends": [
"plugin:vue/essential",
"eslint:recommended",
"@vue/typescript",
"@vue/typescript/recommended",
],
parserOptions: {
ecmaVersion: 2020,
},
rules: {
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
"quotes": ["error", "double"],
"indent": ["error", 4],
"max-len": ["warn", { "code": 120 }],
"object-curly-spacing": ["error", "always"],
"quotes": ["error", "double"],
"space-before-function-paren": ["error", "never"],
"no-inner-declarations": "off",
"brace-style": ["error", "1tbs"],
"keyword-spacing": "error",
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-async-promise-executor": "off",
"no-undef": "off",
"require-atomic-updates": "off",
},
parserOptions: {
"parser": "@typescript-eslint/parser",
"ecmaVersion": 6,
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-inferrable-types": "warn",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "off",
"vue/no-unused-vars": "off",
"vue/valid-v-slot": "off",
},
};
8 changes: 5 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ jobs:
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Yarn
run: npm install --global yarn
- name: Install dependencies
run: npm install
run: yarn install
- name: Install ESLint CLI
run: npm i -g eslint
run: yarn global add eslint
- name: Run ESLint
run: eslint "src/**/*.ts" "src/**/*.vue"
6 changes: 4 additions & 2 deletions .github/workflows/publish_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 16
- name: Install Yarn
run: npm install --global yarn
- name: Install dependencies
run: npm install
run: yarn install
- name: Build application for ${{ matrix.os }}
run: npm run electron:publish
run: yarn run electron:publish
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
19 changes: 11 additions & 8 deletions .github/workflows/publish_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 16
- name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
github_token: ${{ secrets.GH_TOKEN }}
use_vue_cli: true
mac_certs: ${{ secrets.mac_certs }}
mac_certs_password: ${{ secrets.mac_certs_password }}
release: true
- name: Install Yarn
run: npm install --global yarn
- name: Install dependencies
run: yarn install
- name: Build application for ${{ matrix.os }}
run: yarn run electron:publish
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
CSC_IDENTITY_AUTO_DISCOVERY: true
CSC_LINK: ${{ secrets.mac_certs }}
CSC_KEY_PASSWORD: ${{ secrets.mac_certs_password }}
APPLEID: ${{ secrets.APPLEID }}
APPLEIDPASS: ${{ secrets.APPLEIDPASS }}
APPLETEAMID: ${{ secrets.APPLETEAMID }}
10 changes: 6 additions & 4 deletions .github/workflows/publish_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-node@v2
with:
node-version: 16
- name: Install packages
run: npm install
node-version: 16.14.2
- name: Install Yarn
run: npm install --global yarn
- name: Install dependencies
run: yarn install
- name: Build application for ${{ matrix.os }}
run: npm run electron:publish
run: yarn run electron:publish
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
CSC_LINK: ${{ secrets.windows_certs }}
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
.env
.DS_Store
node_modules
/dist


# local env files
.env.local
.env.*.local
.env

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Editor directories and files
.idea
Expand All @@ -23,4 +25,3 @@ yarn-error.log*

#Electron-builder output
/dist_electron
yarn.lock
34 changes: 24 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
# Unipept Desktop
This is the Unipept Desktop project. This application is a part of the [Unipept ecosystem](https://unipept.ugent.be) and aims at large-throughput metaproteomics data analysis.

## Run the application
1. Clone this repository.
2. Navigate to the repository's directory
3. Run `npm install` to install all dependencies.
4. Run `npm run postinstall` to rebuild native dependencies for node version of the Electron app.
5. Run `npx patch-package` to apply changes made to node modules in order to fix build issues.
6. Run `npm run electron:serve` to run the desktop application itself.
# electron-test

## Project setup
```
npm install
```

### Compiles and hot-reloads for development
```
npm run serve
```

### Compiles and minifies for production
```
npm run build
```

### Lints and fixes files
```
npm run lint
```

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
8 changes: 1 addition & 7 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
module.exports = {
presets: [
'@vue/app'
],
// These can be removed once we are using Webpack 5
// See: https://github.com/webpack/webpack/issues/10227
plugins: [
'@babel/plugin-proposal-optional-chaining',
'@babel/plugin-proposal-nullish-coalescing-operator'
'@vue/cli-plugin-babel/preset'
]
}
Binary file modified build/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 32 additions & 30 deletions link_with_web_components_watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,56 +6,58 @@
* The package Chokidar is required to run this file.
*/

const chokidar = require('chokidar');
const fs = require('fs');
const path = require('path');
const chokidar = require("chokidar");
const fs = require("fs");
const path = require("path");

const distDirectory = './../unipept-web-components/dist'
const typesDirectory = './../unipept-web-components/types';
const distDirectory = "./../unipept-web-components/dist";
const typesDirectory = "./../unipept-web-components/types";

const errHandler = function(err) {
const errHandler = function (err) {
if (err) {
console.error(err);
}
}
};

console.log("Watching file system for changes...");

// Watch for changes to the web components directory.
chokidar.watch(distDirectory).on('all', (event, currentPath) => {
if (!currentPath.includes('/node_modules') && !currentPath.includes('/.git')) {
const filteredPath = currentPath.replace('../unipept-web-components', './node_modules/unipept-web-components');
const directory = path.dirname(filteredPath);
switch(event) {
case 'add':
fs.mkdirSync(directory, { recursive: true }, errHandler);
chokidar.watch(distDirectory)
.on("all", (event, currentPath) => {
if (!currentPath.includes("/node_modules") && !currentPath.includes("/.git")) {
const filteredPath = currentPath.replace("../unipept-web-components", "./node_modules/unipept-web-components");
const directory = path.dirname(filteredPath);
switch (event) {
case "add":
fs.mkdirSync(directory, {recursive: true}, errHandler);
fs.copyFile(currentPath, filteredPath, errHandler);
break;
case 'change':
case "change":
fs.copyFile(currentPath, filteredPath, errHandler);
break;
case 'unlink':
case "unlink":
fs.unlink(filteredPath, errHandler);
break;
}
console.log(event, currentPath);
}
console.log(event, currentPath);
}
});
});

chokidar.watch(typesDirectory).on('all', (event, currentPath) => {
const filteredPath = currentPath.replace('../unipept-web-components', './node_modules/unipept-web-components');
const directory = path.dirname(filteredPath);
switch(event) {
case 'add':
fs.mkdirSync(directory, { recursive: true }, errHandler);
chokidar.watch(typesDirectory)
.on("all", (event, currentPath) => {
const filteredPath = currentPath.replace("../unipept-web-components", "./node_modules/unipept-web-components");
const directory = path.dirname(filteredPath);
switch (event) {
case "add":
fs.mkdirSync(directory, {recursive: true}, errHandler);
fs.copyFile(currentPath, filteredPath, errHandler);
break;
case 'change':
case "change":
fs.copyFile(currentPath, filteredPath, errHandler);
break;
case 'unlink':
case "unlink":
fs.unlink(filteredPath, errHandler);
break;
}
console.log(event, currentPath);
});
}
console.log(event, currentPath);
});
Loading

0 comments on commit ee989c1

Please sign in to comment.