Skip to content

Update to .NET 5.0 & ESLint #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 4, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
root: true,
'extends': [
'./ClientApp/.eslintrc.js'
]
}
32 changes: 20 additions & 12 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
// 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 (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/bin/Debug/netcoreapp3.1/AspNetCoreVueStarter.dll",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/bin/Debug/net5.0/AspNetCoreVueStarter.dll",
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
"serverReadyAction": {
"action": "openExternally",
"pattern": "^\\s*Now listening on:\\s+(https?://\\S+)"
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
Expand All @@ -41,31 +43,37 @@
"sourceMapPathOverrides": {
"webpack:///*": "${webRoot}/*",
"webpack:///./*": "${webRoot}/*",
"webpack:///src/*": "${webRoot}/src/*"
"webpack:///src/*": "${webRoot}/*"
}
},
{
"name": "Launch Firefox",
"type": "firefox",
"request": "launch",
"url": "http://localhost:5000",
"type": "firefox",
"webRoot": "${workspaceFolder}/ClientApp",
"pathMappings": [
{
"url": "webpack:///src",
"path": "${webRoot}/src"
"url": "webpack:///src/",
"path": "${webRoot}/"
}
]
}
],
"compounds": [
{
"name": "Debug SPA and API (Chrome)",
"configurations": [".NET Core Launch (web)", "Launch Chrome"]
"configurations": [
".NET Core Launch (web)",
"Launch Chrome"
]
},
{
"name": "Debug SPA and API (Firefox)",
"configurations": [".NET Core Launch (web)", "Launch Firefox"]
"configurations": [
".NET Core Launch (web)",
"Launch Firefox"
]
}
]
}
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"eslint.workingDirectories": [{ "mode": "auto" }]
}
10 changes: 0 additions & 10 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,6 @@
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/AspNetCoreVueStarter.csproj"
],
"problemMatcher": "$msCompile"
}
]
}
32 changes: 9 additions & 23 deletions AspNetCoreVueStarter.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
<IsPackable>false</IsPackable>
Expand All @@ -13,38 +13,23 @@
<Copyright>MIT 2020 Software Ateliers</Copyright>
<AssemblyName>AspNetCoreVueStarter</AssemblyName>
<RootNamespace>AspNetCoreVueStarter</RootNamespace>
<Version>2.6.0</Version>
<AssemblyVersion>2.6.0.0</AssemblyVersion>
<FileVersion>2.6.0.0</FileVersion>
<Version>2.7.0</Version>
<AssemblyVersion>2.7.0.0</AssemblyVersion>
<FileVersion>2.7.0.0</FileVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="3.1.9" />
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="5.0.1" />
<PackageReference Include="VueCliMiddleware" Version="3.1.2" />
</ItemGroup>

<ItemGroup>
<!-- Don't publish the SPA source files, but do show them in the project files list -->
<Content Remove="$(SpaRoot)**" />
<None Remove="$(SpaRoot)**" />
<None Include="$(SpaRoot)**" Exclude="$(SpaRoot)node_modules\**" />
</ItemGroup>

<ItemGroup>
<None Remove="ClientApp\src\plugins\axios.ts" />
</ItemGroup>

<ItemGroup>
<Content Include="ClientApp\tsconfig.json" />
</ItemGroup>

<ItemGroup>
<None Include="README.md" />
</ItemGroup>

<ItemGroup>
<TypeScriptCompile Include="ClientApp\src\plugins\axios.ts" />
</ItemGroup>

<Target Name="DebugEnsureNodeEnv" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('$(SpaRoot)node_modules') ">
<!-- Ensure Node.js is installed -->
<Exec Command="node --version" ContinueOnError="true">
Expand All @@ -63,9 +48,10 @@
<!-- Include the newly-built files in the publish output -->
<ItemGroup>
<DistFiles Include="$(SpaRoot)dist\**" />
<ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
<ResolvedFileToPublish Include="@(DistFiles-&gt;'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
<RelativePath>%(DistFiles.Identity)</RelativePath>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</ResolvedFileToPublish>
</ItemGroup>
</Target>
Expand Down
2 changes: 1 addition & 1 deletion ClientApp/.browserslistrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
> 1%
last 2 versions
not ie <= 8
not dead
17 changes: 17 additions & 0 deletions ClientApp/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
env: {
node: true
},
'extends': [
'plugin:vue/essential',
'@vue/standard',
'@vue/typescript/recommended'
],
parserOptions: {
ecmaVersion: 2020
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
}
}
4 changes: 3 additions & 1 deletion ClientApp/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
node_modules
/dist


# local env files
.env.local
.env.*.local
Expand All @@ -10,6 +11,7 @@ node_modules
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Editor directories and files
.idea
Expand All @@ -18,4 +20,4 @@ yarn-error.log*
*.ntvs*
*.njsproj
*.sln
*.sw*
*.sw?
1 change: 1 addition & 0 deletions ClientApp/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shamefully-hoist=true
13 changes: 8 additions & 5 deletions ClientApp/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
# ASP.NET Core Vue Starter
# clientapp

## Project setup
```
npm install
pnpm install
```

### Compiles and hot-reloads for development
```
npm run serve
pnpm run serve
```

### Compiles and minifies for production
```
npm run build
pnpm run build
```

### Lints and fixes files
```
npm run lint
pnpm run lint
```

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
22 changes: 2 additions & 20 deletions ClientApp/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
module.exports = {
"presets": [
[
"@vue/cli-plugin-babel/preset",
{
"useBuiltIns": "entry"
}
]
],
"plugins": [
[
"transform-imports",
{
"vuetify": {
"transform": "vuetify/es5/components/${member}",
"preventFullImport": true
}
}
]
]
}
presets: ['@vue/cli-plugin-babel/preset']
};
Loading