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

Commit 8be0851

Browse files
committed
Update build process.
1 parent 657fac1 commit 8be0851

File tree

11 files changed

+1243
-26
lines changed

11 files changed

+1243
-26
lines changed

src/assets/data/countries.json

Lines changed: 1006 additions & 0 deletions
Large diffs are not rendered by default.

src/assets/scripts/TestApp.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ define(function(require, exports, module) { // jshint ignore:line
9191
* @overridden Stage.destroy
9292
*/
9393
TestApp.prototype.destroy = function () {
94+
this.disable();
95+
9496
// Call destroy on any child objects.
9597
// This super method will also null out your properties for garbage collection.
9698

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
define(function(require, exports, module) { // jshint ignore:line
2+
'use strict';
3+
4+
// Imports
5+
var Extend = require('structurejs/util/Extend');
6+
var DOMElement = require('structurejs/display/DOMElement');
7+
8+
/**
9+
* TODO: YUIDoc_comment
10+
*
11+
* @class DropdownView
12+
* @extends DOMElement
13+
* @constructor
14+
**/
15+
var DropdownView = (function () {
16+
17+
var _super = Extend(DropdownView, DOMElement); // jshint ignore:line
18+
19+
function DropdownView() { // jshint ignore:line
20+
_super.call(this);
21+
}
22+
23+
/**
24+
* @overridden DOMElement.create
25+
*/
26+
DropdownView.prototype.create = function () {
27+
_super.prototype.create.call(this, '#dropdownView-inlineTemplate');
28+
29+
// Create or setup objects in this parent class.
30+
};
31+
32+
/**
33+
* @overridden DOMElement.enable
34+
*/
35+
DropdownView.prototype.enable = function () {
36+
if (this.isEnabled === true) { return this; }
37+
38+
// Enable the child objects and/or add any event listeners.
39+
40+
return _super.prototype.enable.call(this);
41+
};
42+
43+
/**
44+
* @overridden DOMElement.disable
45+
*/
46+
DropdownView.prototype.disable = function () {
47+
if (this.isEnabled === false) { return this; }
48+
49+
// Disable the child objects and/or remove any event listeners.
50+
51+
return _super.prototype.disable.call(this);
52+
};
53+
54+
/**
55+
* @overridden DOMElement.layout
56+
*/
57+
DropdownView.prototype.layout = function () {
58+
// Layout or update the objects in this parent class.
59+
60+
return this;
61+
};
62+
63+
/**
64+
* @overridden DOMElement.destroy
65+
*/
66+
DropdownView.prototype.destroy = function () {
67+
this.disable();
68+
69+
// Call destroy on any child objects.
70+
// This super method will also null out your properties for garbage collection.
71+
72+
_super.prototype.destroy.call(this);
73+
};
74+
75+
return DropdownView;
76+
})();
77+
78+
module.exports = DropdownView;
79+
80+
});

src/assets/scripts/view/LoginView.js

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ define(function(require, exports, module) { // jshint ignore:line
88
/**
99
* TODO: YUIDoc_comment
1010
*
11-
* @class LoginView
11+
* @class DropdownView
1212
* @extends DOMElement
1313
* @constructor
1414
**/
15-
var LoginView = (function () {
15+
var DropdownView = (function () {
1616

17-
var _super = Extend(LoginView, DOMElement); // jshint ignore:line
17+
var _super = Extend(DropdownView, DOMElement); // jshint ignore:line
1818

19-
function LoginView() { // jshint ignore:line
19+
function DropdownView() { // jshint ignore:line
2020
_super.call(this);
2121

2222
/**
@@ -41,7 +41,7 @@ define(function(require, exports, module) { // jshint ignore:line
4141
/**
4242
* @overridden DOMElement.create
4343
*/
44-
LoginView.prototype.create = function () {
44+
DropdownView.prototype.create = function () {
4545
_super.prototype.create.call(this, 'templates/login/LoginTemplate', {title: this.TITLE_TEXT});
4646

4747
// Create or setup objects in this parent class.
@@ -52,7 +52,7 @@ define(function(require, exports, module) { // jshint ignore:line
5252
/**
5353
* @overridden DOMElement.enable
5454
*/
55-
LoginView.prototype.enable = function () {
55+
DropdownView.prototype.enable = function () {
5656
if (this.isEnabled === true) { return this; }
5757

5858
// Enable the child objects and/or add any event listeners.
@@ -65,7 +65,7 @@ define(function(require, exports, module) { // jshint ignore:line
6565
/**
6666
* @overridden DOMElement.disable
6767
*/
68-
LoginView.prototype.disable = function () {
68+
DropdownView.prototype.disable = function () {
6969
if (this.isEnabled === false) { return this; }
7070

7171
// Disable the child objects and/or remove any event listeners.
@@ -78,7 +78,7 @@ define(function(require, exports, module) { // jshint ignore:line
7878
/**
7979
* @overridden DOMElement.layout
8080
*/
81-
LoginView.prototype.layout = function () {
81+
DropdownView.prototype.layout = function () {
8282
// Layout or update the objects in this parent class.
8383

8484
return this;
@@ -87,28 +87,34 @@ define(function(require, exports, module) { // jshint ignore:line
8787
/**
8888
* @overridden DOMElement.destroy
8989
*/
90-
LoginView.prototype.destroy = function () {
90+
DropdownView.prototype.destroy = function () {
91+
this.disable();
92+
9193
// Call destroy on any child objects.
9294
// This super method will also null out your properties for garbage collection.
9395

9496
_super.prototype.destroy.call(this);
9597
};
9698

99+
//////////////////////////////////////////////////////////////////////////////////
100+
// EVENT HANDLERS
101+
//////////////////////////////////////////////////////////////////////////////////
102+
97103
/**
98104
* TODO: YUIDoc_comment
99105
*
100106
* @method _onClick
101107
* @private
102108
*/
103-
LoginView.prototype._onClick = function(event) {
109+
DropdownView.prototype._onClick = function(event) {
104110
event.preventDefault();
105111

106112
alert('Sign In Button Clicked')
107113
};
108114

109-
return LoginView;
115+
return DropdownView;
110116
})();
111117

112-
module.exports = LoginView;
118+
module.exports = DropdownView;
113119

114120
});

src/assets/scripts/view/NavigationView.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define(function(require, exports, module) { // jshint ignore:line
44
// Imports
55
var Extend = require('structurejs/util/Extend');
66
var DOMElement = require('structurejs/display/DOMElement');
7+
var DropdownView = require('./DropdownView');
78

89
/**
910
* TODO: YUIDoc_comment
@@ -18,6 +19,15 @@ define(function(require, exports, module) { // jshint ignore:line
1819

1920
function NavigationView($element) { // jshint ignore:line
2021
_super.call(this, $element);
22+
23+
/**
24+
* TODO: YUIDoc_comment
25+
*
26+
* @property _dropdownView
27+
* @type {DropdownView}
28+
* @protected
29+
*/
30+
this._dropdownView = null;
2131
}
2232

2333
/**
@@ -26,7 +36,10 @@ define(function(require, exports, module) { // jshint ignore:line
2636
NavigationView.prototype.create = function () {
2737
_super.prototype.create.call(this);
2838

29-
// Create or setup objects in this parent class.
39+
var container = this.getChild('.js-navigationView-container');
40+
41+
this._dropdownView = new DropdownView();
42+
container.addChild(this._dropdownView);
3043
};
3144

3245
/**
@@ -68,6 +81,8 @@ define(function(require, exports, module) { // jshint ignore:line
6881
* @overridden DOMElement.destroy
6982
*/
7083
NavigationView.prototype.destroy = function () {
84+
this.disable();
85+
7186
// Call destroy on any child objects.
7287
// This super method will also null out your properties for garbage collection.
7388

File renamed without changes.

src/assets/scss/base/_reset.scss

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
/* ---------------------------------------------------------------------
2+
RESET CSS (thanks Eric Meyer)
3+
------------------------------------------------------------------------ */
4+
html, body, div, span, applet, object, iframe,
5+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
6+
a, abbr, acronym, address, big, cite, code,
7+
del, dfn, em, img, ins, kbd, q, s, samp,
8+
small, strike, strong, sub, sup, tt, var,
9+
b, u, i, center,
10+
dl, dt, dd, ol, ul, li,
11+
fieldset, form, label, legend,
12+
table, caption, tbody, tfoot, thead, tr, th, td,
13+
article, aside, canvas, details, embed,
14+
figure, figcaption, footer, header, hgroup,
15+
menu, nav, output, ruby, section, summary,
16+
time, mark, audio, video {
17+
margin: 0;
18+
padding: 0;
19+
border: 0;
20+
font-size: 100%;
21+
font-weight: inherit;
22+
font-style: inherit;
23+
font-family: inherit;
24+
vertical-align: baseline;
25+
}
26+
27+
body {
28+
line-height: 1;
29+
}
30+
31+
ol, ul {
32+
list-style: none;
33+
}
34+
35+
blockquote, q {
36+
quotes: none;
37+
}
38+
39+
blockquote:before, blockquote:after,
40+
q:before, q:after {
41+
content: '';
42+
content: none;
43+
}
44+
45+
table {
46+
border-collapse: collapse;
47+
border-spacing: 0;
48+
}
49+
50+
:focus {
51+
outline: 0;
52+
}
53+
54+
html {
55+
overflow-y: scroll; /* Always show a vertical scrollbar, even when there is no scrolling */
56+
}
57+
58+
html {
59+
-webkit-text-size-adjust: 100%;
60+
-ms-text-size-adjust: 100%;
61+
}
62+
63+
/* ---------------------------------------------------------------------
64+
HTML5 Element Reset
65+
------------------------------------------------------------------------ */
66+
article, aside, details, figcaption, figure,
67+
footer, header, hgroup, menu, nav, section, main {
68+
display: block;
69+
}
70+
71+
audio, canvas, video, progress, picture {
72+
display: inline-block;
73+
}
74+
75+
template {
76+
display: none;
77+
}
78+
79+
/* ---------------------------------------------------------------------
80+
Form Reset Styles
81+
------------------------------------------------------------------------ */
82+
input[type="search"]::-webkit-search-cancel-button,
83+
input[type="search"]::-webkit-search-decoration,
84+
input[type="search"]::-webkit-search-results-button,
85+
input[type="search"]::-webkit-search-results-decoration {
86+
-webkit-appearance: none;
87+
}
88+
89+
input[type="search"] {
90+
-webkit-appearance: none;
91+
-webkit-box-sizing: content-box;
92+
-moz-box-sizing: content-box;
93+
box-sizing: content-box;
94+
}
95+
96+
textarea {
97+
overflow: auto;
98+
vertical-align: top;
99+
resize: vertical;
100+
}
101+
102+
::-moz-focus-inner {
103+
border: 0;
104+
padding: 0;
105+
}
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
/* ---------------------------------------------------------------------
2-
Print Styles
2+
Modern Styles
33
------------------------------------------------------------------------ */
4+
@import "base/_reset";
5+
@import "vendor/_bootstrap";
6+
@import "_screen.scss";
7+

src/index.html

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
88

99
<!-- SEO -->
10-
<title>StructureJS Boilerplate (RequireJS)</title>
10+
<title>StructureJS Boilerplate (TypeScript)</title>
1111
<meta name="description" content="" />
1212
<meta name="author" content="" />
1313

@@ -69,16 +69,15 @@ <h1 class="hd-page"></h1>
6969
</script>
7070

7171
<!-- JAVASCRIPT -->
72-
<script src="assets/vendor/requirejs/require.js"></script>
73-
<script src="assets/scripts/config.js"></script>
74-
<script>
75-
/**
76-
* Set route and kick off RequireJs, which begins loading of scripts
77-
* starting from main.js.
78-
*/
79-
require(['main']);
80-
</script>
72+
<!-- build:js assets/scripts/vendor.js -->
73+
<script src="assets/vendor/jquery/dist/jquery.js"></script>
74+
<script src="assets/vendor/handlebars/handlebars.js"></script>
75+
<!-- endbuild -->
8176

77+
<!-- build:js assets/scripts/main.js -->
78+
<script src="assets/scripts/precompiledJst.js"></script>
79+
<script src="assets/scripts/main.js"></script>
80+
<!-- endbuild -->
8281
</body>
8382

8483
</html>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy