mirror of
https://github.com/liabru/matter-js.git
synced 2025-01-14 16:28:42 -05:00
remove gulp
This commit is contained in:
parent
90abab6c25
commit
6a280902bf
3 changed files with 3 additions and 3618 deletions
90
Gulpfile.js
90
Gulpfile.js
|
@ -1,90 +0,0 @@
|
|||
/* eslint-env es6 */
|
||||
"use strict";
|
||||
|
||||
const gulp = require('gulp');
|
||||
const bump = require('gulp-bump');
|
||||
const changelog = require('gulp-conventional-changelog');
|
||||
const tag = require('gulp-tag-version');
|
||||
const sequence = require('run-sequence');
|
||||
const gutil = require('gulp-util');
|
||||
const pkg = require('./package.json');
|
||||
const exec = require('child_process').exec;
|
||||
|
||||
const shellExec = (command, callback) => {
|
||||
const args = process.argv.slice(3).join(' '),
|
||||
proc = exec(command + ' ' + args, (err, stdout, stderr) => {
|
||||
callback(err, stdout, stderr, proc);
|
||||
});
|
||||
|
||||
proc.stdout.on('data', data => process.stdout.write(data));
|
||||
proc.stderr.on('data', data => process.stderr.write(data));
|
||||
};
|
||||
|
||||
const shell = command => (callback => { shellExec(command, callback); });
|
||||
|
||||
const hint = command => (callback => {
|
||||
gutil.log(gutil.colors.red('Error'), 'use', gutil.colors.yellow(command), 'instead.');
|
||||
callback();
|
||||
});
|
||||
|
||||
gulp.task('default', hint('npm run build'));
|
||||
gulp.task('dev', hint('npm run dev'));
|
||||
gulp.task('build', hint('npm run build'));
|
||||
gulp.task('test', hint('npm run test'));
|
||||
gulp.task('lint', hint('npm run lint'));
|
||||
|
||||
gulp.task('doc', callback => {
|
||||
shellExec(`yuidoc --config yuidoc.json --project-version ${pkg.version}`, callback);
|
||||
});
|
||||
|
||||
gulp.task('bump', () => {
|
||||
return gulp.src(['package.json', 'bower.json'])
|
||||
.pipe(bump({ type: process.argv[4] || 'minor' }))
|
||||
.pipe(gulp.dest('.'));
|
||||
});
|
||||
|
||||
gulp.task('tag', () => {
|
||||
return gulp.src('package.json')
|
||||
.pipe(tag({ prefix: '' }));
|
||||
});
|
||||
|
||||
gulp.task('changelog', () => {
|
||||
return gulp.src('CHANGELOG.md')
|
||||
.pipe(changelog())
|
||||
.pipe(gulp.dest('.'));
|
||||
});
|
||||
|
||||
gulp.task('release', callback => {
|
||||
shellExec('git status --porcelain', (err, stdout) => {
|
||||
if (stdout && stdout.trim()) {
|
||||
throw new gutil.PluginError({
|
||||
plugin: 'release',
|
||||
message: 'cannot build release as there are uncomitted changes'
|
||||
});
|
||||
} else {
|
||||
sequence(
|
||||
'release:lint', 'bump', 'release:build', 'release:test',
|
||||
'doc', 'changelog', callback
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
gulp.task('release:lint', shell('npm run lint'));
|
||||
gulp.task('release:build', shell('npm run build'));
|
||||
gulp.task('release:test', shell('TEST_BUILD=true npm run test'));
|
||||
gulp.task('release:push:git', shell('git push origin && git push origin --tags'));
|
||||
gulp.task('release:push:npm', shell('npm publish'));
|
||||
|
||||
gulp.task('release:push', callback => {
|
||||
shellExec('git status --porcelain', (err, stdout) => {
|
||||
if (stdout && stdout.trim()) {
|
||||
throw new gutil.PluginError({
|
||||
plugin: 'release',
|
||||
message: 'cannot push release as it has not yet been committed'
|
||||
});
|
||||
} else {
|
||||
sequence('tag', 'release:push:git', 'release:push:npm', callback);
|
||||
}
|
||||
});
|
||||
});
|
3522
package-lock.json
generated
3522
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -21,17 +21,12 @@
|
|||
],
|
||||
"devDependencies": {
|
||||
"eslint": "^6.8.0",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-bump": "^2.6.1",
|
||||
"gulp-conventional-changelog": "^2.0.35",
|
||||
"gulp-tag-version": "^1.3.0",
|
||||
"gulp-util": "^3.0.8",
|
||||
"jest": "^25.1.0",
|
||||
"jest-worker": "^24.9.0",
|
||||
"json-stringify-pretty-compact": "^2.0.0",
|
||||
"puppeteer-core": "^5.5.0",
|
||||
"run-sequence": "^2.2.1",
|
||||
"webpack": "^4.44.2",
|
||||
"puppeteer-core": "^5.5.0",
|
||||
"webpack-cli": "^3.3.11",
|
||||
"webpack-dev-server": "^3.11.0"
|
||||
},
|
||||
|
@ -40,7 +35,7 @@
|
|||
"build": "webpack --mode=production & webpack --mode=production --env.MINIMIZE",
|
||||
"build-alpha": "webpack --mode=production --env.ALPHA & webpack --mode=production --env.MINIMIZE --env.ALPHA",
|
||||
"build-examples": "webpack --config webpack.examples.config.js --mode=production --env.ALPHA & webpack --config webpack.examples.config.js --mode=production --env.MINIMIZE --env.ALPHA",
|
||||
"lint": "eslint 'src/**/*.js' 'demo/js/Demo.js' 'demo/js/Compare.js' 'examples/*.js' 'webpack.*.js' 'Gulpfile.js'",
|
||||
"lint": "eslint 'src/**/*.js' 'demo/js/Demo.js' 'demo/js/Compare.js' 'examples/*.js' 'webpack.*.js'",
|
||||
"doc": "gulp doc",
|
||||
"test": "npm run test-node",
|
||||
"test-all": "jest",
|
||||
|
|
Loading…
Reference in a new issue