Skip to content

Commit 1a41310

Browse files
committed
Enable Prettier on html and scss files
1 parent 27cc698 commit 1a41310

File tree

9 files changed

+59
-52
lines changed

9 files changed

+59
-52
lines changed

assets/layout/landing.html

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<main>
2323
<div id="example">
2424
<div id="ts">
25+
<!-- prettier-ignore -->
2526
<div class="example-item" id="ts-declarations"><b>// TS Declarations</b>
2627

2728
type Vector = [number, number, number];
@@ -32,6 +33,7 @@
3233
kill(): void;
3334
FindUnitsInRadius(radius: number): Unit[];
3435
}</div>
36+
<!-- prettier-ignore -->
3537
<div class="example-item" id="ts-source"><b>// TS Source</b>
3638

3739
function onSpellStart(caster: Unit, targetLocation: Vector): void {
@@ -43,6 +45,7 @@
4345
}
4446
}</div>
4547
</div>
48+
<!-- prettier-ignore -->
4649
<div class="example-item" id="lua"><b>-- Lua Output</b>
4750

4851
function onSpellStart(caster, targetLocation)
@@ -58,18 +61,20 @@
5861
<div id="features">
5962
<div class="feature-item">
6063
<div class="feature-header">Extend existing APIs</div>
61-
This project is useful in any environment where Lua code is accepted,
62-
with the powerful option of simply declaring any existing API using TypeScript declaration files.
64+
This project is useful in any environment where Lua code is accepted, with the powerful option of simply
65+
declaring any existing API using TypeScript declaration files.
6366
</div>
6467
<div class="feature-item">
6568
<div class="feature-header">Type Safety</div>
66-
Static types can ease the mental burden of writing programs, by automatically tracking information the programmer would otherwise have to track mentally in some fashion.
67-
Types serve as documentation for yourself and other programmers and provide a ‘gradient’ that tells you what terms make sense to write.
69+
Static types can ease the mental burden of writing programs, by automatically tracking information the
70+
programmer would otherwise have to track mentally in some fashion. Types serve as documentation for yourself
71+
and other programmers and provide a ‘gradient’ that tells you what terms make sense to write.
6872
</div>
6973
<div class="feature-item">
7074
<div class="feature-header">IDE Support</div>
71-
Types enable JavaScript developers to use highly-productive development tools and practices like static checking and code refactoring when developing JavaScript applications.
72-
TypeScript extensions are available for many text editors.
75+
Types enable JavaScript developers to use highly-productive development tools and practices like static
76+
checking and code refactoring when developing JavaScript applications. TypeScript extensions are available
77+
for many text editors.
7378
</div>
7479
</div>
75-
</main>
80+
</main>

assets/layout/play.html

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,9 @@
1313
</div>
1414
<div id="content">
1515
<div id="editor-container">
16-
<div id="editor-ts" class="editor">
17-
</div>
18-
<div id="editor-lua" class="editor editor-lua-active">
19-
</div>
20-
<div id="editor-lua-ast" class="editor">
21-
</div>
16+
<div id="editor-ts" class="editor"></div>
17+
<div id="editor-lua" class="editor editor-lua-active"></div>
18+
<div id="editor-lua-ast" class="editor"></div>
2219
<div id="editor-output" class="editor">
2320
<div id="editor-output-linenumbers">
2421
>_
@@ -27,9 +24,8 @@
2724
<div id="editor-output-terminal-header">
2825
TypeScriptToLua version ...
2926
</div>
30-
<div id="editor-output-terminal-content">
31-
</div>
27+
<div id="editor-output-terminal-content"></div>
3228
</div>
3329
</div>
3430
</div>
35-
</div>
31+
</div>

assets/layout/template.html

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
<head>
4-
<meta charset="UTF-8">
5-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6-
<meta http-equiv="X-UA-Compatible" content="ie=edge">
7-
<link rel="apple-touch-icon" sizes="180x180" href="<%= require('../images/favicons/apple-touch-icon.png') %>">
8-
<link rel="icon" type="image/png" sizes="32x32" href="<%= require('../images/favicons/favicon-32x32.png') %>">
9-
<link rel="icon" type="image/png" sizes="16x16" href="<%= require('../images/favicons/favicon-16x16.png') %>">
10-
<link rel="manifest" href="<%= require('../images/favicons/site.webmanifest') %>">
11-
<link rel="mask-icon" href="<%= require('../images/favicons/safari-pinned-tab.svg') %>" color="#418fd6">
12-
<meta name="msapplication-TileColor" content="#2d89ef">
13-
<meta name="theme-color" content="#ffffff">
14-
<title><%= htmlWebpackPlugin.options.title %></title>
15-
</head>
16-
<body>
17-
<%= require('html-loader!./' + htmlWebpackPlugin.options.contentFile ) %>
18-
</body>
19-
</html>
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
7+
<link rel="apple-touch-icon" sizes="180x180" href="<%= require('../images/favicons/apple-touch-icon.png') %>" />
8+
<link rel="icon" type="image/png" sizes="32x32" href="<%= require('../images/favicons/favicon-32x32.png') %>" />
9+
<link rel="icon" type="image/png" sizes="16x16" href="<%= require('../images/favicons/favicon-16x16.png') %>" />
10+
<link rel="manifest" href="<%= require('../images/favicons/site.webmanifest') %>" />
11+
<link rel="mask-icon" href="<%= require('../images/favicons/safari-pinned-tab.svg') %>" color="#418fd6" />
12+
<meta name="msapplication-TileColor" content="#2d89ef" />
13+
<meta name="theme-color" content="#ffffff" />
14+
<title><%= htmlWebpackPlugin.options.title %></title>
15+
</head>
16+
<body>
17+
<%= require('html-loader!./' + htmlWebpackPlugin.options.contentFile ) %>
18+
</body>
19+
</html>

assets/styles/_base.scss

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
@import 'fonts';
2-
@import 'colors';
1+
@import "fonts";
2+
@import "colors";
33

4-
html, body {
5-
width: 100%; height: 100%;
4+
html,
5+
body {
6+
width: 100%;
7+
height: 100%;
68
padding: 0px;
79
margin: 0px;
810
font-family: "Open Sans";
@@ -17,4 +19,4 @@ div {
1719
a {
1820
color: inherit;
1921
text-decoration: none;
20-
}
22+
}

assets/styles/_colors.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ $ts-blue: rgb(67, 119, 194);
33
$body-background: #1e1e1e;
44
$grey-accent: #333333;
55
$body-font-color: #ededed;
6-
$card-color: #1d2021;
6+
$card-color: #1d2021;

assets/styles/_fonts.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
@import url('https://fonts.googleapis.com/css?family=Open+Sans:300,400,700|Raleway:300,400,700|Source+Code+Pro');
1+
@import url("https://fonts.googleapis.com/css?family=Open+Sans:300,400,700|Raleway:300,400,700|Source+Code+Pro");
22

3-
$console-fonts: Menlo, Monaco, "Lucida Console", "Courier New", monospace;
3+
$console-fonts: Menlo, Monaco, "Lucida Console", "Courier New", monospace;

assets/styles/landing.scss

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
@import 'base';
1+
@import "base";
22

3-
main, header {
3+
main,
4+
header {
45
width: 900px;
56
overflow: hidden;
67
margin-left: auto;
@@ -50,7 +51,7 @@ nav {
5051
margin-top: 30px;
5152
margin-bottom: 20px;
5253
display: flex;
53-
flex-wrap: wrap;
54+
flex-wrap: wrap;
5455
}
5556

5657
.feature-item {
@@ -82,7 +83,8 @@ nav {
8283
width: 100%;
8384
}
8485

85-
#ts-declarations, #ts-source {
86+
#ts-declarations,
87+
#ts-source {
8688
display: inline-block;
8789
overflow: hidden;
8890
}
@@ -97,7 +99,8 @@ nav {
9799
}
98100

99101
@media screen and (max-width: 900px) {
100-
main, header {
102+
main,
103+
header {
101104
width: 100%;
102105
}
103106

@@ -129,4 +132,4 @@ nav {
129132
.feature-item {
130133
flex: 100%;
131134
}
132-
}
135+
}

assets/styles/play.scss

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
$header-height: 50px;
22
$output-height: 120px;
33

4-
@import 'base';
4+
@import "base";
55

66
#header {
77
width: 100%;
@@ -65,7 +65,7 @@ $output-height: 120px;
6565

6666
.editor {
6767
height: calc(100% - #{$output-height});
68-
background-color:$body-background;
68+
background-color: $body-background;
6969
color: white;
7070
display: inline-block;
7171
overflow: hidden;
@@ -88,11 +88,12 @@ $output-height: 120px;
8888
}
8989

9090
@media screen and (max-width: 600px) {
91-
#editor-ts, #editor-lua {
91+
#editor-ts,
92+
#editor-lua {
9293
flex: 100%;
9394
}
9495
}
95-
96+
9697
#editor-output {
9798
height: $output-height;
9899
flex: 100%;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"dev": "webpack-dev-server --mode development",
88
"deploy": "npm run build && npx gh-pages -d dist -b master",
99
"lint": "npm run lint:prettier",
10-
"lint:prettier": "prettier --check \"**/*.{js,ts,yml,json,md}\""
10+
"lint:prettier": "prettier --check \"**/*.{js,ts,yml,json,md,html,scss,webmanifest}\""
1111
},
1212
"keywords": [],
1313
"author": "",

0 commit comments

Comments
 (0)