Skip to content

Commit

Permalink
Added transpiler to deal with es6+ operations (fixes #48)
Browse files Browse the repository at this point in the history
  • Loading branch information
felipenmoura committed Jul 28, 2020
1 parent 18bfede commit 0a78a22
Show file tree
Hide file tree
Showing 6 changed files with 1,564 additions and 660 deletions.
9 changes: 9 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-proposal-object-rest-spread"
]
}
2 changes: 1 addition & 1 deletion dist/share-min.js

Large diffs are not rendered by default.

889 changes: 360 additions & 529 deletions dist/share.js

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const gulp = require('gulp');
const babel = require('gulp-babel');

const distPath = 'dist/';
const srcPath = 'src/';
Expand Down Expand Up @@ -27,7 +28,7 @@ gulp.task('webserver', async function() {
root: ['.', 'dist']
});
});

gulp.task('livereload', async function() {
gulp.src(['dist/scripts/*.js'])
.pipe(watch())
Expand All @@ -36,9 +37,16 @@ gulp.task('livereload', async function() {

gulp.task('minifyJs', async function () {
gulp.src([srcPath + '/*.js'])
.pipe(
babel({
presets: ['@babel/preset-env']
})
)
.pipe(minify())
.pipe(gulp.dest('dist'))
});

// transform-object-rest-spread

// gulp.task('default', gulp.parallel(['minifyJs', 'livereload', 'watch']));
gulp.task('default', gulp.parallel(['minifyJs']));
Loading

0 comments on commit 0a78a22

Please sign in to comment.