Skip to content

Convert Batch Scripts to use ShellJS #46

@frastlin

Description

@frastlin

Hello,
Currently the batch scripts are not cross-platform. It is extremely easy to make them cross platform with a library called shellJS.
This will also fix:
#45
For example, here is the build script using shellJS:

var path = require('path');
var shell = require('shelljs');

console.log('Building...');
shell.rm('-rf', path.join(path.resolve('.') + 'docs'))
shell.exec('hugo')
shell.exec('sw-precache --root=docs && git add -A', function(error, stdout, stderr) {
  if (error !== null) {
    console.error(error);
    return;
  }
  console.log('Site built at /docs.');
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions