Skip to content

Commit 1754ea2

Browse files
committed
Add Vue.js + TypeScript + ASP.NET Core for Geolocation sample project
1 parent cbdef13 commit 1754ea2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1980
-4
lines changed

VueJsAspNetCoreSample.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "VueJsTypeScriptAspNetCoreSa
2121
EndProject
2222
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "VueJsTsWebcamAspNetCoreSample", "src\VueJsTsWebcamAspNetCoreSample\VueJsTsWebcamAspNetCoreSample.xproj", "{6E86BF6C-54A7-4C02-84F0-5E5C1CCD1FAE}"
2323
EndProject
24+
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "VueJsTsGeolocationAspNetCoreSample", "src\VueJsTsGeolocationAspNetCoreSample\VueJsTsGeolocationAspNetCoreSample.xproj", "{9BF631EC-2DD7-40BB-B3F6-7BF4B3366863}"
25+
EndProject
2426
Global
2527
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2628
Debug|Any CPU = Debug|Any CPU
@@ -39,6 +41,10 @@ Global
3941
{6E86BF6C-54A7-4C02-84F0-5E5C1CCD1FAE}.Debug|Any CPU.Build.0 = Debug|Any CPU
4042
{6E86BF6C-54A7-4C02-84F0-5E5C1CCD1FAE}.Release|Any CPU.ActiveCfg = Release|Any CPU
4143
{6E86BF6C-54A7-4C02-84F0-5E5C1CCD1FAE}.Release|Any CPU.Build.0 = Release|Any CPU
44+
{9BF631EC-2DD7-40BB-B3F6-7BF4B3366863}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
45+
{9BF631EC-2DD7-40BB-B3F6-7BF4B3366863}.Debug|Any CPU.Build.0 = Debug|Any CPU
46+
{9BF631EC-2DD7-40BB-B3F6-7BF4B3366863}.Release|Any CPU.ActiveCfg = Release|Any CPU
47+
{9BF631EC-2DD7-40BB-B3F6-7BF4B3366863}.Release|Any CPU.Build.0 = Release|Any CPU
4248
EndGlobalSection
4349
GlobalSection(SolutionProperties) = preSolution
4450
HideSolutionNode = FALSE
@@ -47,5 +53,6 @@ Global
4753
{C61EDD7C-9A45-4CB9-BA0F-FC3591F23F66} = {B6D362B4-A378-4848-ABB8-55D57FDE5F21}
4854
{65E50066-C436-43F0-98D1-B80F24C0CB73} = {B6D362B4-A378-4848-ABB8-55D57FDE5F21}
4955
{6E86BF6C-54A7-4C02-84F0-5E5C1CCD1FAE} = {B6D362B4-A378-4848-ABB8-55D57FDE5F21}
56+
{9BF631EC-2DD7-40BB-B3F6-7BF4B3366863} = {B6D362B4-A378-4848-ABB8-55D57FDE5F21}
5057
EndGlobalSection
5158
EndGlobal

src/VueJsGeolocationSample/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "vuejs-geolocation-sample",
33
"version": "1.0.0",
4-
"description": "A Vue.js project",
5-
"author": "Justin Yoo <justin.yoo@aliencube.com>",
4+
"description": "A Vue.js application - Geolocation",
5+
"author": "Justin Yoo",
66
"private": true,
77
"scripts": {
88
"dev": "node build/dev-server.js",
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"presets": [
3+
["env", { "modules": false }],
4+
"stage-2"
5+
],
6+
"plugins": ["transform-runtime"],
7+
"comments": false,
8+
"env": {
9+
"test": {
10+
"presets": ["env", "stage-2"],
11+
"plugins": [ "istanbul" ]
12+
}
13+
}
14+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build/*.js
2+
config/*.js
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// http://eslint.org/docs/user-guide/configuring
2+
3+
module.exports = {
4+
root: true,
5+
parser: 'babel-eslint',
6+
parserOptions: {
7+
sourceType: 'module'
8+
},
9+
env: {
10+
browser: true,
11+
},
12+
// https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
13+
extends: 'standard',
14+
// required to lint *.vue files
15+
plugins: [
16+
'html'
17+
],
18+
// add your custom rules here
19+
'rules': {
20+
// allow paren-less arrow functions
21+
'arrow-parens': 0,
22+
// allow async-await
23+
'generator-star-spacing': 0,
24+
// allow debugger during development
25+
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
26+
}
27+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.DS_Store
2+
node_modules/
3+
dist/
4+
npm-debug.log
5+
yarn-error.log
6+
test/unit/coverage
7+
test/e2e/reports
8+
selenium-debug.log
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// https://github.com/michael-ciniawsky/postcss-load-config
2+
3+
module.exports = {
4+
"plugins": {
5+
// to edit target browsers: use "browserlist" field in package.json
6+
"autoprefixer": {}
7+
}
8+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNetCore.Mvc;
6+
7+
namespace VueJsTsGeolocationAspNetCoreSample.Controllers
8+
{
9+
[Route("api")]
10+
public class ApiController : Controller
11+
{
12+
[Route("hello")]
13+
[HttpGet]
14+
public IActionResult Hello()
15+
{
16+
var msg = new { Message = "Hello World" };
17+
return this.Ok(msg);
18+
}
19+
}
20+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNetCore.Mvc;
6+
7+
namespace VueJsTsGeolocationAspNetCoreSample.Controllers
8+
{
9+
public class HomeController : Controller
10+
{
11+
public IActionResult Index()
12+
{
13+
return View();
14+
}
15+
16+
public IActionResult About()
17+
{
18+
ViewData["Message"] = "Your application description page.";
19+
20+
return View();
21+
}
22+
23+
public IActionResult Contact()
24+
{
25+
ViewData["Message"] = "Your contact page.";
26+
27+
return View();
28+
}
29+
30+
public IActionResult Error()
31+
{
32+
return View();
33+
}
34+
}
35+
}

0 commit comments

Comments
 (0)