Skip to content

Commit 2add933

Browse files
committed
- Upgraded to Vite
- Improved README - Updated various npm libraries - Removed obsolete npm libraries - Added beautifying
1 parent 22b4d90 commit 2add933

35 files changed

+5326
-18111
lines changed

.eslintrc.js

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,18 @@
11
module.exports = {
22
root: true,
33
env: {
4-
node: true
4+
node: true,
5+
es2022: true,
56
},
67
rules: {
78
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
89
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
9-
"indent": [
10-
"error",
11-
4
12-
],
13-
"linebreak-style": [
14-
"error",
15-
"unix"
16-
],
17-
"quotes": [
18-
"error",
19-
"double"
20-
],
21-
"semi": [
22-
"error",
23-
"always"
24-
]
10+
indent: ["error", 4],
11+
"linebreak-style": ["error", "unix"],
12+
quotes: ["error", "double"],
13+
semi: ["error", "always"],
14+
"vue/multi-word-component-names": "off",
2515
},
2616
parser: "vue-eslint-parser",
27-
extends: [
28-
"plugin:vue/essential",
29-
'eslint:recommended',
30-
"prettier"
31-
],
17+
extends: ["plugin:vue/essential", "eslint:recommended", "prettier"],
3218
};

.github/workflows/vue-deploy-github-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Set up the NodeJS environment
3434
uses: actions/setup-node@v3
3535
with:
36-
node-version: 14
36+
node-version: 20
3737

3838
# Runs a single command using the runners shell
3939
- name: Intro

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v14
1+
v20

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dist
2+
node_modules
3+
src/assets/*.png

.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"printWidth": 120,
3+
"trailingComma": "all",
4+
"singleQuote": false,
5+
"proseWrap": "always",
6+
"tabWidth": 4,
7+
"useTabs": true,
8+
"bracketSpacing": true,
9+
"semi": true
10+
}

.prettierrc.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Changelog
2+
3+
All notable changes to `myeic-common-lib` will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](http://keepachangelog.com/)
6+
and this project adheres to [Semantic Versioning](http://semver.org/).
7+
8+
## v3.0.1 - Upgrade to Vite - 2024-05-28
9+
10+
- The project now uses Vite as the build tool. This will allow for faster builds and better performance.

CONTRIBUTING.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Contributing
2+
3+
When contributing to this repository, please first discuss the change you wish to make via issue,
4+
email, or any other method with the owners of this repository before making a change.
5+
6+
Please note we have a code of conduct, please follow it in all your interactions with the project.
7+
8+
## Pull Request Process
9+
10+
1. Ensure any install or build dependencies are removed before the end of the layer when doing a
11+
build.
12+
2. Update the README.md with details of changes to the interface, this includes new environment
13+
variables, exposed ports, useful file locations and container parameters.
14+
3. Increase the version numbers in any examples files and the README.md to the new version that this
15+
Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
16+
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
17+
do not have permission to do that, you may request the second reviewer to merge it for you.
18+
19+
## Code of Conduct
20+
21+
### Our Pledge
22+
23+
In the interest of fostering an open and welcoming environment, we as
24+
contributors and maintainers pledge to making participation in our project and
25+
our community a harassment-free experience for everyone, regardless of age, body
26+
size, disability, ethnicity, gender identity and expression, level of experience,
27+
nationality, personal appearance, race, religion, or sexual identity and
28+
orientation.
29+
30+
### Our Standards
31+
32+
Examples of behavior that contributes to creating a positive environment
33+
include:
34+
35+
* Using welcoming and inclusive language
36+
* Being respectful of differing viewpoints and experiences
37+
* Gracefully accepting constructive criticism
38+
* Focusing on what is best for the community
39+
* Showing empathy towards other community members
40+
41+
Examples of unacceptable behavior by participants include:
42+
43+
* The use of sexualized language or imagery and unwelcome sexual attention or
44+
advances
45+
* Trolling, insulting/derogatory comments, and personal or political attacks
46+
* Public or private harassment
47+
* Publishing others' private information, such as a physical or electronic
48+
address, without explicit permission
49+
* Other conduct which could reasonably be considered inappropriate in a
50+
professional setting
51+
52+
### Our Responsibilities
53+
54+
Project maintainers are responsible for clarifying the standards of acceptable
55+
behavior and are expected to take appropriate and fair corrective action in
56+
response to any instances of unacceptable behavior.
57+
58+
Project maintainers have the right and responsibility to remove, edit, or
59+
reject comments, commits, code, wiki edits, issues, and other contributions
60+
that are not aligned to this Code of Conduct, or to ban temporarily or
61+
permanently any contributor for other behaviors that they deem inappropriate,
62+
threatening, offensive, or harmful.
63+
64+
### Scope
65+
66+
This Code of Conduct applies both within project spaces and in public spaces
67+
when an individual is representing the project or its community. Examples of
68+
representing a project or community include using an official project e-mail
69+
address, posting via an official social media account, or acting as an appointed
70+
representative at an online or offline event. Representation of a project may be
71+
further defined and clarified by project maintainers.
72+
73+
### Enforcement
74+
75+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
76+
reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
77+
complaints will be reviewed and investigated and will result in a response that
78+
is deemed necessary and appropriate to the circumstances. The project team is
79+
obligated to maintain confidentiality with regard to the reporter of an incident.
80+
Further details of specific enforcement policies may be posted separately.
81+
82+
Project maintainers who do not follow or enforce the Code of Conduct in good
83+
faith may face temporary or permanent repercussions as determined by other
84+
members of the project's leadership.
85+
86+
### Attribution
87+
88+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
89+
available at [http://contributor-covenant.org/version/1/4][version]
90+
91+
[homepage]: http://contributor-covenant.org
92+
93+
[version]: http://contributor-covenant.org/version/1/4/

README.md

Lines changed: 68 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,55 @@
77
[![Ask Me Anything !](https://img.shields.io/badge/Ask%20me-anything-1abc9c.svg)](https://GitHub.com/scify)
88
[![Vue Deploy to GitHub Pages](https://github.com/scify/Machine-Learning-Decision-Trees-Robot/actions/workflows/vue-deploy-github-pages.yml/badge.svg?branch=master&event=push)](https://github.com/scify/Machine-Learning-Decision-Trees-Robot/actions/workflows/vue-deploy-github-pages.yml)
99

10+
## Table of Contents
11+
12+
- [About](#about)
13+
- [Pre-setup steps](#pre-setup-steps)
14+
- [Project setup](#project-setup)
15+
- [Compile and hot-reload for development](#compile-and-hot-reload-for-development)
16+
- [Compile and minify for production](#compile-and-minify-for-production)
17+
- [Run your tests](#run-your-tests)
18+
- [Lints and fixes files](#lints-and-fixes-files)
19+
- [Beautify files](#beautify-files)
20+
- [Deploy to GitHub Pages](#deploy-to-github-pages)
21+
- [License](#license)
22+
- [Acknowledgements](#acknowledgements)
23+
- [Contributing](#contributing)
24+
- [Changelog](#changelog)
25+
26+
## About
27+
1028
This is a playground for Machine Learning.
1129
It visualises a simple example in which the user is prompted to enrich the training set of a Decision Tree algorithm.
1230

1331
A demo (in English and Greek) can be found [here](https://go.scify.gr/teach-thalis-the-robot).
1432

1533
This project uses the [decision-tree-js](https://github.com/lagodiuk/decision-tree-js) library.
1634

17-
All dataset images are royalty-free and were taken from [Pexels](https://www.pexels.com/) and [Unsplash](https://unsplash.com/).
35+
All dataset images are royalty-free and were taken from [Pexels](https://www.pexels.com/)
36+
and [Unsplash](https://unsplash.com/).
1837

1938
<div>Icons made by <a href="https://www.flaticon.com/authors/mavadee" title="mavadee">mavadee</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></div>
2039

2140
## Pre-setup steps
2241

23-
It is very easy to install multiple versions of nodejs and npm, by using [Node Version Manager (nvm)](https://github.com/creationix/nvm).
42+
It is very easy to install multiple versions of `NodeJS` and `npm`, by
43+
using [Node Version Manager (nvm)](https://github.com/creationix/nvm).
2444

25-
Make sure the right NodeJS and npm versions are installed:
45+
Make sure the right `NodeJS` and `npm` versions are installed:
2646

2747
```bash
2848
nvm install lts/fermium # (or nvm install v14.21.1)
2949

3050
node -v
31-
v14.21.1
51+
v20.13.1
3252

3353
npm -v
34-
6.14.17
54+
10.17.0
3555
```
3656

37-
Alternatively, if you are using [`nvm`](https://github.com/nvm-sh/nvm), run this command in order to sync to the correct NodeJS version for the project:
57+
Alternatively, if you are using [`nvm`](https://github.com/nvm-sh/nvm), run this command in order to sync to the
58+
correct `NodeJS` version for the project:
3859

3960
```bash
4061
nvm use
@@ -55,29 +76,66 @@ cp .env.example .env
5576
```
5677

5778
## Compile and hot-reload for development
79+
5880
```bash
5981
npm run serve
6082
```
6183

6284
## Compile and minify for production
85+
6386
```bash
6487
npm run build
6588
```
6689

6790
## Run your tests
91+
6892
```bash
6993
npm run test
7094
```
7195

7296
## Lints and fixes files
97+
7398
```bash
7499
npm run lint
75100
```
76101

77-
## Deploy to GitHub Pages
102+
## Beautify files
78103

79104
```bash
80-
chmod +x deploy.sh
105+
npm run format
106+
```
107+
108+
## Deploy to GitHub Pages
109+
110+
This application is deployed to GitHub Pages using the Deploy to GitHub Pages GitHub Action.
111+
112+
This action is triggered by a push to the `master` branch, and is defined in
113+
the `.github/workflows/vue-deploy-github-pages.yml` file.
114+
115+
## License
116+
117+
This project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details.
118+
119+
## Acknowledgements
120+
121+
- [decision-tree-js](https://github.com/lagodiuk/decision-tree-js)
122+
- [Pexels](https://www.pexels.com/)
123+
- [Unsplash](https://unsplash.com/)
124+
- [Flaticon](https://www.flaticon.com/)
125+
- [Vue.js](https://vuejs.org/)
126+
127+
## Contributing
128+
129+
To contribute to this application, follow these steps:
130+
131+
1. Fork this repository.
132+
2. Read the [CONTRIBUTING](CONTRIBUTING.md) file.
133+
3. Create a branch: `git checkout -b <branch_name>`.
134+
4. Make your changes and commit them: `git commit -m '<commit_message>'`
135+
5. Push to the original branch: `git push origin <project_name>/<location>`
136+
6. Create the pull request.
137+
138+
139+
## Changelog
81140

82-
./deploy.sh
83-
```
141+
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
presets: [ [ "@vue/app", { useBuiltIns: "entry" } ] ]
2+
presets: [ [ "@vue/app", { useBuiltIns: "entry" } ] ]
33
};

0 commit comments

Comments
 (0)