Skip to content

Commit abeef47

Browse files
committed
Add fresh asp.net core app with vue.js before applying typescript
1 parent a53f57b commit abeef47

File tree

16 files changed

+53
-125
lines changed

16 files changed

+53
-125
lines changed

VueJsAspNetCoreSample.sln

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1717
EndProject
1818
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "VueJsAspNetCoreSample", "src\VueJsAspNetCoreSample\VueJsAspNetCoreSample.xproj", "{C61EDD7C-9A45-4CB9-BA0F-FC3591F23F66}"
1919
EndProject
20-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "VueJsTypeScriptAspNetCoreSample", "src\VueJsTypeScriptAspNetCoreSample\VueJsTypeScriptAspNetCoreSample.xproj", "{E3834008-4E73-4A91-9010-10FC8D855C45}"
20+
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "VueJsTypeScriptAspNetCoreSample", "src\VueJsTypeScriptAspNetCoreSample\VueJsTypeScriptAspNetCoreSample.xproj", "{65E50066-C436-43F0-98D1-B80F24C0CB73}"
2121
EndProject
2222
Global
2323
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -29,16 +29,16 @@ Global
2929
{C61EDD7C-9A45-4CB9-BA0F-FC3591F23F66}.Debug|Any CPU.Build.0 = Debug|Any CPU
3030
{C61EDD7C-9A45-4CB9-BA0F-FC3591F23F66}.Release|Any CPU.ActiveCfg = Release|Any CPU
3131
{C61EDD7C-9A45-4CB9-BA0F-FC3591F23F66}.Release|Any CPU.Build.0 = Release|Any CPU
32-
{E3834008-4E73-4A91-9010-10FC8D855C45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
33-
{E3834008-4E73-4A91-9010-10FC8D855C45}.Debug|Any CPU.Build.0 = Debug|Any CPU
34-
{E3834008-4E73-4A91-9010-10FC8D855C45}.Release|Any CPU.ActiveCfg = Release|Any CPU
35-
{E3834008-4E73-4A91-9010-10FC8D855C45}.Release|Any CPU.Build.0 = Release|Any CPU
32+
{65E50066-C436-43F0-98D1-B80F24C0CB73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
33+
{65E50066-C436-43F0-98D1-B80F24C0CB73}.Debug|Any CPU.Build.0 = Debug|Any CPU
34+
{65E50066-C436-43F0-98D1-B80F24C0CB73}.Release|Any CPU.ActiveCfg = Release|Any CPU
35+
{65E50066-C436-43F0-98D1-B80F24C0CB73}.Release|Any CPU.Build.0 = Release|Any CPU
3636
EndGlobalSection
3737
GlobalSection(SolutionProperties) = preSolution
3838
HideSolutionNode = FALSE
3939
EndGlobalSection
4040
GlobalSection(NestedProjects) = preSolution
4141
{C61EDD7C-9A45-4CB9-BA0F-FC3591F23F66} = {B6D362B4-A378-4848-ABB8-55D57FDE5F21}
42-
{E3834008-4E73-4A91-9010-10FC8D855C45} = {B6D362B4-A378-4848-ABB8-55D57FDE5F21}
42+
{65E50066-C436-43F0-98D1-B80F24C0CB73} = {B6D362B4-A378-4848-ABB8-55D57FDE5F21}
4343
EndGlobalSection
4444
EndGlobal

src/VueJsTypeScriptAspNetCoreSample/.eslintrc.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ module.exports = {
1717
],
1818
// add your custom rules here
1919
'rules': {
20-
'quotes': 0,
21-
'semi': 0,
22-
'camelcase': 0,
23-
'indent': 0,
2420
// allow paren-less arrow functions
2521
'arrow-parens': 0,
2622
// allow async-await

src/VueJsTypeScriptAspNetCoreSample/Properties/launchSettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"windowsAuthentication": false,
44
"anonymousAuthentication": true,
55
"iisExpress": {
6-
"applicationUrl": "http://localhost:11428/",
6+
"applicationUrl": "http://localhost:25253/",
77
"sslPort": 0
88
}
99
},

src/VueJsTypeScriptAspNetCoreSample/VueJsTypeScriptAspNetCoreSample.xproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</PropertyGroup>
77
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
88
<PropertyGroup Label="Globals">
9-
<ProjectGuid>e3834008-4e73-4a91-9010-10fc8d855c45</ProjectGuid>
9+
<ProjectGuid>65e50066-c436-43f0-98d1-b80f24c0cb73</ProjectGuid>
1010
<RootNamespace>VueJsTypeScriptAspNetCoreSample</RootNamespace>
1111
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
1212
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>

src/VueJsTypeScriptAspNetCoreSample/build/webpack.base.conf.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function resolve (dir) {
99

1010
module.exports = {
1111
entry: {
12-
app: './src/main.ts'
12+
app: './src/main.js'
1313
},
1414
output: {
1515
path: config.build.assetsRoot,
@@ -19,7 +19,7 @@ module.exports = {
1919
: config.dev.assetsPublicPath
2020
},
2121
resolve: {
22-
extensions: ['.js', '.vue', '.json', '.ts'],
22+
extensions: ['.js', '.vue', '.json'],
2323
modules: [
2424
resolve('src'),
2525
resolve('node_modules')
@@ -36,7 +36,7 @@ module.exports = {
3636
{
3737
test: /\.(js|vue)$/,
3838
loader: 'eslint-loader',
39-
enforce: 'pre',
39+
enforce: "pre",
4040
include: [resolve('src'), resolve('test')],
4141
options: {
4242
formatter: require('eslint-friendly-formatter')
@@ -48,12 +48,9 @@ module.exports = {
4848
options: vueLoaderConfig
4949
},
5050
{
51-
test: /\.tsx?$/,
52-
loader: 'ts-loader',
53-
exclude: /node_modules/,
54-
options: {
55-
appendTsSuffixTo: [/\.vue$/]
56-
}
51+
test: /\.js$/,
52+
loader: 'babel-loader',
53+
include: [resolve('src'), resolve('test')]
5754
},
5855
{
5956
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,

src/VueJsTypeScriptAspNetCoreSample/package.json

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
"private": true,
77
"scripts": {
88
"dev": "node build/dev-server.js",
9-
"build": "npm run build:ts && npm run build:main",
10-
"build:ts": "tsc -p .",
11-
"build:main": "node build/build.js",
9+
"build": "node build/build.js",
1210
"unit": "cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run",
1311
"e2e": "node test/e2e/runner.js",
1412
"test": "npm run unit && npm run e2e",
@@ -25,24 +23,19 @@
2523
"babel-core": "^6.22.1",
2624
"babel-eslint": "^7.1.1",
2725
"babel-loader": "^6.2.10",
28-
"babel-plugin-istanbul": "^3.1.2",
2926
"babel-plugin-transform-runtime": "^6.22.0",
3027
"babel-preset-es2015": "^6.22.0",
3128
"babel-preset-stage-2": "^6.22.0",
3229
"babel-register": "^6.22.0",
33-
"chai": "^3.5.0",
3430
"chalk": "^1.1.3",
35-
"chromedriver": "^2.27.2",
3631
"connect-history-api-fallback": "^1.3.0",
3732
"copy-webpack-plugin": "^4.0.1",
38-
"cross-env": "^3.1.4",
39-
"cross-spawn": "^5.0.1",
4033
"css-loader": "^0.26.1",
4134
"eslint": "^3.14.1",
42-
"eslint-config-standard": "^6.2.1",
4335
"eslint-friendly-formatter": "^2.0.7",
4436
"eslint-loader": "^1.6.1",
4537
"eslint-plugin-html": "^2.0.0",
38+
"eslint-config-standard": "^6.2.1",
4639
"eslint-plugin-promise": "^3.4.0",
4740
"eslint-plugin-standard": "^2.0.1",
4841
"eventsource-polyfill": "^0.9.6",
@@ -53,7 +46,8 @@
5346
"function-bind": "^1.1.0",
5447
"html-webpack-plugin": "^2.28.0",
5548
"http-proxy-middleware": "^0.17.3",
56-
"inject-loader": "^2.0.1",
49+
"webpack-bundle-analyzer": "^2.2.1",
50+
"cross-env": "^3.1.4",
5751
"karma": "^1.4.1",
5852
"karma-coverage": "^1.1.1",
5953
"karma-mocha": "^1.3.0",
@@ -64,25 +58,26 @@
6458
"karma-webpack": "^2.0.2",
6559
"lolex": "^1.5.2",
6660
"mocha": "^3.2.0",
61+
"chai": "^3.5.0",
62+
"sinon": "^1.17.7",
63+
"sinon-chai": "^2.8.0",
64+
"inject-loader": "^2.0.1",
65+
"babel-plugin-istanbul": "^3.1.2",
66+
"phantomjs-prebuilt": "^2.1.14",
67+
"chromedriver": "^2.27.2",
68+
"cross-spawn": "^5.0.1",
6769
"nightwatch": "^0.9.12",
70+
"selenium-server": "^3.0.1",
71+
"semver": "^5.3.0",
6872
"opn": "^4.0.2",
6973
"optimize-css-assets-webpack-plugin": "^1.3.0",
7074
"ora": "^1.1.0",
71-
"phantomjs-prebuilt": "^2.1.14",
7275
"rimraf": "^2.6.0",
73-
"selenium-server": "^3.0.1",
74-
"semver": "^5.3.0",
75-
"sinon": "^1.17.7",
76-
"sinon-chai": "^2.8.0",
77-
"ts-loader": "^2.0.0",
7876
"url-loader": "^0.5.7",
79-
"vue-class-component": "^4.4.0",
8077
"vue-loader": "^11.0.0",
81-
"vue-property-decorator": "^3.4.0",
8278
"vue-style-loader": "^2.0.0",
8379
"vue-template-compiler": "^2.1.10",
8480
"webpack": "^2.2.1",
85-
"webpack-bundle-analyzer": "^2.2.1",
8681
"webpack-dev-middleware": "^1.10.0",
8782
"webpack-hot-middleware": "^2.16.1",
8883
"webpack-merge": "^2.6.1"

src/VueJsTypeScriptAspNetCoreSample/project.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{
1+
{
22
"dependencies": {
33
"Microsoft.NETCore.App": {
44
"version": "1.1.0",
@@ -61,10 +61,7 @@
6161
},
6262

6363
"scripts": {
64-
"prepublish": [
65-
"npm install",
66-
"npm run build"
67-
],
64+
"prepublish": [ "bower install", "dotnet bundle" ],
6865
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
6966
}
7067
}

src/VueJsTypeScriptAspNetCoreSample/src/App.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/VueJsTypeScriptAspNetCoreSample/src/App.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
</div>
66
</template>
77

8-
<script lang="ts">
9-
import App from "./App.ts";
10-
export default App;
8+
<script>
9+
export default {
10+
name: 'app'
11+
}
1112
</script>
1213

1314
<style>

src/VueJsTypeScriptAspNetCoreSample/src/components/Hello.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)