-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* im done * Update server.js * cr fixes
- Loading branch information
Artyom Egorov
authored
Feb 10, 2020
1 parent
14393b4
commit 962da57
Showing
50 changed files
with
4,209 additions
and
3,002 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,30 @@ | ||
var buildEnd = require('../util/buildEnd.js'); | ||
var { buildEnd } = require('../util/buildEnd.js'); | ||
var config = require('../../app/config.js'); | ||
var runSequence = require('run-sequence'); | ||
var argv = require('minimist')(process.argv.slice(2)); | ||
var gulp = require('gulp'); | ||
var { clean } = require('./clean'); | ||
var { buildStyles } = require('./buildStyles'); | ||
var { buildScripts } = require('./buildScripts'); | ||
var { doc } = require('./doc'); | ||
var { loader } = require('./loader'); | ||
var { copyAssets } = require('./copyAssets'); | ||
var { copyIndexPage } = require('./copyIndexPage'); | ||
|
||
gulp.task('build', function (cb) { | ||
function npmConfigModify(done) { | ||
if (argv.npm) { | ||
// Disable local config for npm builds | ||
config.appConfig = config.mainConfig; | ||
|
||
// Make npm builds https-only | ||
config.appConfig.protocol = 'https:'; | ||
} | ||
done(); | ||
} | ||
|
||
runSequence('clean', 'buildStyles', [ | ||
'buildScripts', | ||
'doc', | ||
'loader', | ||
'copyAssets', | ||
'copyIndexPage', | ||
'hooks' | ||
], function() { | ||
buildEnd(); | ||
cb(); | ||
}); | ||
}); | ||
exports.build = gulp.series(npmConfigModify, clean, buildStyles, gulp.parallel( | ||
buildScripts, | ||
doc, | ||
loader, | ||
copyAssets, | ||
copyIndexPage | ||
), buildEnd); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
var gulp = require('gulp'); | ||
|
||
var destCSS = require('../util/destCSS'); | ||
var { destCSS } = require('../util/destCSS'); | ||
var { collectImagesStats } = require('./collectImagesStats'); | ||
var { generateSprites } = require('./generateSprites'); | ||
var { imageMinify } = require('./imageMinify'); | ||
|
||
gulp.task('buildStyles', [ | ||
'collectImagesStats', | ||
'generateSprites', | ||
'imageMinify' | ||
], function() { | ||
return destCSS(); | ||
}); | ||
exports.buildStyles = gulp.series(gulp.parallel( | ||
collectImagesStats, | ||
generateSprites, | ||
imageMinify | ||
), destCSS); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,24 @@ | ||
var runSequence = require('run-sequence'); | ||
var gulp = require('gulp'); | ||
|
||
var buildEnd = require('../util/buildEnd.js'); | ||
var { buildEnd } = require('../util/buildEnd.js'); | ||
var { buildStyles } = require('./buildStyles'); | ||
var { buildScripts } = require('./buildScripts'); | ||
var { doc } = require('./doc'); | ||
var { clean } = require('./clean'); | ||
var { loader } = require('./loader'); | ||
var { copyAssets } = require('./copyAssets'); | ||
var { copyIndexPage } = require('./copyIndexPage'); | ||
|
||
gulp.task('buildTest', function(cb) { | ||
function enableTestBuild(done) { | ||
global.isTestBuild = true; | ||
done(); | ||
} | ||
|
||
runSequence('clean', [ | ||
'buildScripts', | ||
'buildStyles', | ||
'doc', | ||
'loader', | ||
'copyAssets', | ||
'copyIndexPage' | ||
], function() { | ||
buildEnd(); | ||
cb(); | ||
}); | ||
}); | ||
exports.buildTest = gulp.series(enableTestBuild, clean, gulp.parallel( | ||
buildScripts, | ||
buildStyles, | ||
doc, | ||
loader, | ||
copyAssets, | ||
copyIndexPage | ||
), buildEnd); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
var gulp = require('gulp'); | ||
var del = require('del'); | ||
|
||
gulp.task('clean', function() { | ||
exports.clean = function clean() { | ||
return del(['dist', 'gulp/tmp']); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
var gulp = require('gulp'); | ||
var error = require('../util/error'); | ||
|
||
gulp.task('copyAssets', function() { | ||
exports.copyAssets = function copyAssets() { | ||
return gulp.src(['assets/**/*']) | ||
.pipe(error.handle()) | ||
.pipe(gulp.dest('dist')); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
var gulp = require('gulp'); | ||
var error = require('../util/error'); | ||
|
||
gulp.task('copyIndexPage', function() { | ||
exports.copyIndexPage = function copyIndexPage() { | ||
return gulp.src(['app/index.html']) | ||
.pipe(error.handle()) | ||
.pipe(gulp.dest('dist')); | ||
}); | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
var runSequence = require('run-sequence'); | ||
var gulp = require('gulp'); | ||
var { build } = require('./build'); | ||
var { server } = require('./server'); | ||
var { watch } = require('./watch'); | ||
|
||
gulp.task('dev', function(cb) { | ||
runSequence('build', 'server', 'watch', cb); | ||
}); | ||
exports.dev = gulp.series(build, server, watch); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
var gulp = require('gulp'); | ||
|
||
var gendoc = require('../util/gendoc'); | ||
var config = require('../../app/config'); | ||
|
||
gulp.task('doc', function() { | ||
exports.doc = function doc(done) { | ||
var doc = config.doc; | ||
|
||
gendoc.generateDocumentation(doc.menu, doc.input, doc.output); | ||
}); | ||
done(); | ||
}; |
Oops, something went wrong.