Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit 5cacdec

Browse files
committed
templates: (JS/TS) change ' to "
I have changed all ' to " in ClientApp and webpack.config.* files
1 parent a0ebab1 commit 5cacdec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+413
-413
lines changed

templates/Angular2Spa/ClientApp/app/app.module.ts

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { NgModule } from '@angular/core';
2-
import { RouterModule } from '@angular/router';
3-
import { UniversalModule } from 'angular2-universal';
4-
import { AppComponent } from './components/app/app.component'
5-
import { NavMenuComponent } from './components/navmenu/navmenu.component';
6-
import { HomeComponent } from './components/home/home.component';
7-
import { FetchDataComponent } from './components/fetchdata/fetchdata.component';
8-
import { CounterComponent } from './components/counter/counter.component';
1+
import { NgModule } from "@angular/core";
2+
import { RouterModule } from "@angular/router";
3+
import { UniversalModule } from "angular2-universal";
4+
import { AppComponent } from "./components/app/app.component";
5+
import { NavMenuComponent } from "./components/navmenu/navmenu.component";
6+
import { HomeComponent } from "./components/home/home.component";
7+
import { FetchDataComponent } from "./components/fetchdata/fetchdata.component";
8+
import { CounterComponent } from "./components/counter/counter.component";
99

1010
@NgModule({
1111
bootstrap: [ AppComponent ],
@@ -19,11 +19,11 @@ import { CounterComponent } from './components/counter/counter.component';
1919
imports: [
2020
UniversalModule, // Must be first import. This automatically imports BrowserModule, HttpModule, and JsonpModule too.
2121
RouterModule.forRoot([
22-
{ path: '', redirectTo: 'home', pathMatch: 'full' },
23-
{ path: 'home', component: HomeComponent },
24-
{ path: 'counter', component: CounterComponent },
25-
{ path: 'fetch-data', component: FetchDataComponent },
26-
{ path: '**', redirectTo: 'home' }
22+
{ path: "", redirectTo: "home", pathMatch: "full" },
23+
{ path: "home", component: HomeComponent },
24+
{ path: "counter", component: CounterComponent },
25+
{ path: "fetch-data", component: FetchDataComponent },
26+
{ path: "**", redirectTo: "home" }
2727
])
2828
]
2929
})
+10-10
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
import 'angular2-universal-polyfills/browser';
2-
import { enableProdMode } from '@angular/core';
3-
import { platformUniversalDynamic } from 'angular2-universal';
4-
import { AppModule } from './app/app.module';
5-
import 'bootstrap';
1+
import "angular2-universal-polyfills/browser";
2+
import { enableProdMode } from "@angular/core";
3+
import { platformUniversalDynamic } from "angular2-universal";
4+
import { AppModule } from "./app/app.module";
5+
import "bootstrap";
66

77
// Enable either Hot Module Reloading or production mode
8-
if (module['hot']) {
9-
module['hot'].accept();
10-
module['hot'].dispose(() => { platform.destroy(); });
8+
if (module["hot"]) {
9+
module["hot"].accept();
10+
module["hot"].dispose(() => { platform.destroy(); });
1111
} else {
1212
enableProdMode();
1313
}
1414

1515
// Boot the application, either now or when the DOM content is loaded
1616
const platform = platformUniversalDynamic();
1717
const bootApplication = () => { platform.bootstrapModule(AppModule); };
18-
if (document.readyState === 'complete') {
18+
if (document.readyState === "complete") {
1919
bootApplication();
2020
} else {
21-
document.addEventListener('DOMContentLoaded', bootApplication);
21+
document.addEventListener("DOMContentLoaded", bootApplication);
2222
}

templates/Angular2Spa/ClientApp/boot-server.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
import 'angular2-universal-polyfills';
2-
import 'zone.js';
3-
import { enableProdMode } from '@angular/core';
4-
import { platformNodeDynamic } from 'angular2-universal';
5-
import { AppModule } from './app/app.module';
1+
import "angular2-universal-polyfills";
2+
import "zone.js";
3+
import { enableProdMode } from "@angular/core";
4+
import { platformNodeDynamic } from "angular2-universal";
5+
import { AppModule } from "./app/app.module";
66

77
enableProdMode();
88
const platform = platformNodeDynamic();
99

10-
export default function (params: any) : Promise<{ html: string, globals?: any }> {
10+
export default function (params: any): Promise<{ html: string, globals?: any }> {
1111
return new Promise((resolve, reject) => {
1212
const requestZone = Zone.current.fork({
13-
name: 'angular-universal request',
13+
name: "angular-universal request",
1414
properties: {
15-
baseUrl: '/',
15+
baseUrl: "/",
1616
requestUrl: params.url,
1717
originUrl: params.origin,
1818
preboot: false,
1919
// TODO: Render just the <app> component instead of wrapping it inside an extra HTML document
2020
// Waiting on https://github.com/angular/universal/issues/347
21-
document: '<!DOCTYPE html><html><head></head><body><app></app></body></html>'
21+
document: "<!DOCTYPE html><html><head></head><body><app></app></body></html>"
2222
},
2323
onHandleError: (parentZone, currentZone, targetZone, error) => {
2424
// If any error occurs while rendering the module, reject the whole operation

templates/Angular2Spa/webpack.config.js

+21-21
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
var isDevBuild = process.argv.indexOf('--env.prod') < 0;
2-
var path = require('path');
3-
var webpack = require('webpack');
4-
var nodeExternals = require('webpack-node-externals');
5-
var merge = require('webpack-merge');
1+
var isDevBuild = process.argv.indexOf("--env.prod") < 0;
2+
var path = require("path");
3+
var webpack = require("webpack");
4+
var nodeExternals = require("webpack-node-externals");
5+
var merge = require("webpack-merge");
66
var allFilenamesExceptJavaScript = /\.(?!js(\?|$))([^.]+(\?|$))/;
77

88
// Configuration in common to both client-side and server-side bundles
99
var sharedConfig = {
10-
resolve: { extensions: [ '', '.js', '.ts' ] },
10+
resolve: { extensions: [ "", ".js", ".ts" ] },
1111
output: {
12-
filename: '[name].js',
13-
publicPath: '/dist/' // Webpack dev middleware, if enabled, handles requests for this URL prefix
12+
filename: "[name].js",
13+
publicPath: "/dist/" // Webpack dev middleware, if enabled, handles requests for this URL prefix
1414
},
1515
module: {
1616
loaders: [
17-
{ test: /\.ts$/, include: /ClientApp/, loader: 'ts', query: { silent: true } },
18-
{ test: /\.html$/, loader: 'raw' },
19-
{ test: /\.css$/, loader: 'to-string!css' },
20-
{ test: /\.(png|jpg|jpeg|gif|svg)$/, loader: 'url', query: { limit: 25000 } }
17+
{ test: /\.ts$/, include: /ClientApp/, loader: "ts", query: { silent: true } },
18+
{ test: /\.html$/, loader: "raw" },
19+
{ test: /\.css$/, loader: "to-string!css" },
20+
{ test: /\.(png|jpg|jpeg|gif|svg)$/, loader: "url", query: { limit: 25000 } }
2121
]
2222
}
2323
};
2424

2525
// Configuration for client-side bundle suitable for running in browsers
2626
var clientBundleConfig = merge(sharedConfig, {
27-
entry: { 'main-client': './ClientApp/boot-client.ts' },
28-
output: { path: path.join(__dirname, './wwwroot/dist') },
29-
devtool: isDevBuild ? 'inline-source-map' : null,
27+
entry: { "main-client": "./ClientApp/boot-client.ts" },
28+
output: { path: path.join(__dirname, "./wwwroot/dist") },
29+
devtool: isDevBuild ? "inline-source-map" : null,
3030
plugins: [
3131
new webpack.DllReferencePlugin({
3232
context: __dirname,
33-
manifest: require('./wwwroot/dist/vendor-manifest.json')
33+
manifest: require("./wwwroot/dist/vendor-manifest.json")
3434
})
3535
].concat(isDevBuild ? [] : [
3636
// Plugins that apply in production builds only
@@ -41,13 +41,13 @@ var clientBundleConfig = merge(sharedConfig, {
4141

4242
// Configuration for server-side (prerendering) bundle suitable for running in Node
4343
var serverBundleConfig = merge(sharedConfig, {
44-
entry: { 'main-server': './ClientApp/boot-server.ts' },
44+
entry: { "main-server": "./ClientApp/boot-server.ts" },
4545
output: {
46-
libraryTarget: 'commonjs',
47-
path: path.join(__dirname, './ClientApp/dist')
46+
libraryTarget: "commonjs",
47+
path: path.join(__dirname, "./ClientApp/dist")
4848
},
49-
target: 'node',
50-
devtool: 'inline-source-map',
49+
target: "node",
50+
devtool: "inline-source-map",
5151
externals: [nodeExternals({ whitelist: [allFilenamesExceptJavaScript] })] // Don't bundle .js files from node_modules
5252
});
5353

templates/Angular2Spa/webpack.config.vendor.js

+30-30
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
1-
var isDevBuild = process.argv.indexOf('--env.prod') < 0;
2-
var path = require('path');
3-
var webpack = require('webpack');
4-
var ExtractTextPlugin = require('extract-text-webpack-plugin');
5-
var extractCSS = new ExtractTextPlugin('vendor.css');
1+
var isDevBuild = process.argv.indexOf("--env.prod") < 0;
2+
var path = require("path");
3+
var webpack = require("webpack");
4+
var ExtractTextPlugin = require("extract-text-webpack-plugin");
5+
var extractCSS = new ExtractTextPlugin("vendor.css");
66

77
module.exports = {
88
resolve: {
9-
extensions: [ '', '.js' ]
9+
extensions: [ "", ".js" ]
1010
},
1111
module: {
1212
loaders: [
13-
{ test: /\.(png|woff|woff2|eot|ttf|svg)(\?|$)/, loader: 'url-loader?limit=100000' },
14-
{ test: /\.css(\?|$)/, loader: extractCSS.extract(['css']) }
13+
{ test: /\.(png|woff|woff2|eot|ttf|svg)(\?|$)/, loader: "url-loader?limit=100000" },
14+
{ test: /\.css(\?|$)/, loader: extractCSS.extract(["css"]) }
1515
]
1616
},
1717
entry: {
1818
vendor: [
19-
'@angular/common',
20-
'@angular/compiler',
21-
'@angular/core',
22-
'@angular/http',
23-
'@angular/platform-browser',
24-
'@angular/platform-browser-dynamic',
25-
'@angular/router',
26-
'@angular/platform-server',
27-
'angular2-universal',
28-
'angular2-universal-polyfills',
29-
'bootstrap',
30-
'bootstrap/dist/css/bootstrap.css',
31-
'es6-shim',
32-
'es6-promise',
33-
'jquery',
34-
'zone.js',
19+
"@angular/common",
20+
"@angular/compiler",
21+
"@angular/core",
22+
"@angular/http",
23+
"@angular/platform-browser",
24+
"@angular/platform-browser-dynamic",
25+
"@angular/router",
26+
"@angular/platform-server",
27+
"angular2-universal",
28+
"angular2-universal-polyfills",
29+
"bootstrap",
30+
"bootstrap/dist/css/bootstrap.css",
31+
"es6-shim",
32+
"es6-promise",
33+
"jquery",
34+
"zone.js",
3535
]
3636
},
3737
output: {
38-
path: path.join(__dirname, 'wwwroot', 'dist'),
39-
filename: '[name].js',
40-
library: '[name]_[hash]',
38+
path: path.join(__dirname, "wwwroot", "dist"),
39+
filename: "[name].js",
40+
library: "[name]_[hash]",
4141
},
4242
plugins: [
4343
extractCSS,
44-
new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery' }), // Maps these identifiers to the jQuery package (because Bootstrap expects it to be a global variable)
44+
new webpack.ProvidePlugin({ $: "jquery", jQuery: "jquery" }), // Maps these identifiers to the jQuery package (because Bootstrap expects it to be a global variable)
4545
new webpack.optimize.OccurenceOrderPlugin(),
4646
new webpack.DllPlugin({
47-
path: path.join(__dirname, 'wwwroot', 'dist', '[name]-manifest.json'),
48-
name: '[name]_[hash]'
47+
path: path.join(__dirname, "wwwroot", "dist", "[name]-manifest.json"),
48+
name: "[name]_[hash]"
4949
})
5050
].concat(isDevBuild ? [] : [
5151
new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false } })

templates/KnockoutSpa/ClientApp/boot.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import './css/site.css';
2-
import * as ko from 'knockout';
3-
import { createHistory } from 'history';
4-
import './webpack-component-loader';
5-
import AppRootComponent from './components/app-root/app-root';
1+
import "./css/site.css";
2+
import * as ko from "knockout";
3+
import { createHistory } from "history";
4+
import "./webpack-component-loader";
5+
import AppRootComponent from "./components/app-root/app-root";
66

77
// Load and register the <app-root> component
8-
ko.components.register('app-root', AppRootComponent);
8+
ko.components.register("app-root", AppRootComponent);
99

1010
// Tell Knockout to start up an instance of your application
1111
ko.applyBindings({ history: createHistory() });
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import * as ko from 'knockout';
2-
import { Route, Router } from '../../router';
3-
import navMenu from '../nav-menu/nav-menu';
1+
import * as ko from "knockout";
2+
import { Route, Router } from "../../router";
3+
import navMenu from "../nav-menu/nav-menu";
44

55
// Declare the client-side routing configuration
66
const routes: Route[] = [
7-
{ url: '', params: { page: 'home-page' } },
8-
{ url: 'counter', params: { page: 'counter-example' } },
9-
{ url: 'fetch-data', params: { page: 'fetch-data' } }
7+
{ url: "", params: { page: "home-page" } },
8+
{ url: "counter", params: { page: "counter-example" } },
9+
{ url: "fetch-data", params: { page: "fetch-data" } }
1010
];
1111

1212
class AppRootViewModel {
@@ -15,17 +15,17 @@ class AppRootViewModel {
1515

1616
constructor(params: { history: HistoryModule.History }) {
1717
// Activate the client-side router
18-
this._router = new Router(params.history, routes)
18+
this._router = new Router(params.history, routes);
1919
this.route = this._router.currentRoute;
2020

2121
// Load and register all the KO components needed to handle the routes
22-
// The optional 'bundle?lazy!' prefix is a Webpack feature that causes the referenced modules
22+
// The optional "bundle?lazy!" prefix is a Webpack feature that causes the referenced modules
2323
// to be split into separate files that are then loaded on demand.
2424
// For docs, see https://github.com/webpack/bundle-loader
25-
ko.components.register('nav-menu', navMenu);
26-
ko.components.register('home-page', require('bundle?lazy!../home-page/home-page'));
27-
ko.components.register('counter-example', require('bundle?lazy!../counter-example/counter-example'));
28-
ko.components.register('fetch-data', require('bundle?lazy!../fetch-data/fetch-data'));
25+
ko.components.register("nav-menu", navMenu);
26+
ko.components.register("home-page", require("bundle?lazy!../home-page/home-page"));
27+
ko.components.register("counter-example", require("bundle?lazy!../counter-example/counter-example"));
28+
ko.components.register("fetch-data", require("bundle?lazy!../fetch-data/fetch-data"));
2929
}
3030

3131
// To support hot module replacement, this method unregisters the router and KO components.
@@ -40,4 +40,4 @@ class AppRootViewModel {
4040
}
4141
}
4242

43-
export default { viewModel: AppRootViewModel, template: require('./app-root.html') };
43+
export default { viewModel: AppRootViewModel, template: require("./app-root.html") };

templates/KnockoutSpa/ClientApp/components/counter-example/counter-example.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as ko from 'knockout';
1+
import * as ko from "knockout";
22

33
class CounterExampleViewModel {
44
public currentCount = ko.observable(0);
@@ -9,4 +9,4 @@ class CounterExampleViewModel {
99
}
1010
}
1111

12-
export default { viewModel: CounterExampleViewModel, template: require('./counter-example.html') };
12+
export default { viewModel: CounterExampleViewModel, template: require("./counter-example.html") };

templates/KnockoutSpa/ClientApp/components/fetch-data/fetch-data.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as ko from 'knockout';
2-
import 'isomorphic-fetch';
1+
import * as ko from "knockout";
2+
import "isomorphic-fetch";
33

44
interface WeatherForecast {
55
dateFormatted: string;
@@ -12,12 +12,12 @@ class FetchDataViewModel {
1212
public forecasts = ko.observableArray<WeatherForecast>();
1313

1414
constructor() {
15-
fetch('/api/SampleData/WeatherForecasts')
15+
fetch("/api/SampleData/WeatherForecasts")
1616
.then(response => response.json())
1717
.then((data: WeatherForecast[]) => {
1818
this.forecasts(data);
1919
});
2020
}
2121
}
2222

23-
export default { viewModel: FetchDataViewModel, template: require('./fetch-data.html') };
23+
export default { viewModel: FetchDataViewModel, template: require("./fetch-data.html") };
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import * as ko from 'knockout';
1+
import * as ko from "knockout";
22

33
class HomePageViewModel {
44
}
55

6-
export default { viewModel: HomePageViewModel, template: require('./home-page.html') };
6+
export default { viewModel: HomePageViewModel, template: require("./home-page.html") };

templates/KnockoutSpa/ClientApp/components/nav-menu/nav-menu.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as ko from 'knockout';
2-
import { Route } from '../../router';
1+
import * as ko from "knockout";
2+
import { Route } from "../../router";
33

44
interface NavMenuParams {
55
route: KnockoutObservable<Route>;
@@ -16,4 +16,4 @@ class NavMenuViewModel {
1616
}
1717
}
1818

19-
export default { viewModel: NavMenuViewModel, template: require('./nav-menu.html') };
19+
export default { viewModel: NavMenuViewModel, template: require("./nav-menu.html") };

0 commit comments

Comments
 (0)