Skip to content

Commit

Permalink
Merge pull request #266 from Geotab/MYG-47663_Convert_API_Runner_to_R…
Browse files Browse the repository at this point in the history
…eact_&_add_various_new_features

Myg 47663 convert api runner to react & add various new features
  • Loading branch information
beefo authored Dec 12, 2022
2 parents 8d83ad5 + 90dcb90 commit abf71a4
Show file tree
Hide file tree
Showing 39 changed files with 20,303 additions and 11,557 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ root = true

[*]
indent_style = space
indent_size = 2
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
Expand Down
9 changes: 6 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ GEM
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
ffi (1.15.5-x64-mingw-ucrt)
ffi (1.15.5)
ffi (1.15.5-x64-mingw32)
ffi (1.15.5-x64-unknown)
forwardable-extended (2.6.0)
http_parser.rb (0.8.0)
i18n (1.10.0)
Expand Down Expand Up @@ -107,8 +108,10 @@ GEM
unicode-display_width (1.8.0)

PLATFORMS
x64-mingw-ucrt
ruby
x64-mingw32
x64-unknown
x86_64-linux

DEPENDENCIES
jekyll
Expand All @@ -121,4 +124,4 @@ DEPENDENCIES
kramdown

BUNDLED WITH
2.3.6
2.3.25
23 changes: 0 additions & 23 deletions gulp/tasks/assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,26 +84,3 @@ gulp.task('styles', () =>
.pipe(gulp.dest('.tmp/assets/stylesheets'))
.pipe(when(!argv.prod, browserSync.stream()))
);

// Function to properly reload your browser
function reload(done) {
browserSync.reload();
done();
}
// 'gulp serve' -- open up your website in your browser and watch for changes
// in all your files and update them when needed
gulp.task('serve', (done) => {
browserSync.init({
// tunnel: true,
// open: false,
server: ['.tmp', 'dist']
});
done();

// Watch various files for changes and do the needful
gulp.watch(['src/**/*.md', 'src/**/*.html', 'src/**/*.yml'], gulp.series('build:site', reload));
gulp.watch(['src/**/*.xml', 'src/**/*.txt'], gulp.series('site', reload));
gulp.watch('src/assets/javascript/**/*.js', gulp.series('scripts', reload));
gulp.watch('src/assets/scss/**/*.scss', gulp.series('styles'));
gulp.watch('src/assets/images/**/*', gulp.series('images', reload));
});
2 changes: 1 addition & 1 deletion gulp/tasks/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const argv = require('yargs').argv;
// 'gulp jekyll:tmp' -- copies your Jekyll site to a temporary directory
// to be processed
gulp.task('site:tmp', () =>
gulp.src(['src/**/*', '!src/assets/**/*', '!src/assets'], {dot: true})
gulp.src(['src/**/*', '!src/assets/**/*', '!src/assets', '!src/**/*.jsx'], {dot: true})
.pipe(gulp.dest('.tmp/src'))
.pipe(size({title: 'Jekyll'}))
);
Expand Down
26 changes: 26 additions & 0 deletions gulp/tasks/serve.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const gulp = require("gulp");
const browserSync = require('browser-sync').create();

// Function to properly reload your browser
function reload(done) {
browserSync.reload();
done();
}
// 'gulp serve' -- open up your website in your browser and watch for changes
// in all your files and update them when needed
gulp.task('serve', (done) => {
browserSync.init({
// tunnel: true,
// open: false,
server: ['dist']
// server: ['.tmp', 'dist']
});
done();

// Watch various files for changes and do the needful
gulp.watch(['src/**/*.md', 'src/**/*.html', 'src/**/*.yml', 'src/**/*.js', 'src/**/*.css', 'src/**/*.jsx'], gulp.series('webpack', 'build:site', reload));
gulp.watch(['src/**/*.xml', 'src/**/*.txt'], gulp.series('site', reload));
gulp.watch('src/assets/javascript/**/*.js', gulp.series('scripts', reload));
gulp.watch('src/assets/scss/**/*.scss', gulp.series('styles'));
gulp.watch('src/assets/images/**/*', gulp.series('images', reload));
});
19 changes: 19 additions & 0 deletions gulp/tasks/webpack.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const gulp = require("gulp");
const webpack = require('webpack')
const webpackConfig = require('../../webpack.config')
const argv = require('yargs').argv;

function webpackTask(cb) {
return new Promise((resolve, reject) => {
webpack(webpackConfig, (err, stats) => {
if (err) {
return reject(err)
}
if (stats.hasErrors()) {
return reject(new Error(stats.compilation.errors.join('\n')))
}
resolve()
})
})
}
gulp.task("webpack", webpackTask);
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ gulp.task('clean', gulp.parallel('clean:assets', 'clean:gzip', 'clean:dist', 'cl

// 'gulp build' -- same as 'gulp' but doesn't serve your site in your browser
// 'gulp build --prod' -- same as above but with production settings
gulp.task('build', gulp.series('clean', 'assets', 'build:site', 'html'));
gulp.task('build', gulp.series('clean', 'assets', 'webpack', 'build:site', 'html'));

// You can also just use 'gulp upload' but this way you can see all the main
// tasks in the gulpfile instead of having to hunt for the deploy tasks
Expand Down
Loading

0 comments on commit abf71a4

Please sign in to comment.