Skip to content

Commit

Permalink
Merge pull request #15 from The-Sebastian/main
Browse files Browse the repository at this point in the history
renamed algorithm file names and fixed icon issue for mac
  • Loading branch information
The-Sebastian authored May 13, 2021
2 parents 4f3ccdd + 0147765 commit dea71df
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 11 deletions.
File renamed without changes
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
"build/icon.*"
],
"win": {
"icon": "src/axonicon_UWT_icon.ico"
"icon": "src/axonDesktopIcon.ico"
},
"mac":{
"icon": "src/axonDesktopIcon.ico"
}
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/app/app.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import RootComponent from '@/app/root';
import Particles from 'particlesjs';
import logo from '../../assets/AxonFinalLogo.png';
import logo from '../../assets/AxonTitleIcon.png';



Expand Down
Binary file added src/axonDesktopIcon.ico
Binary file not shown.
Binary file removed src/axonicon_UWT_icon.ico
Binary file not shown.
8 changes: 4 additions & 4 deletions src/utils/buildPathObject.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import tempFindEndpointData from './utilityFunctions/tempFindEndpointData';
import { tempIdentifyFileType } from './utilityFunctions/tempIdentifyFileType';
import FindEndpointData from './utilityFunctions/FindEndpointData';
import { IdentifyFileType } from './utilityFunctions/IdentifyFileType';

/**
* When a server folder is uploaded, it is converted to a 'flat' array-like FileList object.
Expand Down Expand Up @@ -28,7 +28,7 @@ export default function (fileList:any) {
// When the file is read sucessfully
.then((fileText) => {
// Identify the type of file
const { fileType, portNumber } = tempIdentifyFileType(fileText);
const { fileType, portNumber } = IdentifyFileType(fileText);

// When the type of file is a server, add the server path to the pathObject
if (fileType === 'Server') {
Expand All @@ -41,7 +41,7 @@ export default function (fileList:any) {
// When the file is a server or router file
if (fileType === 'Server' || fileType === 'Router') {
// Extract necessary route and endpoint data from fileText
const { imports, endpoints, routers } = tempFindEndpointData(fileText, fileList[i].webkitRelativePath);
const { imports, endpoints, routers } = FindEndpointData(fileText, fileList[i].webkitRelativePath);
// Add relevant data to the new file object
newFileObject = {
name: fileList[i].name,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import tempResolvePath from './tempResolvePath';
import tempFuncDefinitionParser from './tempFuncDefinitionParser';
import ResolvePath from './ResolvePath';
import FuncDefinitionParser from './FuncDefinitionParser';

const AbstractSyntaxTree = require('abstract-syntax-tree');

Expand Down Expand Up @@ -54,7 +54,7 @@ export default function (fileText: string, currentFilePath:string) {
const importPath = statement.declarations[0].init.arguments[0].value;

// Add the imported module to the imports object on the fileObject
fileObject.imports[importName] = tempResolvePath(importPath, currentFilePath);
fileObject.imports[importName] = ResolvePath(importPath, currentFilePath);
}
}
}
Expand Down Expand Up @@ -90,7 +90,7 @@ export default function (fileText: string, currentFilePath:string) {
}

// Convert the anonymous function, which is the last argument, into an object of the endpoint data
endpointArray[endpointArray.length - 1] = tempFuncDefinitionParser(endpointArray[endpointArray.length - 1]);
endpointArray[endpointArray.length - 1] = FuncDefinitionParser(endpointArray[endpointArray.length - 1]);

// Add the Endpoint Array to the Endpoints object
if (fileObject.endpoints[route]) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* fileType: will be 'Server', 'Router' or 'Other'
* portNumber: will be a string or null
*/
export function tempIdentifyFileType(fileText:any) :any {
export function IdentifyFileType(fileText:any) :any {

// Attempt to match a port number in the current file
const dotListenRE = /\.listen\((?<port>.*?)(?=,|\))/i;
Expand Down
File renamed without changes.

0 comments on commit dea71df

Please sign in to comment.