Skip to content

Commit 674a2b8

Browse files
author
Slinto
committed
Babel - frontend
1 parent 6c777af commit 674a2b8

8 files changed

Lines changed: 336 additions & 43 deletions

File tree

build/css/app.css

Lines changed: 281 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,281 @@
1-
img,legend{border:0}legend,td,th{padding:0}::selection,a{background:0 0}.row,sub,sup{position:relative}.center,.row.center{text-align:center}.float-left,.part-2{float:left}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0;height:100%;font-weight:400;color:$black;background:#f5f5f5;font-size:14px;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;padding:20px}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{color:#e74c3c;text-decoration:none}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,optgroup,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre,textarea{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}.container,.part-2,.row.padding-20,.row.padding-big{box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}table{border-collapse:collapse;border-spacing:0}::-moz-selection{background:0 0;color:#fff}::selection{color:#fff}.container{width:1170px;margin:0 auto}.container.fluid{width:90%}@media (max-width:1266px){.container{width:100%;padding:0 48px}}.container.margin-top{margin-top:160px}@media (max-width:1300px){.container.margin-top{margin-top:120px}}.row{overflow:hidden}.row.no-overflow{overflow:visible}.row.margin-top{margin-top:12px}.row.border-bottom{border-bottom:1px solid $border;padding:15px 0}.row.padding{padding:15px 0}.row.padding-20{padding:20px}.row.padding-big{padding:40px 20px}.part-2{width:50%;padding:20px}.clearfix:after,.clearfix:before{content:" ";display:table}.clearfix:after{clear:both}.textLimiter{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.float-right{float:right}.header{background:#0083e9}
1+
/* normalize.css v3.0.1 | MIT License | git.io/normalize */
2+
html {
3+
font-family: sans-serif; /* 1 */
4+
-ms-text-size-adjust: 100%; /* 2 */
5+
-webkit-text-size-adjust: 100%; /* 2 */
6+
}
7+
body {
8+
margin: 0;
9+
}
10+
article,
11+
aside,
12+
details,
13+
figcaption,
14+
figure,
15+
footer,
16+
header,
17+
hgroup,
18+
main,
19+
nav,
20+
section,
21+
summary {
22+
display: block;
23+
}
24+
audio,
25+
canvas,
26+
progress,
27+
video {
28+
display: inline-block; /* 1 */
29+
vertical-align: baseline; /* 2 */
30+
}
31+
audio:not([controls]) {
32+
display: none;
33+
height: 0;
34+
}
35+
[hidden],
36+
template {
37+
display: none;
38+
}
39+
a {
40+
background: transparent;
41+
}
42+
a:active,
43+
a:hover {
44+
outline: 0;
45+
}
46+
abbr[title] {
47+
border-bottom: 1px dotted;
48+
}
49+
b,
50+
strong {
51+
font-weight: bold;
52+
}
53+
dfn {
54+
font-style: italic;
55+
}
56+
h1 {
57+
font-size: 2em;
58+
margin: 0.67em 0;
59+
}
60+
mark {
61+
background: #ff0;
62+
color: #000;
63+
}
64+
small {
65+
font-size: 80%;
66+
}
67+
sub,
68+
sup {
69+
font-size: 75%;
70+
line-height: 0;
71+
position: relative;
72+
vertical-align: baseline;
73+
}
74+
sup {
75+
top: -0.5em;
76+
}
77+
sub {
78+
bottom: -0.25em;
79+
}
80+
img {
81+
border: 0;
82+
}
83+
svg:not(:root) {
84+
overflow: hidden;
85+
}
86+
figure {
87+
margin: 1em 40px;
88+
}
89+
hr {
90+
box-sizing: content-box;
91+
height: 0;
92+
}
93+
pre {
94+
overflow: auto;
95+
}
96+
code,
97+
kbd,
98+
pre,
99+
samp {
100+
font-family: monospace, monospace;
101+
font-size: 1em;
102+
}
103+
button,
104+
input,
105+
optgroup,
106+
select,
107+
textarea {
108+
color: inherit; /* 1 */
109+
font: inherit; /* 2 */
110+
margin: 0; /* 3 */
111+
}
112+
button {
113+
overflow: visible;
114+
}
115+
button,
116+
select {
117+
text-transform: none;
118+
}
119+
button,
120+
html input[type="button"],
121+
input[type="reset"],
122+
input[type="submit"] {
123+
-webkit-appearance: button; /* 2 */
124+
cursor: pointer; /* 3 */
125+
}
126+
button[disabled],
127+
html input[disabled] {
128+
cursor: default;
129+
}
130+
button::-moz-focus-inner,
131+
input::-moz-focus-inner {
132+
border: 0;
133+
padding: 0;
134+
}
135+
input {
136+
line-height: normal;
137+
}
138+
input[type="checkbox"],
139+
input[type="radio"] {
140+
box-sizing: border-box; /* 1 */
141+
padding: 0; /* 2 */
142+
}
143+
input[type="number"]::-webkit-inner-spin-button,
144+
input[type="number"]::-webkit-outer-spin-button {
145+
height: auto;
146+
}
147+
input[type="search"] {
148+
-webkit-appearance: textfield; /* 1 */ /* 2 */
149+
box-sizing: content-box;
150+
}
151+
input[type="search"]::-webkit-search-cancel-button,
152+
input[type="search"]::-webkit-search-decoration {
153+
-webkit-appearance: none;
154+
}
155+
fieldset {
156+
border: 1px solid #c0c0c0;
157+
margin: 0 2px;
158+
padding: 0.35em 0.625em 0.75em;
159+
}
160+
legend {
161+
border: 0; /* 1 */
162+
padding: 0; /* 2 */
163+
}
164+
textarea {
165+
overflow: auto;
166+
}
167+
optgroup {
168+
font-weight: bold;
169+
}
170+
table {
171+
border-collapse: collapse;
172+
border-spacing: 0;
173+
}
174+
td,
175+
th {
176+
padding: 0;
177+
}
178+
body {
179+
height: 100%;
180+
font-weight: 400;
181+
color: $black;
182+
background: #f5f5f5;
183+
font-size: 14px;
184+
text-rendering: optimizelegibility;
185+
-webkit-font-smoothing: antialiased;
186+
padding: 20px;
187+
}
188+
::-moz-selection {
189+
background: $pink;
190+
color: #fff;
191+
}
192+
::selection {
193+
background: $pink;
194+
color: #fff;
195+
}
196+
a {
197+
color: #e74c3c;
198+
text-decoration: none;
199+
}
200+
.container {
201+
width: 1170px;
202+
margin: 0 auto;
203+
box-sizing: border-box;
204+
}
205+
.container.fluid {
206+
width: 90%;
207+
}
208+
@media (max-width: 1266px) {
209+
.container {
210+
width: 100%;
211+
padding: 0 48px;
212+
}
213+
}
214+
.container.margin-top {
215+
margin-top: 160px;
216+
}
217+
@media (max-width: 1300px) {
218+
.container.margin-top {
219+
margin-top: 120px;
220+
}
221+
}
222+
.row {
223+
position: relative;
224+
overflow: hidden;
225+
}
226+
.row.no-overflow {
227+
overflow: visible;
228+
}
229+
.row.margin-top {
230+
margin-top: 12px;
231+
}
232+
.row.center {
233+
text-align: center;
234+
}
235+
.row.border-bottom {
236+
border-bottom: 1px solid $border;
237+
padding: 15px 0;
238+
}
239+
.row.padding {
240+
padding: 15px 0;
241+
}
242+
.row.padding-20 {
243+
padding: 20px;
244+
box-sizing: border-box;
245+
}
246+
.row.padding-big {
247+
padding: 40px 20px;
248+
box-sizing: border-box;
249+
}
250+
.part-2 {
251+
box-sizing: border-box;
252+
float: left;
253+
width: 50%;
254+
padding: 20px;
255+
}
256+
.center {
257+
text-align: center;
258+
}
259+
.clearfix:before,
260+
.clearfix:after {
261+
content: " ";
262+
display: table;
263+
}
264+
.clearfix:after {
265+
clear: both;
266+
}
267+
.textLimiter {
268+
display: block;
269+
overflow: hidden;
270+
text-overflow: ellipsis;
271+
white-space: nowrap;
272+
}
273+
.float-left {
274+
float: left;
275+
}
276+
.float-right {
277+
float: right;
278+
}
279+
.header {
280+
background: #0083e9;
281+
}

build/js/build-dev.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/js/build-dev.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/js/main.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
var hello = require('./modules/hello.js');
1+
//var hello = require('./modules/hello.js');
22

3-
hello.init();
3+
import Hello from './modules/hello';
4+
5+
var hello = new Hello();
6+
7+
hello.getGreeting();

client/js/modules/hello.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
exports.init = function() {
2-
console.log('HELLO, Thank\'s for using my small DevStack.');
3-
};
1+
export default class Hello {
2+
3+
getGreeting() {
4+
console.log('HELLO, Thank\'s for using my small DevStack.');
5+
}
6+
}

gulpfile.js

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@ var gulp = require('gulp'),
1515
size = require('gulp-size'),
1616
stylus = require('gulp-stylus'),
1717
git = require('gulp-git'),
18-
uglify = require('gulp-uglify'),
1918
pngquant = require('imagemin-pngquant'),
20-
webpack = require('gulp-webpack'),
21-
webpackLib = require('webpack');
19+
webpack = require('gulp-webpack');
2220

2321
var VERSION;
2422

@@ -107,34 +105,9 @@ gulp.task('test-deployed', function() {
107105
});
108106
});
109107

110-
gulp.task('uglify', function() {
111-
return gulp.src('./build/js/build-dev.js')
112-
.pipe(uglify())
113-
.pipe(gulp.dest('./build/js'));
114-
});
115-
116108
gulp.task('webpack', function() {
117109
return gulp.src('./client/js/main.js')
118-
.pipe(webpack({
119-
output: {
120-
filename: 'build-dev.js'
121-
},
122-
plugins: (function() {
123-
var plugins = [];
124-
plugins.push(
125-
new webpackLib.optimize.DedupePlugin(),
126-
new webpackLib.optimize.OccurenceOrderPlugin(),
127-
new webpackLib.ContextReplacementPlugin(/moment[\/\\]locale$/, /en|sk/),
128-
new webpackLib.optimize.UglifyJsPlugin({
129-
compress: {
130-
warnings: false
131-
}
132-
})
133-
);
134-
return plugins;
135-
})(),
136-
modulesDirectories: ['app/bower_components']
137-
}))
110+
.pipe(webpack(require("./webpack.config.js")))
138111
.pipe(gulp.dest('./build/js/'));
139112
});
140113

@@ -167,14 +140,14 @@ gulp.task('bump', function() {
167140
gulp.task('dev', ['stylus', 'minify-css', 'test']);
168141

169142
gulp.task('build', function() {
170-
runSequence('clean', 'stylus', 'minify-css', 'test', 'webpack', 'uglify', 'imagemin');
143+
runSequence('clean', 'stylus', 'minify-css', 'test', 'webpack', 'imagemin');
171144
});
172145

173146
gulp.task('release', function() {
174147
VERSION = args.v || args.version;
175148

176149
if (typeof VERSION !== 'undefined') {
177-
runSequence('clean', 'stylus', 'minify-css', 'test', 'webpack', 'uglify', 'imagemin', 'bump', 'git-commit', 'git-push');
150+
runSequence('clean', 'stylus', 'minify-css', 'test', 'webpack', 'imagemin', 'bump', 'git-commit', 'git-push');
178151
} else {
179152
console.log('SORRY, app --version parameter missing.');
180153
}
@@ -188,7 +161,7 @@ gulp.task('start-server', function() {
188161

189162
livereload.listen();
190163
gulp.watch(['client/css/**/*.styl'], ['stylus', 'minify-css']);
191-
gulp.watch(['client/js/**/*.js', '!./client/js/bower_components/**/*.js', '!/client/js/build.js'], ['webpack', 'uglify']);
164+
gulp.watch(['client/js/**/*.js', '!./client/js/bower_components/**/*.js', '!/client/js/build.js'], ['webpack']);
192165
gulp.watch(['test/**/*.js'], ['test']);
193166
gulp.watch(['build/css/app.css', 'build/img/**', 'server/views/**/*.jade']).on('change', livereload.changed);
194167
gulp.watch(['build/js/build-dev.js']).on('change', livereload.reload);

0 commit comments

Comments
 (0)