diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..403adbc --- /dev/null +++ b/.gitignore @@ -0,0 +1,23 @@ +.DS_Store +node_modules +/dist + + +# local env files +.env.local +.env.*.local + +# Log files +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* + +# Editor directories and files +.idea +.vscode +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/README.md b/README.md index c60b6e4..09deec5 100644 --- a/README.md +++ b/README.md @@ -1,46 +1,24 @@ -# algorithm-visualizer -### Live Link +# algo -### Completed Algorithm -* Sorting - * Bubble Sort - * Insertion Sort -* Searching - * Linear Search - * Binary Search - - -![image](https://user-images.githubusercontent.com/26277680/163478028-586e4e2e-b949-47c6-a6ad-9c418144af6b.png) -![image](https://user-images.githubusercontent.com/26277680/163477034-e55f6751-343f-4e84-bafe-881f03ccd2d7.png) - - - -## Setup - -The first thing to do is to clone the repository: - -```sh -$ git clone https://github.com/Bappy4u/algorithm-visualizer.git +## Project setup +``` +npm install ``` -Then open `index.html` in the browser. That's it - -### What I've used in this project - -* JavaScript -* Async & Await function of javaScript -* D3.js for data visualization -* Algorithms -* Html & CSS - - -### Incomplete feature: - -* More Sorting algorithms visualizations -* Linked list visualization -* Tree visualization -* And More... -### +### 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/). diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 0000000..e955840 --- /dev/null +++ b/babel.config.js @@ -0,0 +1,5 @@ +module.exports = { + presets: [ + '@vue/cli-plugin-babel/preset' + ] +} diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000..4aafc5f --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "esnext", + "baseUrl": "./", + "moduleResolution": "node", + "paths": { + "@/*": [ + "src/*" + ] + }, + "lib": [ + "esnext", + "dom", + "dom.iterable", + "scripthost" + ] + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..a8fdca3 --- /dev/null +++ b/package.json @@ -0,0 +1,61 @@ +{ + "name": "algo", + "version": "1.0.0", + "private": true, + "description": "* Sorting\r * Bubble Sort\r * Insertion Sort\r * Searching\r * Linear Search\r * Binary Search", + "author": "", + "scripts": { + "serve": "vue-cli-service serve", + "build": "vue-cli-service build", + "lint": "vue-cli-service lint", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "main": "index.js", + "dependencies": { + "core-js": "^3.8.3", + "vue": "^3.2.13", + "vue-router": "^4.2.2" + }, + "devDependencies": { + "@babel/core": "^7.12.16", + "@babel/eslint-parser": "^7.12.16", + "@vue/cli": "^5.0.8", + "@vue/cli-plugin-babel": "~5.0.0", + "@vue/cli-plugin-eslint": "~5.0.0", + "@vue/cli-service": "~5.0.0", + "eslint": "^7.32.0", + "eslint-plugin-vue": "^8.0.3" + }, + "eslintConfig": { + "root": true, + "env": { + "node": true + }, + "extends": [ + "plugin:vue/vue3-essential", + "eslint:recommended" + ], + "parserOptions": { + "parser": "@babel/eslint-parser" + }, + "rules": {} + }, + "browserslist": [ + "> 1%", + "last 2 versions", + "not dead", + "not ie 11" + ], + "_id": "algo@1.0.0", + "bugs": { + "url": "https://github.com/Bappy4u/algorithm-visualizer/issues" + }, + "homepage": "https://github.com/Bappy4u/algorithm-visualizer#readme", + "keywords": [], + "license": "ISC", + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/Bappy4u/algorithm-visualizer.git" + } +} diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..df36fcf Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..ad561d9 --- /dev/null +++ b/public/index.html @@ -0,0 +1,17 @@ + + + + + + + + Algorithm Visualizer + + + +
+ + + diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..807ed1b --- /dev/null +++ b/src/App.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/src/algorithms/algorithms.vue b/src/algorithms/algorithms.vue new file mode 100644 index 0000000..1561276 --- /dev/null +++ b/src/algorithms/algorithms.vue @@ -0,0 +1,15 @@ + + + + + \ No newline at end of file diff --git a/src/algorithms/search/Search.vue b/src/algorithms/search/Search.vue new file mode 100644 index 0000000..a0ea2a3 --- /dev/null +++ b/src/algorithms/search/Search.vue @@ -0,0 +1,15 @@ + + + + + \ No newline at end of file diff --git a/src/algorithms/sort/Sort.vue b/src/algorithms/sort/Sort.vue new file mode 100644 index 0000000..5c7b10d --- /dev/null +++ b/src/algorithms/sort/Sort.vue @@ -0,0 +1,15 @@ + + + + + \ No newline at end of file diff --git a/src/assets/logo.png b/src/assets/logo.png new file mode 100644 index 0000000..f3d2503 Binary files /dev/null and b/src/assets/logo.png differ diff --git a/src/components/AlgorithmVisualizer.vue b/src/components/AlgorithmVisualizer.vue new file mode 100644 index 0000000..253e53a --- /dev/null +++ b/src/components/AlgorithmVisualizer.vue @@ -0,0 +1,36 @@ + + + + + + diff --git a/src/components/menu.vue b/src/components/menu.vue new file mode 100644 index 0000000..d377540 --- /dev/null +++ b/src/components/menu.vue @@ -0,0 +1,93 @@ + + + + + diff --git a/src/core/_helperFunctions.js b/src/core/_helperFunctions.js new file mode 100644 index 0000000..e69de29 diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..d30ece6 --- /dev/null +++ b/src/main.js @@ -0,0 +1,4 @@ +import { createApp } from 'vue' +import App from './App.vue' +import router from './routes/router'; +createApp(App).use(router).mount('#app') diff --git a/src/routes/router.js b/src/routes/router.js new file mode 100644 index 0000000..df27c7e --- /dev/null +++ b/src/routes/router.js @@ -0,0 +1,18 @@ +import { createRouter, createWebHistory } from 'vue-router'; +import SearchView from './../algorithms/search/Search.vue'; +import homeView from './../algorithms/algorithms.vue'; +import SortView from './../algorithms/sort/Sort.vue'; + +const routes = [ + { path: '/', component: homeView }, + { path: '/search', component: SearchView }, + { path: '/sort', component: SortView }, + // Add more routes for other algorithm components +]; + +const router = createRouter({ + history: createWebHistory(), + routes, +}); + +export default router; diff --git a/vue.config.js b/vue.config.js new file mode 100644 index 0000000..910e297 --- /dev/null +++ b/vue.config.js @@ -0,0 +1,4 @@ +const { defineConfig } = require('@vue/cli-service') +module.exports = defineConfig({ + transpileDependencies: true +})