Skip to content
This repository was archived by the owner on Dec 16, 2023. It is now read-only.
Closed
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
6 changes: 3 additions & 3 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"presets": [
[ "env", {
["@babel/preset-env", {
"targets": {
"node": "6.0"
"node": "8.0"
}
}]
],
"plugins": [ "transform-runtime" ]
"plugins": ["@babel/plugin-transform-runtime"]
}
1 change: 0 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// http://eslint.org/docs/rules/
rules: {
strict: 0,
curly: [2, 'multi'],
quotes: [2, 'single'],
eol-last: [0],
no-mixed-requires: [0],
Expand Down
63 changes: 28 additions & 35 deletions Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ const exec = require('gulp-exec');
const File = require('fs');
const gulp = require('gulp');
const gutil = require('gulp-util');
const notify = require('gulp-notify');
const sourcemaps = require('gulp-sourcemaps');
const babel = require('gulp-babel');


// gulp -> gulp watch
gulp.task('default', ['watch']);

// gulp clean -> clean generated files
gulp.task('clean', function(done) {
return del(['lib']);
});

// gulp lint -> errors if code dirty
gulp.task('lint', function () {
Expand All @@ -22,47 +21,26 @@ gulp.task('lint', function () {
.pipe(eslint.failOnError());
});


// gulp build -> compile coffee script
gulp.task('build', ['clean', 'lint'], function() {
gulp.task('compile', function() {
return gulp
.src('src/**/*.js')
.pipe(sourcemaps.init())
.pipe(babel())
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('lib'))
.pipe(notify({
message: 'node-replay: built!',
onLast: true
}));
.pipe(gulp.dest('lib'));
});


// gulp clean -> clean generated files
gulp.task('clean', function(done) {
return del(['lib']);
});
// gulp build -> compile coffee script
gulp.task('build', gulp.series('clean', 'lint', 'compile'));


// gulp watch -> watch for changes and compile
gulp.task('watch', ['build'], function() {
return gulp.watch('src/*.js', ['clean', 'build']);
});

gulp.task('watch', gulp.series('build', function() {
return gulp.watch('src/*.js', gulp.series('clean', 'build'));
}));

// gulp tag -> Tag this release
gulp.task('tag', ['changes'], function() {
const version = require('./package.json').version;
const tag = 'v' + version;

gutil.log('Tagging this release', tag);
return gulp.src('.changes')
.pipe( exec('git add package.json CHANGELOG.md') )
.pipe( exec('git commit --allow-empty -m "Version ' + version + '"') )
.pipe( exec('git tag ' + tag + ' --file .changes') )
.pipe( exec('git push origin ' + tag) )
.pipe( exec('git push origin master') );
});
// gulp -> gulp watch
gulp.task('default', gulp.series('watch'));

// Generate a change log summary for this release
// git tag uses the generated .changes file
Expand All @@ -79,4 +57,19 @@ gulp.task('changes', function() {
File.writeFileSync('.changes', changes);
});

// gulp tag -> Tag this release
gulp.task('tag', gulp.series('changes', function() {
const version = require('./package.json').version;
const tag = 'v' + version;

gutil.log('Tagging this release', tag);
return gulp.src('.changes')
.pipe( exec('git add package.json CHANGELOG.md') )
.pipe( exec('git commit --allow-empty -m "Version ' + version + '"') )
.pipe( exec('git tag ' + tag + ' --file .changes') )
.pipe( exec('git push origin ' + tag) )
.pipe( exec('git push origin master') );
}));



Loading