Skip to content

Commit 5ff8054

Browse files
authored
Merge pull request #9 from rupl/updates
⬆️ missed some stuff
2 parents 39ac024 + f527f00 commit 5ff8054

File tree

9 files changed

+5189
-15048
lines changed

9 files changed

+5189
-15048
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_size = 2
6+
indent_style = space
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,3 @@
33

44
# ignore package managers
55
node_modules
6-
7-
# ignore generated assets
8-
# css

gulpfile.js

Lines changed: 7 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,16 @@
1-
// Gulp tools
2-
var gulp = require('gulp');
3-
var u = require('gulp-util');
4-
var log = u.log;
5-
var c = u.colors;
6-
7-
// Project deps
8-
var nodemon = require('gulp-nodemon');
9-
var sass = require('gulp-sass')(require('sass'));
10-
var prefix = require('gulp-autoprefixer');
11-
12-
// Log some debug info
13-
log(c.yellow('Environment:', (process.env.NODE_ENV || 'local')));
14-
log(c.yellow('Visualize Self:', (process.env.VISUALIZE_SELF || 'false')));
15-
16-
17-
//——————————————————————————————————————————————————————————————————————————————
18-
// Sass Task
19-
//
20-
// Compiles Sass and runs the CSS through autoprefixer.
21-
//——————————————————————————————————————————————————————————————————————————————
22-
function sassTask() {
23-
return gulp.src('sass/**/*')
24-
.pipe(sass()
25-
.on('error', function(err, res) {
26-
log(c.red('sass'), 'failed to compile');
27-
log(c.red('> ') + err.message);
28-
})
29-
)
30-
.pipe(prefix('last 2 versions', '> 1%'))
31-
.pipe(gulp.dest('public/css'));
32-
};
33-
sassTask.description = 'Compiles Sass';
34-
module.exports.sass = sassTask;
35-
36-
37-
//——————————————————————————————————————————————————————————————————————————————
38-
// Watch tasks
39-
//——————————————————————————————————————————————————————————————————————————————
40-
function watchTask() {
41-
gulp.watch('sass/**/*', sassTask);
42-
};
43-
watchTask.description = 'For local development';
44-
module.exports.watch = watchTask;
45-
1+
/**
2+
* It's just nodemon config now.
3+
*/
4+
const gulp = require('gulp');
5+
const nodemon = require('gulp-nodemon');
466

477
//——————————————————————————————————————————————————————————————————————————————
488
// Run the dev server
499
//——————————————————————————————————————————————————————————————————————————————
50-
gulp.task('start', gulp.series(sassTask, 'watch'), () => {
10+
gulp.task('start', () => {
5111
nodemon({
5212
script: 'index.js',
53-
ext: 'js html dust',
13+
ext: 'css js html dust',
5414
env: { 'NODE_ENV': 'development' }
5515
});
5616
});

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ io.on('connection', function(socket){
7474
* Listen for users to connect
7575
*/
7676
http.listen(port, function(){
77+
console.log('🔩 VISUALIZE_SELF:', process.env.VISUALIZE_SELF);
7778
console.log('⚡ Listening on port ' + port);
7879
});
7980

0 commit comments

Comments
 (0)