This commit is contained in:
peli 2020-06-22 08:02:02 -07:00
Родитель c8b9476748
Коммит 19085212e2
2 изменённых файлов: 8 добавлений и 20 удалений

5
.github/workflows/build.yml поставляемый
Просмотреть файл

@ -17,6 +17,5 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: npm ci
env:
CI: true
- run: npm ci
- run: gulp ci

Просмотреть файл

@ -8,9 +8,6 @@ const fancy_log = require('fancy-log');
const ts = require('gulp-typescript');
const tsReporter = ts.reporter.longReporter();
const merge = require("merge-stream");
const browserify = require('browserify');
const source = require('vinyl-source-stream');
const tsify = require('tsify');
const _rimraf = require("rimraf")
const tsProject = ts.createProject("tsconfig.json");
@ -28,26 +25,18 @@ const rimraf = (dirname) => {
const clean = () => rimraf(DIST)
const tscNode = () => {
const tsResult = tsProject.src()
.pipe(tsProject());
.pipe(tsProject(tsReporter));
return merge(
tsResult.js.pipe(gulp.dest(DIST)),
tsResult.dts.pipe(gulp.dest(DIST))
);
}
const tscWeb = () => browserify({
basedir: 'dist',
debug: false,
entries: gulp.src("dist/**.js"),
cache: {},
packageCache: {}
}).bundle()
.on('error', fancy_log)
.pipe(source('bundle.js'))
.pipe(gulp.dest(DIST));
const buildAll = gulp.series(tscNode, tscWeb);
const buildAll = gulp.series(tscNode);
const ci = gulp.series(clean, buildAll);
exports.clean = clean;
exports.tscNode = tscNode;
exports.tscWeb = tscWeb;
exports.default = buildAll;
exports.default = buildAll;
exports.ci = ci;