Skip to content

Commit

Permalink
Added vue project
Browse files Browse the repository at this point in the history
  • Loading branch information
Ochuwa-sophie authored and Ochuwa-sophie committed Aug 27, 2020
1 parent a49734f commit 6b0eeaf
Show file tree
Hide file tree
Showing 28 changed files with 8,779 additions and 77 deletions.
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/bin/Debug/netcoreapp3.1/Dictionary.dll",
"program": "${workspaceFolder}/src/DictionaryBackend/bin/Debug/netcoreapp3.1/Dictionary.dll",
"args": [],
"cwd": "${workspaceFolder}",
"cwd": "${workspaceFolder}/src/DictionaryBackend",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
Expand Down
6 changes: 3 additions & 3 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "process",
"args": [
"build",
"${workspaceFolder}/Dictionary.csproj",
"${workspaceFolder}/src/DictionaryBackend/Dictionary.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
Expand All @@ -19,7 +19,7 @@
"type": "process",
"args": [
"publish",
"${workspaceFolder}/Dictionary.csproj",
"${workspaceFolder}/src/DictionaryBackend/Dictionary.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
Expand All @@ -32,7 +32,7 @@
"args": [
"watch",
"run",
"${workspaceFolder}/Dictionary.csproj",
"${workspaceFolder}/src/DictionaryBackend/Dictionary.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
Expand Down
12 changes: 0 additions & 12 deletions Dictionary.csproj

This file was deleted.

41 changes: 0 additions & 41 deletions bin/Debug/netcoreapp3.1/Dictionary.deps.json

This file was deleted.

Binary file removed bin/Debug/netcoreapp3.1/Dictionary.dll
Binary file not shown.
Binary file removed bin/Debug/netcoreapp3.1/Dictionary.exe
Binary file not shown.
Binary file removed bin/Debug/netcoreapp3.1/Dictionary.pdb
Binary file not shown.
8 changes: 0 additions & 8 deletions bin/Debug/netcoreapp3.1/Dictionary.runtimeconfig.dev.json

This file was deleted.

9 changes: 0 additions & 9 deletions bin/Debug/netcoreapp3.1/Dictionary.runtimeconfig.json

This file was deleted.

Binary file removed bin/Debug/netcoreapp3.1/Newtonsoft.Json.dll
Binary file not shown.
Binary file modified obj/Debug/netcoreapp3.1/Dictionary.assets.cache
Binary file not shown.
27 changes: 27 additions & 0 deletions src/DictionaryBackend/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/bin/Debug/netcoreapp3.1/Dictionary.dll",
"args": [],
"cwd": "${workspaceFolder}",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}
42 changes: 42 additions & 0 deletions src/DictionaryBackend/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/Dictionary.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/Dictionary.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"${workspaceFolder}/Dictionary.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
using System.Collections.Generic;
using System.Web.Http.Cors;
// using Microsoft.AspNetCore.Cors;
using System.Console;

namespace Dictionary
{


[EnableCors(origins: "http://mywebclient.azurewebsites.net", headers: "*", methods: "*")]
public class Result {
public string definition { get; set; }
public string partOfSpeech { get; set; }
Expand Down
15 changes: 15 additions & 0 deletions src/DictionaryBackend/Dictionary.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
<!-- <PackageReference Include="Microsoft.AspNet.WebApi.Cors" Version="5.2.7" /> -->
<PackageReference Include="Microsoft.AspNetCore.Cors" Version="2.2.0" />
<!-- <PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="3.1.7" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" /> -->
</ItemGroup>

</Project>
6 changes: 4 additions & 2 deletions Program.cs → src/DictionaryBackend/Program.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
using System;
using System.Threading.Tasks;
using System.Net.Http;
// using Newtonsoft.Json;
using System.Text.Json;
using System.Web.Http.Cors;

namespace Dictionary
{
class Program
{
static async Task Main(string[] args)
{
// EnableCorsAttribute cors = new EnableCorsAttribute("*", "*", "*");
// config.EnableCors(cors);
var client = new HttpClient();
client.BaseAddress = new Uri("https://wordsapiv1.p.rapidapi.com");
client.DefaultRequestHeaders.Add("X-Mashape-Key", "YourKey");
Expand Down Expand Up @@ -42,5 +44,5 @@ static async Task Main(string[] args)
Console.WriteLine("An error occurred! Error Message: " + e.Message);
}
}
}Your
}
}
23 changes: 23 additions & 0 deletions src/DictionaryFrontend/dictionary/.gitignore
Original file line number Diff line number Diff line change
@@ -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?
24 changes: 24 additions & 0 deletions src/DictionaryFrontend/dictionary/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# dictionary

## Project setup
```
yarn install
```

### Compiles and hot-reloads for development
```
yarn serve
```

### Compiles and minifies for production
```
yarn build
```

### Lints and fixes files
```
yarn lint
```

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
5 changes: 5 additions & 0 deletions src/DictionaryFrontend/dictionary/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}
42 changes: 42 additions & 0 deletions src/DictionaryFrontend/dictionary/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "dictionary",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.6.5",
"vue": "^2.6.11"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"vue-template-compiler": "^2.6.11"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}
Binary file not shown.
17 changes: 17 additions & 0 deletions src/DictionaryFrontend/dictionary/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<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">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
27 changes: 27 additions & 0 deletions src/DictionaryFrontend/dictionary/src/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<template>
<div id="app">
<Users />
</div>
</template>

<script>
import Users from './components/Users.vue'
export default {
name: 'app',
components: {
Users
}
}
</script>

<style>
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 6b0eeaf

Please sign in to comment.