Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

Commit

Permalink
Fix samples, finalize dotnet 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
EEParker committed Oct 11, 2019
1 parent 41342ef commit 5d11a1f
Show file tree
Hide file tree
Showing 37 changed files with 11,371 additions and 278 deletions.
539 changes: 299 additions & 240 deletions samples/QuasarCliSample/ClientApp/package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions samples/QuasarCliSample/ClientApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@
"author": "EEparker <[email protected]>",
"private": true,
"scripts": {
"dev": "quasar dev",
"serve": "quasar dev",
"build": "quasar build",
"build:pwa": "quasar build -m pwa"
},
"dependencies": {
"@quasar/extras": "^1.3.2",
"axios": "^0.19.0",
"quasar": "^1.1.6",
"quasar": "^1.2.0",
"vue-class-component": "^7.1.0",
"vue-property-decorator": "^8.2.2",
"vuex": "^3.1.1",
"vuex-class": "^0.3.2",
"vuex-module-decorators": "^0.10.1"
},
"devDependencies": {
"@quasar/app": "^1.1.2",
"@types/node": "^12.7.8",
"@quasar/app": "^1.2.0",
"@types/node": "^12.7.12",
"pug": "^2.0.4",
"pug-plain-loader": "^1.0.0",
"ts-loader": "^6.2.0",
"typescript": "^3.6.3"
"typescript": "^3.6.4"
},
"engines": {
"node": ">= 8.9.0",
Expand Down
6 changes: 5 additions & 1 deletion samples/QuasarCliSample/ClientApp/quasar.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ module.exports = function (ctx) {
'QList',
'QItem',
'QItemSection',
'QItemLabel'
'QItemLabel',
'QTable',
'QTh',
'QTr',
'QTd'
],

directives: [
Expand Down
2 changes: 1 addition & 1 deletion samples/QuasarCliSample/ClientApp/src/index.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="description" content="<%= htmlWebpackPlugin.options.productDescription %>">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (htmlWebpackPlugin.options.ctx.mode.cordova) { %>, viewport-fit=cover<% } %>">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (htmlWebpackPlugin.options.ctx.mode.cordova || htmlWebpackPlugin.options.ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>">

<link rel="icon" type="image/png" href="statics/app-logo-128x128.png">
<link rel="icon" type="image/png" sizes="16x16" href="statics/icons/favicon-16x16.png">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export interface IWeatherForecast {
temperatureC: number;
temperatureF: number;
summary: string;
date: Date;
}
24 changes: 23 additions & 1 deletion samples/QuasarCliSample/ClientApp/src/pages/Index.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,36 @@
<template lang="pug">
q-page.flex.flex-center
img(alt='Quasar logo' src='~assets/quasar-logo-full.svg')
q-table(title="Weather" :data="forecasts" :columns="forecastCols")
</template>

<script lang="ts">
import { Component, Vue} from 'vue-property-decorator';
import { date } from 'quasar'
import { IWeatherForecast } from '../models/IWeatherForecast';
import axios from 'axios';
@Component
export default class PageIndex extends Vue {
private forecasts: IWeatherForecast[] = [{ summary: 'No data.' } as IWeatherForecast];
private forecastCols: any[] = [
{ name: 'Summary', label: 'Summary', field: (row: IWeatherForecast) => row.summary },
{ name: 'F', label: 'F', field: (row: IWeatherForecast) => row.temperatureF },
{ name: 'C', label: 'C', field: (row: IWeatherForecast) => row.temperatureC },
{
name: 'Date',
label: 'Date',
field: (row: IWeatherForecast) => row.date,
format: (val: Date) => `${date.formatDate(val, 'YYYY/MM/DD HH:mm:ss')}`
}
];
public async mounted() {
try {
this.forecasts = (await axios.get('api/weatherforecast')).data;
} catch {
this.forecasts = [{ summary: 'No data.' } as IWeatherForecast];
}
}
}
</script>

2 changes: 1 addition & 1 deletion samples/QuasarCliSample/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:58786",
"sslPort": 44330
"sslPort": 0
}
},
"$schema": "http://json.schemastore.org/launchsettings.json",
Expand Down
3 changes: 0 additions & 3 deletions samples/QuasarCliSample/QuasarCliSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<!--<PublishSingleFile>true</PublishSingleFile>-->
<!--<PublishTrimmed>true</PublishTrimmed>-->
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\VueCliMiddleware\VueCliMiddleware.csproj" />
</ItemGroup>

<PropertyGroup>
<!-- Typescript/Javascript Client Configuration -->
<SpaRoot>ClientApp\</SpaRoot>
<DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
</PropertyGroup>
Expand Down
11 changes: 4 additions & 7 deletions samples/QuasarCliSample/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
app.UseDeveloperExceptionPage();
}

app.UseHttpsRedirection();

app.UseSpaStaticFiles();

app.UseRouting();
Expand All @@ -52,14 +50,13 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
endpoints.MapControllers();

// Note: only use vuecliproxy in development.
// Production should use "UseSpaStaticFiles()" and the webpack dist
endpoints.MapToVueCliProxy(
"{*path}",
new SpaOptions { SourcePath = "ClientApp" }
//,(System.Diagnostics.Debugger.IsAttached) ? "dev" : null
//,regex: "Compiled successfully"
new SpaOptions { SourcePath = "ClientApp" },
npmScript: (System.Diagnostics.Debugger.IsAttached) ? "serve" : null
);

//endpoints.MapFallbackToFile("{*path}", "index.html");
});
}
}
Expand Down
2 changes: 2 additions & 0 deletions samples/VueCliSample/ClientApp/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
> 1%
last 2 versions
21 changes: 21 additions & 0 deletions samples/VueCliSample/ClientApp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.DS_Store
node_modules
/dist

# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
24 changes: 24 additions & 0 deletions samples/VueCliSample/ClientApp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# clientapp

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

### 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/).
5 changes: 5 additions & 0 deletions samples/VueCliSample/ClientApp/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/app'
]
}
Loading

0 comments on commit 5d11a1f

Please sign in to comment.