Skip to content

Commit

Permalink
Clean up build scripts, tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
zajrik committed Dec 14, 2020
1 parent 2c6372d commit 30529ee
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 34 deletions.
5 changes: 0 additions & 5 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
"args": ["gulp", "tests"],
"type": "shell",
"problemMatcher": ["$tsc"]
},
{
"label": "docs",
"args": ["gulp", "docs"],
"type": "shell"
}
]
}
28 changes: 3 additions & 25 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
/* eslint-disable @typescript-eslint/typedef, no-return-assign, @typescript-eslint/explicit-function-return-type */
/* eslint-disable @typescript-eslint/typedef */
const gulp = require('gulp');
const typescript = require('gulp-typescript');
const sourcemaps = require('gulp-sourcemaps');
const eslint = require('gulp-eslint');
const del = require('del');
const path = require('path');
const { execSync } = require('child_process');

const project = typescript.createProject('tsconfig.json');

let _runSequence;

const runSequence = () => _runSequence = _runSequence || require('run-sequence');

gulp.task('build:docs', () => execSync('npm run docs:indev'));
gulp.task('docs', cb => runSequence()('build', 'build:docs', cb));
gulp.task('gh-prebuild', cb => runSequence()('build', 'gh-prebuild-prepare', cb));

gulp.task('pause', cb => setTimeout(() => cb(), 1e3));

gulp.task('lint', () =>
gulp.src('src/**/*.ts')
.pipe(eslint())
Expand All @@ -43,19 +32,6 @@ gulp.task('build', () =>
.pipe(gulp.dest('bin/'));
});

gulp.task('gh-prebuild-prepare', () =>
{
del.sync([
'../yamdbf-prebuilt/**',
'../yamdbf-prebuilt/.*',
'!../yamdbf-prebuilt',
'!../yamdbf-prebuilt/.git',
'!../yamdbf-prebuilt/.git/**'
], { force: true });
gulp.src('bin/**/*.*').pipe(gulp.dest('../yamdbf-prebuilt/bin'));
gulp.src('package.json').pipe(gulp.dest('../yamdbf-prebuilt'));
});

gulp.task('build:tests', () =>
{
del.sync(['test/**/*.js']);
Expand Down Expand Up @@ -88,5 +64,7 @@ gulp.task('build:scripts', () =>
});

gulp.task('default', gulp.series('build'));

gulp.task('build:vscode', gulp.series('lint', 'build'));
gulp.task('pause', cb => setTimeout(cb, 1e3));
gulp.task('tests', gulp.series('lint', 'build', 'pause', 'build:tests'));
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"docs:indev": "cross-env TYPE=indev jsdoc -R README.md -c .jsdoc.json -u examples -r bin -d ../yamdbf-docs/indev/ && jsdoc -c .jsdoc.json -t templates/haruki -r bin -d console > ../yamdbf-docs/indev/docs.json",
"lint": "gulp lint",
"test": "npm run lint -s && npm run build -s",
"test:client": "node test/client_test.js",
"localization": "cd scripts && gulp build && gulp build:scripts && node generateDefaultLocalizationMarkdown",
"basestrings": "cd scripts && gulp build && gulp build:scripts && node generateLocalizationStringsEnum",
"basecommands": "cd scripts && gulp build && gulp build:scripts && node generateBaseCommandNameFiles"
Expand Down Expand Up @@ -71,8 +70,8 @@
"jsdoc": "zajrik/jsdoc",
"jsdoc-strip-async-await": "^0.1.0",
"minami": "zajrik/minami",
"run-sequence": "^1.2.2",
"sequelize": "^5.7.6",
"sqlite3": "^5.0.0",
"ts-node": "^6.1.1",
"typescript": "^3.7.2"
},
Expand Down
2 changes: 1 addition & 1 deletion src/localization/BaseStrings.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated automatically at Sat Jul 06 2019 23:15:52 GMT-0500 (Central Daylight Time)
// Generated automatically at Sun Dec 13 2020 23:14:46 GMT-0600 (Central Standard Time)

/**
* @typedef {enum} BaseStrings Enum containing all base framework
Expand Down
2 changes: 1 addition & 1 deletion src/types/BaseCommandName.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated automatically at Sun Feb 11 2018 00:42:58 GMT-0600 (Central Standard Time)
// Generated automatically at Sun Dec 13 2020 23:15:18 GMT-0600 (Central Standard Time)

/**
* @typedef {string} BaseCommandName String representing a name of a base command. Valid names are:
Expand Down

0 comments on commit 30529ee

Please sign in to comment.