Skip to content

Commit eda8863

Browse files
committed
Finished converting to es6
1 parent 2d9042a commit eda8863

File tree

409 files changed

+7839
-1166
lines changed

Some content is hidden

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

409 files changed

+7839
-1166
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
.idea
2-
.DS_Store
2+
.DS_Store
3+
node_modules
4+
_*

branding/opencollective/logo.psd

13 KB
Binary file not shown.

css/stylesheet.css

Lines changed: 56 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ nav h3 {
103103
padding: 0 4px;
104104
}
105105

106-
#navigation span:empty + .nav-arrow {
106+
#category:empty + .nav-arrow {
107107
display: none;
108108
}
109109

@@ -294,8 +294,7 @@ section {
294294
}
295295

296296
.files_bar > .wrapper.shadow-left.shadow-right {
297-
box-shadow: inset 16px 0 16px -16px rgba(0, 0, 0, .6),
298-
inset -16px 0 16px -16px rgba(0, 0, 0, .6);
297+
box-shadow: inset 16px 0 16px -16px rgba(0, 0, 0, .6), inset -16px 0 16px -16px rgba(0, 0, 0, .6);
299298
}
300299

301300
.explanation_container {
@@ -430,4 +429,58 @@ pre {
430429

431430
.mtbl-col.notified {
432431
background: #f00;
432+
}
433+
434+
#loading-slider {
435+
position: absolute;
436+
width: 100%;
437+
height: 2px;
438+
}
439+
440+
#loading-slider.loaded {
441+
visibility: hidden;
442+
}
443+
444+
.line {
445+
position: absolute;
446+
background: #4a8df8;
447+
width: 100%;
448+
left: 0;
449+
right: 0;
450+
top: 0;
451+
height: 3px;
452+
}
453+
454+
.break {
455+
position: absolute;
456+
background: #222;
457+
width: 6px;
458+
height: 2px;
459+
}
460+
461+
.dot1 {
462+
animation: loading 2s infinite;
463+
}
464+
465+
.dot2 {
466+
animation: loading 2s 0.5s infinite;
467+
}
468+
469+
.dot3 {
470+
animation: loading 2s 1s infinite;
471+
}
472+
473+
@keyframes loading {
474+
from {
475+
left: 0;
476+
}
477+
to {
478+
left: 100%;
479+
}
480+
}
481+
482+
input[type=number]::-webkit-inner-spin-button,
483+
input[type=number]::-webkit-outer-spin-button {
484+
-webkit-appearance: none;
485+
margin: 0;
433486
}

gulpfile.babel.js

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
'use strict';
2+
3+
import path from 'path';
4+
import gulp from 'gulp';
5+
import uglify from 'gulp-uglify';
6+
import cleanCSS from 'gulp-clean-css';
7+
import autoprefixer from 'gulp-autoprefixer';
8+
import concat from 'gulp-concat';
9+
import header from 'gulp-header';
10+
import babel from 'gulp-babel';
11+
import gutil from 'gulp-util';
12+
import sourcemaps from 'gulp-sourcemaps';
13+
import connect from 'gulp-connect';
14+
import browserify from 'browserify';
15+
import babelify from 'babelify';
16+
import source from 'vinyl-source-stream';
17+
import buffer from 'vinyl-buffer';
18+
import pkg from './package.json';
19+
20+
const appName = 'algorithm_visualizer';
21+
const appEntryPoint = './js/index.js';
22+
23+
const outputPaths = {
24+
javascript: './public',
25+
css: './public',
26+
sourceMaps: './'
27+
};
28+
29+
const banner = [
30+
'/**',
31+
' * <%= pkg.name %> - <%= pkg.description %>',
32+
' * @version v<%= pkg.version %>',
33+
' * @author <%= pkg.author %>',
34+
' * @link <%= pkg.homepage %>',
35+
' * @license <%= pkg.license %>',
36+
' */',
37+
''
38+
].join('\n');
39+
40+
// build directories
41+
42+
const cssDir = path.join(__dirname, 'css', '**', '*.css');
43+
const jsDir = path.join(__dirname, 'js', '**', '*.js');
44+
45+
// CSS
46+
47+
gulp.task('minify-css', () => {
48+
gutil.log('\n\nBuild CSS Paths: \n', cssDir, '\n\n');
49+
50+
return gulp.src(cssDir)
51+
.pipe(autoprefixer())
52+
.pipe(cleanCSS({
53+
compatibility: 'ie8'
54+
}))
55+
.pipe(concat(`${appName}.min.css`))
56+
.pipe(header(banner, {
57+
pkg
58+
}))
59+
.pipe(gulp.dest(outputPaths.css))
60+
.pipe(connect.reload());
61+
});
62+
63+
gulp.task('build-css', () => {
64+
gutil.log('\n\nBuild CSS Paths: \n', cssDir, '\n\n');
65+
66+
return gulp.src(cssDir)
67+
.pipe(autoprefixer())
68+
.pipe(concat(`${appName}.css`))
69+
.pipe(header(banner, {
70+
pkg
71+
}))
72+
.pipe(gulp.dest(outputPaths.css))
73+
.pipe(connect.reload());
74+
});
75+
76+
// JS
77+
78+
gulp.task('minify-js', () => {
79+
80+
gutil.log('\n\nBuild JS Paths: \n', jsDir, '\n\n');
81+
82+
return browserify({
83+
entries: './js/index.js',
84+
debug: true
85+
})
86+
.transform('babelify', {
87+
presets: ['es2015']
88+
})
89+
.bundle()
90+
.pipe(source(`${appName}.min.js`))
91+
.pipe(header(banner, {
92+
pkg
93+
}))
94+
.pipe(buffer())
95+
.pipe(sourcemaps.init())
96+
.pipe(uglify())
97+
.pipe(sourcemaps.write(outputPaths.sourceMaps))
98+
.pipe(gulp.dest(outputPaths.javascript))
99+
.pipe(connect.reload());
100+
101+
});
102+
103+
gulp.task('build-js', () => {
104+
105+
gutil.log('\n\nBuild JS Paths: \n', jsDir, '\n\n');
106+
107+
return browserify({
108+
entries: './js/index.js',
109+
debug: true
110+
})
111+
.transform('babelify', {
112+
presets: ['es2015']
113+
})
114+
.bundle()
115+
.pipe(source(`${appName}.js`))
116+
.pipe(header(banner, {
117+
pkg
118+
}))
119+
.pipe(buffer())
120+
.pipe(sourcemaps.init())
121+
.pipe(sourcemaps.write(outputPaths.sourceMaps))
122+
.pipe(gulp.dest(outputPaths.javascript))
123+
.pipe(connect.reload());
124+
});
125+
126+
// Build
127+
128+
gulp.task('compile-css', ['build-css', 'minify-css']);
129+
gulp.task('compile-js', ['build-js', 'minify-js']);
130+
gulp.task('build', ['compile-css', 'compile-js']);
131+
132+
// Server
133+
134+
gulp.task('connect', function() {
135+
136+
connect.server({
137+
livereload: true
138+
});
139+
});
140+
141+
// Watch
142+
143+
gulp.task('watch', ['build'], function() {
144+
gulp.watch(jsDir, ['compile-js']);
145+
gulp.watch(cssDir, ['compile-css']);
146+
});
147+
148+
// Default
149+
150+
gulp.task('default', ['connect', 'watch']);

0 commit comments

Comments
 (0)