Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit ae55991

Browse files
committed
refactor: fix lint issues
1 parent 898d442 commit ae55991

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

Diff for: webpack.common.js.angular.template

+13-13
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,24 @@ module.exports = function (platform, destinationApp) {
1212
destinationApp = nsWebpack.getAppPath(platform);
1313
}
1414
var entry = {};
15-
//Discover entry module from package.json
15+
// Discover entry module from package.json
1616
entry.bundle = "./" + nsWebpack.getEntryModule();
1717
//Vendor entry with third party libraries.
1818
entry.vendor = "./vendor";
19-
//app.css bundle
19+
// app.css bundle
2020
entry["app.css"] = "./app.css";
2121

2222
var plugins = [
2323
new ExtractTextPlugin("app.css"),
24-
//Vendor libs go to the vendor.js chunk
24+
// Vendor libs go to the vendor.js chunk
2525
new webpack.optimize.CommonsChunkPlugin({
2626
name: ["vendor"]
2727
}),
28-
//Define useful constants like TNS_WEBPACK
28+
// Define useful constants like TNS_WEBPACK
2929
new webpack.DefinePlugin({
3030
"global.TNS_WEBPACK": "true",
3131
}),
32-
//Copy assets to out dir. Add your own globs as needed.
32+
// Copy assets to out dir. Add your own globs as needed.
3333
new CopyWebpackPlugin([
3434
{ from: "app.css" },
3535
{ from: "css/**" },
@@ -38,13 +38,13 @@ module.exports = function (platform, destinationApp) {
3838
{ from: "**/*.png" },
3939
{ from: "**/*.xml" },
4040
], { ignore: ["App_Resources/**"] }),
41-
//Generate a bundle starter script and activate it in package.json
41+
// Generate a bundle starter script and activate it in package.json
4242
new nsWebpack.GenerateBundleStarterPlugin([
4343
"./vendor",
4444
"./bundle",
4545
]),
4646

47-
//Angular AOT compiler
47+
// Angular AOT compiler
4848
new AotPlugin({
4949
tsConfigPath: "tsconfig.aot.json",
5050
entryModule: path.resolve(__dirname, "app/app.module#AppModule"),
@@ -58,7 +58,7 @@ module.exports = function (platform, destinationApp) {
5858
minimize: true
5959
}));
6060

61-
//Work around an Android issue by setting compress = false
61+
// Work around an Android issue by setting compress = false
6262
var compress = platform !== "android";
6363
plugins.push(new webpack.optimize.UglifyJsPlugin({
6464
mangle: {
@@ -79,7 +79,7 @@ module.exports = function (platform, destinationApp) {
7979
filename: "[name].js",
8080
},
8181
resolve: {
82-
//Resolve platform-specific modules like module.android.js
82+
// Resolve platform-specific modules like module.android.js
8383
extensions: [
8484
".aot.ts",
8585
".ts",
@@ -89,14 +89,14 @@ module.exports = function (platform, destinationApp) {
8989
"." + platform + ".js",
9090
"." + platform + ".css",
9191
],
92-
//Resolve {N} system modules from tns-core-modules
92+
// Resolve {N} system modules from tns-core-modules
9393
modules: [
9494
"node_modules/tns-core-modules",
95-
"node_modules"
95+
"node_modules",
9696
]
9797
},
9898
node: {
99-
//Disable node shims that conflict with NativeScript
99+
// Disable node shims that conflict with NativeScript
100100
"http": false,
101101
"timers": false,
102102
"setImmediate": false,
@@ -141,7 +141,7 @@ module.exports = function (platform, destinationApp) {
141141
loaders: [
142142
"raw-loader",
143143
"resolve-url-loader",
144-
"sass-loader"
144+
"sass-loader",
145145
]
146146
},
147147
]

Diff for: webpack.common.js.nativescript.template

+15-15
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,28 @@ var ExtractTextPlugin = require("extract-text-webpack-plugin");
77

88
module.exports = function (platform, destinationApp) {
99
if (!destinationApp) {
10-
//Default destination inside platforms/<platform>/...
10+
// Default destination inside platforms/<platform>/...
1111
destinationApp = nsWebpack.getAppPath(platform);
1212
}
1313
var entry = {};
14-
//Discover entry module from package.json
14+
// Discover entry module from package.json
1515
entry.bundle = "./" + nsWebpack.getEntryModule();
16-
//Vendor entry with third party libraries.
16+
// Vendor entry with third party libraries.
1717
entry.vendor = "./vendor";
18-
//app.css bundle
18+
// app.css bundle
1919
entry["app.css"] = "./app.css";
2020

2121
var plugins = [
2222
new ExtractTextPlugin("app.css"),
23-
//Vendor libs go to the vendor.js chunk
23+
// Vendor libs go to the vendor.js chunk
2424
new webpack.optimize.CommonsChunkPlugin({
2525
name: ["vendor"]
2626
}),
27-
//Define useful constants like TNS_WEBPACK
27+
// Define useful constants like TNS_WEBPACK
2828
new webpack.DefinePlugin({
2929
"global.TNS_WEBPACK": "true",
3030
}),
31-
//Copy assets to out dir. Add your own globs as needed.
31+
// Copy assets to out dir. Add your own globs as needed.
3232
new CopyWebpackPlugin([
3333
{ from: "app.css" },
3434
{ from: "css/**" },
@@ -37,7 +37,7 @@ module.exports = function (platform, destinationApp) {
3737
{ from: "**/*.png" },
3838
{ from: "**/*.xml" },
3939
], { ignore: ["App_Resources/**"] }),
40-
//Generate a bundle starter script and activate it in package.json
40+
// Generate a bundle starter script and activate it in package.json
4141
new nsWebpack.GenerateBundleStarterPlugin([
4242
"./vendor",
4343
"./bundle",
@@ -49,7 +49,7 @@ module.exports = function (platform, destinationApp) {
4949
minimize: true
5050
}));
5151

52-
//Work around an Android issue by setting compress = false
52+
// Work around an Android issue by setting compress = false
5353
var compress = platform !== "android";
5454
plugins.push(new webpack.optimize.UglifyJsPlugin({
5555
mangle: {
@@ -70,7 +70,7 @@ module.exports = function (platform, destinationApp) {
7070
filename: "[name].js",
7171
},
7272
resolve: {
73-
//Resolve platform-specific modules like module.android.js
73+
// Resolve platform-specific modules like module.android.js
7474
extensions: [
7575
".ts",
7676
".js",
@@ -79,14 +79,14 @@ module.exports = function (platform, destinationApp) {
7979
"." + platform + ".js",
8080
"." + platform + ".css",
8181
],
82-
//Resolve {N} system modules from tns-core-modules
82+
// Resolve {N} system modules from tns-core-modules
8383
modules: [
8484
"node_modules/tns-core-modules",
85-
"node_modules"
85+
"node_modules",
8686
]
8787
},
8888
node: {
89-
//Disable node shims that conflict with NativeScript
89+
// Disable node shims that conflict with NativeScript
9090
"http": false,
9191
"timers": false,
9292
"setImmediate": false,
@@ -119,7 +119,7 @@ module.exports = function (platform, destinationApp) {
119119
{
120120
test: /\.ts$/,
121121
loaders: [
122-
"awesome-typescript-loader"
122+
"awesome-typescript-loader",
123123
]
124124
},
125125
// SASS support
@@ -128,7 +128,7 @@ module.exports = function (platform, destinationApp) {
128128
loaders: [
129129
"raw-loader",
130130
"resolve-url-loader",
131-
"sass-loader"
131+
"sass-loader",
132132
]
133133
},
134134
]

0 commit comments

Comments
 (0)