Skip to content
This repository was archived by the owner on Jul 21, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ module.exports = (gulp, $) => {
* - minify in production
* - output
*/
gulp.task('css', ['iconfont'], () => {
gulp.task('css', gulp.series(['iconfont'], () => {
return gulp.src(config.src.css)
.pipe($.less())
.pipe($.autoprefixer())
.pipe($.if(config.minify, $.cleanCss()))
.pipe(gulp.dest(config.dist.css));
});
}));
};
4 changes: 2 additions & 2 deletions build/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ function enhanceRamlObj (ramlObj, internal = false) {
module.exports = (gulp, $, flags) => {
gulp.task('backend-clone', () => getRepo('git@github.com:mixer/raml.git', 'master'));

gulp.task('backend-doc', ['backend-clone'], () => {
gulp.task('backend-doc', gulp.series(['backend-clone'], () => {
let docPath;
if (config.backendRamlPath) {
docPath = path.join(config.backendRamlPath, 'index.raml');
Expand Down Expand Up @@ -264,7 +264,7 @@ module.exports = (gulp, $, flags) => {
JSON.stringify(tree)
);
});
});
}));

gulp.task('pull-client-repos', () => {
const todo = require('./libraries')
Expand Down
20 changes: 13 additions & 7 deletions build/misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function wrappedRequire (filePath) {
*/
function getPermissions () {
try {
return require('@mcph/beam-common').permissions;
return require('@mixer/beam-common').permissions;
} catch (err) {
if (err.code === 'MODULE_NOT_FOUND') {
// eslint-disable-next-line no-console
Expand Down Expand Up @@ -228,15 +228,15 @@ module.exports = (gulp, $, flags) => {
};
});

gulp.task('html', ['html-raml']);

gulp.task('html-raml', ['backend-doc', 'pull-client-repos'], () => {
gulp.task('html-raml', gulp.series(['backend-doc', 'pull-client-repos'], () => {
return gulp.src(config.src.html)
.pipe(dataPipe())
.pipe($.pug(getPugOpts()))
.pipe($.if(config.minify, $.minifyHtml()))
.pipe(gulp.dest(config.dist.html));
});
}));

gulp.task('html', gulp.series(['html-raml']));

gulp.task('html-quick', () => {
return gulp.src(config.src.html)
Expand Down Expand Up @@ -267,7 +267,7 @@ module.exports = (gulp, $, flags) => {
.pipe(gulp.dest(config.dist.js));
});

gulp.task('lint-json', () => {
gulp.task('lint-json', (done) => {
const files = [
'src/reference/chat/data.json',
'src/reference/interactive/cplusplus/data.json',
Expand All @@ -282,9 +282,15 @@ module.exports = (gulp, $, flags) => {
}
fs.writeFileSync(file, `${transformed}\n`);
});

// Have to do this for some gulp 4 reason
done();
});

gulp.task('set-internal', () => {
gulp.task('set-internal', (done) => {
flags.internal = true;

// Have to do this for some gulp 4 reason
done();
});
};
16 changes: 8 additions & 8 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ require('./build/css')(gulp, $, flags);

const defaultTasks = ['html', 'js', 'css', 'images'];

gulp.task('default', defaultTasks);
gulp.task('internal', ['set-internal', ...defaultTasks]);
gulp.task('recompile', ['html-quick', 'js', 'css', 'images']);
gulp.task('default', gulp.series(defaultTasks));
gulp.task('internal', gulp.series(['set-internal', ...defaultTasks]));
gulp.task('recompile', gulp.series(['html-quick', 'js', 'css', 'images']));

gulp.task('watch', () => {
gulp.watch('src/css/**/*.less', ['css']);
gulp.watch(config.src.html, ['html-quick']);
gulp.watch(config.src.snippets, ['html-quick']);
gulp.watch(config.src.js, ['js']);
gulp.watch('src/css/**/*.less', gulp.series(['css']));
gulp.watch(config.src.html, gulp.series(['html-quick']));
gulp.watch(config.src.snippets, gulp.series(['html-quick']));
gulp.watch(config.src.js, gulp.series(['js']));
if (config.repos && config.repos.backend) {
gulp.watch(path.join(config.repos.backend, '**/*.raml'), ['html-raml']);
gulp.watch(path.join(config.repos.backend, '**/*.raml'), gulp.series(['html-raml']));
}
});
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,32 +35,32 @@
"eslint-plugin-import": "^1.9.2",
"eslint-plugin-jsx-a11y": "^1.5.3",
"eslint-plugin-react": "^5.2.2",
"gulp": "^3.9.1",
"gulp": "^4.0.2",
"gulp-autoprefixer": "^3.1.0",
"gulp-clean-css": "^2.0.10",
"gulp-concat": "^2.6.0",
"gulp-consolidate": "^0.2.0",
"gulp-data": "^1.2.1",
"gulp-iconfont": "^8.0.0",
"gulp-if": "^2.0.1",
"gulp-imagemin": "^3.0.1",
"gulp-imagemin": "^6.1.0",
"gulp-less": "^3.1.0",
"gulp-load-plugins": "^1.2.4",
"gulp-minify-html": "^1.0.6",
"gulp-pug": "^3.3.0",
"gulp-uglify": "^3.0.0",
"highlight.js": "^9.5.0",
"http-server": "^0.9.0",
"http-server": "^0.11.1",
"js-yaml": "^3.11.0",
"lodash": "^4.13.1",
"marked": "^0.3.5",
"marked": "^0.7.0",
"node-fetch": "^1.5.3",
"npm-run-all": "^4.0.2",
"pug-lint": "^2.2.2",
"raml-1-parser": "^0.2.33",
"sticky-kit": "^1.1.3"
},
"optionalDependencies": {
"@mcph/beam-common": "^5.0.7"
"@mixer/beam-common": "^6.9.7"
}
}