Skip to content

Commit 0c5eabc

Browse files
Switch to Webpack
1 parent 30cb9d3 commit 0c5eabc

File tree

18 files changed

+104
-105
lines changed

18 files changed

+104
-105
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["es2015"]
3+
}

templates/WebApplicationBasic/.bowerrc

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

templates/WebApplicationBasic/.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ bld/
2424

2525
# Visual Studio 2015 cache/options directory
2626
.vs/
27-
# Uncomment if you have tasks that create the project's static files in wwwroot
28-
#wwwroot/
27+
/wwwroot/dist/
2928

3029
# MSTest test Results
3130
[Tt]est[Rr]esult*/
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import 'bootstrap/dist/css/bootstrap.css';
2+
import './css/site.css';
3+
4+
// Replace with your TypeScript code
5+
console.log('Hello, world!');
File renamed without changes.

templates/WebApplicationBasic/Views/Home/Index.cshtml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,7 @@
108108
</ul>
109109
</div>
110110
</div>
111+
112+
@section scripts {
113+
<script src="~/dist/main.js" asp-append-version="true"></script>
114+
}

templates/WebApplicationBasic/Views/Shared/_Layout.cshtml

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,8 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>@ViewData["Title"] - WebApplicationBasic</title>
77

8-
<environment names="Development">
9-
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
10-
<link rel="stylesheet" href="~/css/site.css" />
11-
</environment>
128
<environment names="Staging,Production">
13-
<link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.5/css/bootstrap.min.css"
14-
asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"
15-
asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" />
16-
<link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
9+
<link rel="stylesheet" href="~/dist/site.css" />
1710
</environment>
1811
</head>
1912
<body>
@@ -45,23 +38,7 @@
4538
</footer>
4639
</div>
4740

48-
<environment names="Development">
49-
<script src="~/lib/jquery/dist/jquery.js"></script>
50-
<script src="~/lib/bootstrap/dist/js/bootstrap.js"></script>
51-
<script src="~/js/site.js" asp-append-version="true"></script>
52-
</environment>
53-
<environment names="Staging,Production">
54-
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.1.4.min.js"
55-
asp-fallback-src="~/lib/jquery/dist/jquery.min.js"
56-
asp-fallback-test="window.jQuery">
57-
</script>
58-
<script src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.5/bootstrap.min.js"
59-
asp-fallback-src="~/lib/bootstrap/dist/js/bootstrap.min.js"
60-
asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal">
61-
</script>
62-
<script src="~/js/site.min.js" asp-append-version="true"></script>
63-
</environment>
64-
41+
<script src="~/dist/vendor.js" asp-append-version="true"></script>
6542
@RenderSection("scripts", required: false)
6643
</body>
6744
</html>

templates/WebApplicationBasic/bower.json

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

templates/WebApplicationBasic/gulpfile.js

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

templates/WebApplicationBasic/package.json

100755100644
Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
1-
{
2-
"name": "WebApplicationBasic",
3-
"version": "0.0.0",
4-
"devDependencies": {
5-
"gulp": "^3.9.0",
6-
"gulp-concat": "2.5.2",
7-
"gulp-cssmin": "0.1.7",
8-
"gulp-uglify": "1.2.0",
9-
"rimraf": "2.2.8"
10-
}
11-
}
1+
{
2+
"name": "WebApplicationBasic",
3+
"version": "0.0.0",
4+
"devDependencies": {
5+
"babel-loader": "^6.2.3",
6+
"babel-preset-es2015": "^6.5.0",
7+
"bootstrap": "^3.3.6",
8+
"css-loader": "^0.23.1",
9+
"extendify": "^1.0.0",
10+
"extract-text-webpack-plugin": "^1.0.1",
11+
"file-loader": "^0.8.5",
12+
"jquery": "^2.2.1",
13+
"style-loader": "^0.13.0",
14+
"ts-loader": "^0.8.1",
15+
"typescript": "^1.8.2",
16+
"url-loader": "^0.5.7",
17+
"webpack": "^1.12.14"
18+
},
19+
"dependencies": {
20+
"babel-core": "^6.5.2"
21+
}
22+
}

0 commit comments

Comments
 (0)