Skip to content

Commit

Permalink
fixed gulpfile.js
Browse files Browse the repository at this point in the history
  • Loading branch information
anitgandhi committed Feb 21, 2016
1 parent fc222b3 commit b4559a5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
24 changes: 12 additions & 12 deletions config.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
var config = {
// Environment can be "prod" for https, or "dev" for local/http
"env": "dev",
"env": "prod",

// Location of static root folder of the webserver
// Make sure Node is allowed to write to that folder!
"static_root": "",
"static_root": "/var/www/ecerso.party/",

// Integer to represent the WebSocket connection port number. Must be greater than 1024.
"ws_port": 8080,

// TLS Info - if dev (insecure) environment, keep empty
"private_key_path": "",
"ssl_cert_path": "",
"ca_cert_path": "",
"private_key_path": "./crt/ecerso.party.key",
"ssl_cert_path": "./crt/ecerso.party.crt",
"ca_cert_path": "./crt/sub.class1.server.ca.pem",

// Link to Mongo Database: mongodb://username:password@server/db
"mongodb_url": "",
"mongodb_url": "mongodb://localhost/drops",

// JSON Web Token Info
"jwt_SECRET": "",
"jwt_AUDIENCE": "",
"jwt_ISSUER": "",
"jwt_EXPIRY": "",
"jwt_ALGORITHM": "",
"jwt_SECRET": "IEEEruleseverythingaroundme",
"jwt_AUDIENCE": "https://ecerso.party",
"jwt_ISSUER": "https://ecerso.party",
"jwt_EXPIRY": "8h",
"jwt_ALGORITHM": "HS256",

"youtube_key": ""
"youtube_key": "AIzaSyBhZubf4N-jenWLm8aUQhkxjCc8_EMnEKA"
};

module.exports = config;
14 changes: 10 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ gulp.task('search.js', function() {
.pipe(replace('YT_KEY', config.youtube_key))
.pipe(uglify())
.pipe(rename({
suffix: ".min";
suffix: ".min"
}))
.pipe(gulp.dest(config.static_root));
});


// Minify drops.js
gulp.task('drops.js', ['replace'], function() {
gulp.task('drops.js', function() {
return gulp.src('public/drops.js')
.pipe(uglify())
.pipe(rename({
suffix: ".min";
suffix: ".min"
}))
.pipe(gulp.dest(config.static_root));
});
Expand All @@ -33,12 +33,18 @@ gulp.task('drops.js', ['replace'], function() {
gulp.task('css', function() {
return gulp.src('./public/*.css')
.pipe(cssnano())
.pipe(rename({
suffix: ".min"
}))
.pipe(gulp.dest(config.static_root));
});

// Minify HTML
gulp.task('html', function() {
return gulp.src(['./public/*.html', './public/slides/*.html'], {base: './public/'});
return gulp.src(['./public/*.html', './public/slides/*.html'], {base: './public/'})
.pipe(replace('drops.css', 'drops.min.css'))
.pipe(replace('drops.js', 'drops.min.js'))
.pipe(replace('search.js', 'search.min.js'))
.pipe(htmlmin({collapseWhitespace: true}))
.pipe(gulp.dest(config.static_root))
});
Expand Down

0 comments on commit b4559a5

Please sign in to comment.