Feature/#35 build tools #36

Merged
Serraniel merged 41 commits from feature/#35-build-tools into develop 2020-09-06 21:20:03 +02:00
2 changed files with 93 additions and 20 deletions
Showing only changes of commit 24e1f7c710 - Show all commits

View file

@ -7,6 +7,7 @@ const browserify = require('browserify');
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
const babelify = require('babelify');
const source = require('vinyl-source-stream');
const buffer = require('vinyl-buffer');
const merge = require('merge-stream');
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
const fs = require('fs');
const $ = gulpLoadPlugins()
@ -33,17 +34,30 @@ const tmp = {
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
styles: '.tmp/stylesheets',
scripts: '.tmp/javascript',
images: '.tmp/images',
vendor: '.tmp/libs',
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
}
// Dist path
const dist = {
root: 'dist',
manifests: 'dist/manifests',
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
styles: 'dist/stylesheets',
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
scripts: 'dist/javascript',
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
images: 'dist/images',
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
vendor: 'dist/libs',
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
chrome: {
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
root: 'dist/chrome',
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
styles: 'dist/chrome/stylesheets',
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
scripts: 'dist/chrome/javascript',
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
images: 'dist/chrome/images',
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
},
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
firefox: {
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
root: 'dist/firefox',
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
styles: 'dist/firefox/stylesheets',
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
scripts: 'dist/firefox/javascript',
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
images: 'dist/firefox/images',
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
},
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
opera: {
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
root: 'dist/opera',
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
styles: 'dist/opera/stylesheets',
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
scripts: 'dist/opera/javascript',
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
images: 'dist/opera/images',
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
},
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
zip: 'dist/zips',
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
}
// Build mode
@ -169,24 +183,82 @@ gulp.task('build', gulp.series('clean:build', 'manifests', 'images', 'scripts',
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
DIST CLEAN ALL
============================================================================ */
gulp.task('dist:copy', (done) => {
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
// copy vendor
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
gulp.src(`${tmp.vendor}/**/*`)
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
.pipe(gulp.dest(dist.vendor))
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
gulp.task('dist:chrome', (done) => {
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
return merge(
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
// copy images
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
gulp.src(`${tmp.images}/**/*`)
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
.pipe(gulp.dest(dist.chrome.images)),
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
// copy images
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
gulp.src(`${tmp.images}/**/*`)
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
.pipe(gulp.dest(dist.images))
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
// copy scripts
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
gulp.src(`${tmp.scripts}/**/*.{min.js,min.js.gz}`)
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
.pipe(gulp.dest(dist.chrome.scripts)),
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
// copy scripts
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
gulp.src(`${tmp.scripts}/**/*.{min.js,min.js.gz}`)
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
.pipe(gulp.dest(dist.scripts))
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
// copy styles
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
gulp.src(`${tmp.styles}/*.{min.css,min.css.gz}`)
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
.pipe(gulp.dest(dist.chrome.styles)),
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
// copy styles
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
gulp.src(`${tmp.styles}/*.{min.css,min.css.gz}`)
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
.pipe(gulp.dest(dist.styles))
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
gulp.src(`${tmp.manifests}/chrome*`)
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
.pipe($.rename('manifest.json'))
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
.pipe(gulp.dest(dist.chrome.root))
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
);
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
})
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
gulp.task('dist:firefox', (done) => {
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
return merge(
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
// copy images
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
gulp.src(`${tmp.images}/**/*`)
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
.pipe(gulp.dest(dist.firefox.images)),
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
// copy scripts
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
gulp.src(`${tmp.scripts}/**/*.{min.js,min.js.gz}`)
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
.pipe(gulp.dest(dist.firefox.scripts)),
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
// copy styles
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
gulp.src(`${tmp.styles}/*.{min.css,min.css.gz}`)
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
.pipe(gulp.dest(dist.firefox.styles)),
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
gulp.src(`${tmp.manifests}/firefox*`)
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
.pipe($.rename('manifest.json'))
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
.pipe(gulp.dest(dist.firefox.root))
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
);
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
})
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
gulp.task('dist:opera', (done) => {
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
return merge(
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
// copy images
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
gulp.src(`${tmp.images}/**/*`)
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
.pipe(gulp.dest(dist.opera.images)),
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
// copy scripts
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
gulp.src(`${tmp.scripts}/**/*.{min.js,min.js.gz}`)
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
.pipe(gulp.dest(dist.opera.scripts)),
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
// copy styles
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
gulp.src(`${tmp.styles}/*.{min.css,min.css.gz}`)
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
.pipe(gulp.dest(dist.opera.styles)),
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
gulp.src(`${tmp.manifests}/opera*`)
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
.pipe($.rename('manifest.json'))
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
.pipe(gulp.dest(dist.opera.root))
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
);
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
})
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
gulp.task('dist:copy', gulp.series('dist:chrome', 'dist:firefox', 'dist:opera'));
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
gulp.task('dist:zip', (done) => {
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
gulp.src(`${dist.chrome.root}/**/*`)
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
.pipe($.zip('chrome.zip'))
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
.pipe(gulp.dest(dist.root));
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
gulp.src(`${dist.firefox.root}/**/*`)
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
.pipe($.zip('firefox.zip'))
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
.pipe(gulp.dest(dist.root));
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
gulp.src(`${dist.opera.root}/**/*`)
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
.pipe($.zip('opera.zip'))
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
.pipe(gulp.dest(dist.root));
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
done();
})
gulp.task('dist', gulp.series('clean', 'build', 'dist:copy'));
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```
gulp.task('dist', gulp.series('clean', 'build', 'dist:copy', 'dist:zip'));
Serraniel commented 2020-09-04 16:08:00 +02:00 (Migrated from github.com)
Review
        debug: isDev
```suggestion debug: isDev ```

View file

@ -34,6 +34,7 @@
Serraniel commented 2020-08-29 17:31:34 +02:00 (Migrated from github.com)
Review

Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.

Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
Serraniel commented 2020-08-29 17:31:34 +02:00 (Migrated from github.com)
Review

Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.

Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
"gulp-sourcemaps": "^2.6.5",
"gulp-uglify-es": "^2.0.0",
"gulp-zip": "^5.0.2",
"merge-stream": "^2.0.0",
Serraniel commented 2020-08-29 17:31:34 +02:00 (Migrated from github.com)
Review

Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.

Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
"sass": "^1.26.10",
"vinyl-buffer": "^1.0.1",
"vinyl-source-stream": "^2.0.0"

Serraniel commented 2020-08-29 17:31:34 +02:00 (Migrated from github.com)
Review

Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.

Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
Serraniel commented 2020-08-29 17:31:34 +02:00 (Migrated from github.com)
Review

Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.

Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.