#!/usr/bin/env node
-'use strict';
-
-const Package = require('../package.json');
-const Config = require('../config/config');
-const Blog = require('..');
-const Minimist = require('minimist');
+import Config from '../config/config.js';
+import Blog from '../lib/blog.js';
+import Minimist from 'minimist';
const internals = {
blog: new Blog(Config),
const value = parsedArguments[argument];
if (argument === 'version') {
- console.log(Package.version);
+ console.log('6.0.0');
return;
}
_printUsage() {
console.error('\nUsage:\n');
- console.error('blog --add path/to/blog_post\t\t(creates new blog post)');
- console.error('blog --update path/to/blog_post\t\t(updates latest blog post)');
+ console.error('blog --add <path_to_post>\t\t(creates new blog post)');
+ console.error('blog --update <path_to_post>\t\t(updates latest blog post)');
console.error('blog --generate \t\t\t(generates the blog assets)');
console.error('blog --publish <bucket> \t\t(publishes the blog to an S3 bucket)');
console.error('blog --publish-archive <destination> \t(publishes the archive to a remote host)');