Skip to content

Commit d17bc97

Browse files
committed
chore(aspenetcore): update aspnetcore projects for 1.0
1 parent 6ba0231 commit d17bc97

File tree

25 files changed

+57
-3584
lines changed

25 files changed

+57
-3584
lines changed

skeleton-esnext-aspnetcore/src/skeleton/Program.cs

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

skeleton-esnext-aspnetcore/src/skeleton/Startup.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using Microsoft.AspNetCore.Builder;
1+
using System.IO;
2+
using Microsoft.AspNetCore.Builder;
23
using Microsoft.AspNetCore.Hosting;
34
using Microsoft.Extensions.Configuration;
45
using Microsoft.Extensions.DependencyInjection;
@@ -8,6 +9,18 @@ namespace skeleton
89
{
910
public class Startup
1011
{
12+
public static void Main(string[] args)
13+
{
14+
var host = new WebHostBuilder()
15+
.UseKestrel()
16+
.UseContentRoot(Directory.GetCurrentDirectory())
17+
.UseIISIntegration()
18+
.UseStartup<Startup>()
19+
.Build();
20+
21+
host.Run();
22+
}
23+
1124
public Startup(IHostingEnvironment env)
1225
{
1326
var builder = new ConfigurationBuilder()

skeleton-esnext-aspnetcore/src/skeleton/bower.json

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

skeleton-esnext-aspnetcore/src/skeleton/build/bundles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module.exports = {
2929
"aurelia-logging-console",
3030
"bootstrap",
3131
"bootstrap/css/bootstrap.css!text",
32-
"jquery"
32+
"fetch"
3333
],
3434
"options": {
3535
"inject": true,

skeleton-esnext-aspnetcore/src/skeleton/build/tasks/build.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,14 @@ gulp.task('build-css', function() {
4040
.pipe(gulp.dest(paths.output))
4141
});
4242

43-
// runs jspm install from within Gulp
44-
gulp.task('build-jspm', function () {
45-
exec('jspm install', function (err, stout, stderr) {
46-
});
47-
});
48-
4943
// this task calls the clean task (located
5044
// in ./clean.js), then runs the build-system
5145
// and build-html tasks in parallel
5246
// https://www.npmjs.com/package/gulp-run-sequence
5347
gulp.task('build', function(callback) {
5448
return runSequence(
5549
'clean',
56-
['build-system', 'build-html', 'build-css', 'build-jspm'],
50+
['build-system', 'build-html', 'build-css'],
5751
callback
5852
);
5953
});

skeleton-esnext-aspnetcore/src/skeleton/build/tasks/watch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function reportChange(event) {
1111
// to js, html, and css files and call the
1212
// reportChange method. Also, by depending on the
1313
// serve task, it will instantiate a browserSync session
14-
gulp.task('watch', ['serve'], function() {
14+
gulp.task('watch', ['build'], function() {
1515
gulp.watch(paths.source, ['build-system', browserSync.reload]).on('change', reportChange);
1616
gulp.watch(paths.html, ['build-html', browserSync.reload]).on('change', reportChange);
1717
gulp.watch(paths.css, ['build-css']).on('change', reportChange);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// <binding BeforeBuild='clean, build-system, build-html, build-css, build-jspm' Clean='clean' ProjectOpened='watch' />
1+
/// <binding BeforeBuild='build' Clean='clean' ProjectOpened='watch' />
22
// all gulp tasks are located in the ./build/tasks directory
33
// gulp configuration is in files in ./build directory
44
require('require-dir')('build/tasks');

skeleton-esnext-aspnetcore/src/skeleton/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"vscode"
6060
],
6161
"scripts": {
62+
"postinstall": "./node_modules/.bin/jspm install -y",
6263
"test": "gulp test",
6364
"e2e": "gulp serve e2e"
6465
},

skeleton-esnext-aspnetcore/src/skeleton/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
},
106106

107107
"scripts": {
108-
"prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ],
108+
"prepublish": [ "npm install", "gulp build"],
109109
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
110110
}
111111
}

skeleton-esnext-aspnetcore/src/skeleton/src/welcome.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//import {computedFrom} from 'aurelia-framework';
22

33
export class Welcome {
4-
heading = 'Welcome to the Aurelia Navigation App [skeleton-esnext-aspnetcore]!';
4+
heading = 'Welcome to the Aurelia Navigation App!';
55
firstName = 'John';
66
lastName = 'Doe';
77
previousValue = this.fullName;

skeleton-esnext-aspnetcore/src/skeleton/wwwroot/config.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
System.config({
22
defaultJSExtensions: true,
3-
transpiler: "babel",
4-
babelOptions: {
5-
"optional": [
6-
"runtime",
7-
"optimisation.modules.system"
8-
]
9-
},
3+
transpiler: false,
104
paths: {
115
"*": "dist/*",
126
"github:*": "jspm_packages/github/*",
137
"npm:*": "jspm_packages/npm/*"
148
},
15-
169
map: {
1710
"aurelia-animator-css": "npm:[email protected]",
1811
"aurelia-bootstrapper": "npm:[email protected]",
@@ -219,4 +212,4 @@ System.config({
219212
"indexof": "npm:[email protected]"
220213
}
221214
}
222-
});
215+
});

skeleton-typescript-aspnetcore/src/skeleton/Program.cs

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

skeleton-typescript-aspnetcore/src/skeleton/Startup.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,24 @@
33
using Microsoft.Extensions.Configuration;
44
using Microsoft.Extensions.DependencyInjection;
55
using Microsoft.Extensions.Logging;
6+
using System.IO;
67

78
namespace skeleton
89
{
910
public class Startup
1011
{
12+
public static void Main(string[] args)
13+
{
14+
var host = new WebHostBuilder()
15+
.UseKestrel()
16+
.UseContentRoot(Directory.GetCurrentDirectory())
17+
.UseIISIntegration()
18+
.UseStartup<Startup>()
19+
.Build();
20+
21+
host.Run();
22+
}
23+
1124
public Startup(IHostingEnvironment env)
1225
{
1326
var builder = new ConfigurationBuilder()

skeleton-typescript-aspnetcore/src/skeleton/build/bundles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module.exports = {
2929
"aurelia-logging-console",
3030
"bootstrap",
3131
"bootstrap/css/bootstrap.css!text",
32-
"jquery"
32+
"fetch"
3333
],
3434
"options": {
3535
"inject": true,

skeleton-typescript-aspnetcore/src/skeleton/build/paths.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ module.exports = {
1616
e2eSpecsSrc: 'test/e2e/src/**/*.ts',
1717
e2eSpecsDist: 'test/e2e/dist/',
1818
dtsSrc: [
19-
'typings/browser/**/*.d.ts',
20-
'custom_typings/**/*.d.ts',
21-
'./wwwroot/jspm_packages/**/*.d.ts'
19+
'typings/**/*.d.ts',
20+
'custom_typings/**/*.d.ts'
2221
]
2322
}

skeleton-typescript-aspnetcore/src/skeleton/build/tasks/build.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,6 @@ gulp.task('build-css', function() {
4545
.pipe(gulp.dest(paths.output));
4646
});
4747

48-
// runs jspm install from within Gulp
49-
gulp.task('build-jspm', function () {
50-
exec('jspm install', function (err, stout, stderr) {
51-
});
52-
});
53-
5448
// this task calls the clean task (located
5549
// in ./clean.js), then runs the build-system
5650
// and build-html tasks in parallel

skeleton-typescript-aspnetcore/src/skeleton/build/tasks/watch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function reportChange(event) {
1111
// to js, html, and css files and call the
1212
// reportChange method. Also, by depending on the
1313
// serve task, it will instantiate a browserSync session
14-
gulp.task('watch', ['serve'], function() {
14+
gulp.task('watch', ['build'], function() {
1515
gulp.watch(paths.source, ['build-system', browserSync.reload]).on('change', reportChange);
1616
gulp.watch(paths.html, ['build-html', browserSync.reload]).on('change', reportChange);
1717
gulp.watch(paths.css, ['build-css']).on('change', reportChange);

0 commit comments

Comments
 (0)