From c6efdeca057580093d072469eafb679d1eb7b8a3 Mon Sep 17 00:00:00 2001 From: hacksalot Date: Wed, 14 Feb 2018 10:13:48 -0500 Subject: [PATCH] chore: decaffeinate: remove generated dist/ folder --- .npmignore | 1 - BUILDING.md | 16 +- Gruntfile.js | 33 +- dist/cli/analyze.hbs | 30 - dist/cli/error.js | 287 --------- dist/cli/help/analyze.txt | 25 - dist/cli/help/build.txt | 69 --- dist/cli/help/convert.txt | 33 -- dist/cli/help/help.txt | 23 - dist/cli/help/new.txt | 29 - dist/cli/help/peek.txt | 31 - dist/cli/help/use.txt | 70 --- dist/cli/help/validate.txt | 26 - dist/cli/index.js | 22 - dist/cli/main.js | 371 ------------ dist/cli/msg.js | 17 - dist/cli/msg.yml | 141 ----- dist/cli/out.js | 190 ------ dist/core/default-formats.js | 66 --- dist/core/default-options.js | 20 - dist/core/empty-jrs.json | 77 --- dist/core/event-codes.js | 42 -- dist/core/fluent-date.js | 101 ---- dist/core/fresh-resume.js | 478 --------------- dist/core/fresh-theme.js | 263 --------- dist/core/jrs-resume.js | 342 ----------- dist/core/jrs-theme.js | 99 ---- dist/core/resume-factory.js | 132 ----- dist/core/resume.json | 380 ------------ dist/core/status-codes.js | 44 -- dist/generators/base-generator.js | 34 -- dist/generators/html-generator.js | 43 -- dist/generators/html-pdf-cli-generator.js | 126 ---- dist/generators/html-png-generator.js | 65 -- dist/generators/json-generator.js | 38 -- dist/generators/json-yaml-generator.js | 40 -- dist/generators/latex-generator.js | 23 - dist/generators/markdown-generator.js | 23 - dist/generators/template-generator.js | 278 --------- dist/generators/text-generator.js | 23 - dist/generators/word-generator.js | 20 - dist/generators/xml-generator.js | 21 - dist/generators/yaml-generator.js | 23 - dist/helpers/block-helpers.js | 74 --- dist/helpers/console-helpers.js | 64 -- dist/helpers/generic-helpers.js | 687 ---------------------- dist/helpers/handlebars-helpers.js | 97 --- dist/helpers/underscore-helpers.js | 34 -- dist/index.js | 44 -- dist/inspectors/duration-inspector.js | 65 -- dist/inspectors/gap-inspector.js | 154 ----- dist/inspectors/keyword-inspector.js | 78 --- dist/inspectors/totals-inspector.js | 46 -- dist/renderers/handlebars-generator.js | 109 ---- dist/renderers/jrs-generator.js | 61 -- dist/renderers/underscore-generator.js | 91 --- dist/utils/file-contains.js | 12 - dist/utils/fresh-version-regex.js | 27 - dist/utils/html-to-wpml.js | 67 --- dist/utils/md2chalk.js | 28 - dist/utils/rasterize.js | 82 --- dist/utils/resume-detector.js | 19 - dist/utils/resume-scrubber.js | 55 -- dist/utils/safe-json-loader.js | 35 -- dist/utils/safe-spawn.js | 43 -- dist/utils/string-transformer.js | 61 -- dist/utils/string.js | 25 - dist/utils/syntax-error-ex.js | 51 -- dist/verbs/analyze.js | 99 ---- dist/verbs/build.js | 484 --------------- dist/verbs/convert.js | 166 ------ dist/verbs/create.js | 92 --- dist/verbs/peek.js | 100 ---- dist/verbs/validate.js | 132 ----- dist/verbs/verb.js | 100 ---- package.json | 4 +- test/scripts/test-dates.js | 4 +- test/scripts/test-fresh-sheet.js | 4 +- test/scripts/test-jrs-sheet.js | 4 +- test/scripts/test-output.js | 4 +- test/scripts/test-themes.js | 4 +- test/scripts/test-verbs.js | 4 +- 82 files changed, 22 insertions(+), 7503 deletions(-) delete mode 100644 dist/cli/analyze.hbs delete mode 100644 dist/cli/error.js delete mode 100644 dist/cli/help/analyze.txt delete mode 100644 dist/cli/help/build.txt delete mode 100644 dist/cli/help/convert.txt delete mode 100644 dist/cli/help/help.txt delete mode 100644 dist/cli/help/new.txt delete mode 100644 dist/cli/help/peek.txt delete mode 100644 dist/cli/help/use.txt delete mode 100644 dist/cli/help/validate.txt delete mode 100644 dist/cli/index.js delete mode 100644 dist/cli/main.js delete mode 100644 dist/cli/msg.js delete mode 100644 dist/cli/msg.yml delete mode 100644 dist/cli/out.js delete mode 100644 dist/core/default-formats.js delete mode 100644 dist/core/default-options.js delete mode 100644 dist/core/empty-jrs.json delete mode 100644 dist/core/event-codes.js delete mode 100644 dist/core/fluent-date.js delete mode 100644 dist/core/fresh-resume.js delete mode 100644 dist/core/fresh-theme.js delete mode 100644 dist/core/jrs-resume.js delete mode 100644 dist/core/jrs-theme.js delete mode 100644 dist/core/resume-factory.js delete mode 100644 dist/core/resume.json delete mode 100644 dist/core/status-codes.js delete mode 100644 dist/generators/base-generator.js delete mode 100644 dist/generators/html-generator.js delete mode 100644 dist/generators/html-pdf-cli-generator.js delete mode 100644 dist/generators/html-png-generator.js delete mode 100644 dist/generators/json-generator.js delete mode 100644 dist/generators/json-yaml-generator.js delete mode 100644 dist/generators/latex-generator.js delete mode 100644 dist/generators/markdown-generator.js delete mode 100644 dist/generators/template-generator.js delete mode 100644 dist/generators/text-generator.js delete mode 100644 dist/generators/word-generator.js delete mode 100644 dist/generators/xml-generator.js delete mode 100644 dist/generators/yaml-generator.js delete mode 100644 dist/helpers/block-helpers.js delete mode 100644 dist/helpers/console-helpers.js delete mode 100644 dist/helpers/generic-helpers.js delete mode 100644 dist/helpers/handlebars-helpers.js delete mode 100644 dist/helpers/underscore-helpers.js delete mode 100644 dist/index.js delete mode 100644 dist/inspectors/duration-inspector.js delete mode 100644 dist/inspectors/gap-inspector.js delete mode 100644 dist/inspectors/keyword-inspector.js delete mode 100644 dist/inspectors/totals-inspector.js delete mode 100644 dist/renderers/handlebars-generator.js delete mode 100644 dist/renderers/jrs-generator.js delete mode 100644 dist/renderers/underscore-generator.js delete mode 100644 dist/utils/file-contains.js delete mode 100644 dist/utils/fresh-version-regex.js delete mode 100644 dist/utils/html-to-wpml.js delete mode 100644 dist/utils/md2chalk.js delete mode 100644 dist/utils/rasterize.js delete mode 100644 dist/utils/resume-detector.js delete mode 100644 dist/utils/resume-scrubber.js delete mode 100644 dist/utils/safe-json-loader.js delete mode 100644 dist/utils/safe-spawn.js delete mode 100644 dist/utils/string-transformer.js delete mode 100644 dist/utils/string.js delete mode 100644 dist/utils/syntax-error-ex.js delete mode 100644 dist/verbs/analyze.js delete mode 100644 dist/verbs/build.js delete mode 100644 dist/verbs/convert.js delete mode 100644 dist/verbs/create.js delete mode 100644 dist/verbs/peek.js delete mode 100644 dist/verbs/validate.js delete mode 100644 dist/verbs/verb.js diff --git a/.npmignore b/.npmignore index 21b8c96..e313bb9 100644 --- a/.npmignore +++ b/.npmignore @@ -1,4 +1,3 @@ -src/ assets/ test/ doc/ diff --git a/BUILDING.md b/BUILDING.md index e3c5127..1e95434 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -33,22 +33,14 @@ will reference your local installation (you may need to ## Making changes -1. HackMyResume sources live in the [`/src`][src] folder. Always make your edits -there, never in the generated `/dist` folder. +1. HackMyResume sources live in the [`/src`][src] folder. -2. After making your changes, run `grunt build` to package the HackMyResume -sources to the `/dist` folder. This will transform CoffeeScript files to -JavaScript and perform other build steps as necessary. In the future, a watch -task or guardfile will be added to automate this step. - -3. Do local spot testing with `hackmyresume` as normal. - -4. When you're ready to submit your changes, run `grunt test` to run the HMR +2. When you're ready to submit your changes, run `grunt test` to run the HMR test suite. Fix any errors that occur. -5. Commit and push your changes. +3. Commit and push your changes. -6. Submit a pull request targeting the HackMyResume `dev` branch. +4. Submit a pull request targeting the HackMyResume `dev` branch. [node]: https://nodejs.org/en/ diff --git a/Gruntfile.js b/Gruntfile.js index 35265cb..6152c4a 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -6,28 +6,6 @@ module.exports = function (grunt) { pkg: grunt.file.readJSON('package.json'), - copy: { - main: { - expand: true, - cwd: 'src', - src: ['**/*','!**/*.coffee'], - dest: 'dist/', - } - }, - - coffee: { - main: { - options: { - sourceMap: true - }, - expand: true, - cwd: 'src', - src: ['**/*.coffee'], - dest: 'dist/', - ext: '.js' - } - }, - simplemocha: { options: { globals: ['expect', 'should'], @@ -40,19 +18,16 @@ module.exports = function (grunt) { }, clean: { - test: ['test/sandbox'], - dist: ['dist'] + test: ['test/sandbox'] }, eslint: { - target: ['Gruntfile.js', 'dist/cli/**/*.js', 'test/*.js'] + target: ['Gruntfile.js', 'src/**/*.js', 'test/*.js'] } }; grunt.initConfig( opts ); - grunt.loadNpmTasks('grunt-contrib-coffee'); - grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-simple-mocha'); grunt.loadNpmTasks('grunt-eslint'); grunt.loadNpmTasks('grunt-contrib-clean'); @@ -67,11 +42,11 @@ module.exports = function (grunt) { // Use 'grunt build' to build HMR grunt.registerTask('build', 'Build the HackMyResume application.', function() { - grunt.task.run( ['clean:dist','copy','coffee','eslint'] ); + grunt.task.run( ['eslint'] ); } ); // Default task does everything - grunt.registerTask('default', [ 'test', 'document' ]); + grunt.registerTask('default', [ 'test' ]); }; diff --git a/dist/cli/analyze.hbs b/dist/cli/analyze.hbs deleted file mode 100644 index 124aa5c..0000000 --- a/dist/cli/analyze.hbs +++ /dev/null @@ -1,30 +0,0 @@ - -{{style "SECTIONS (" "bold"}}{{style totals.numSections "white" }}{{style ")" "bold"}} - - employment: {{v totals.totals.employment "-" 2 "bold" }} - projects: {{v totals.totals.projects "-" 2 "bold" }} - education: {{v totals.totals.education "-" 2 "bold" }} - service: {{v totals.totals.service "-" 2 "bold" }} - skills: {{v totals.totals.skills "-" 2 "bold" }} - writing: {{v totals.totals.writing "-" 2 "bold" }} - speaking: {{v totals.totals.speaking "-" 2 "bold" }} - reading: {{v totals.totals.reading "-" 2 "bold" }} - social: {{v totals.totals.social "-" 2 "bold" }} - references: {{v totals.totals.references "-" 2 "bold" }} - testimonials: {{v totals.totals.testimonials "-" 2 "bold" }} - languages: {{v totals.totals.languages "-" 2 "bold" }} - interests: {{v totals.totals.interests "-" 2 "bold" }} - -{{style "COVERAGE (" "bold"}}{{style coverage.pct "white"}}{{style ")" "bold"}} - - Total Days: {{v coverage.duration.total "-" 5 "bold" }} - Employed: {{v coverage.duration.work "-" 5 "bold" }} - Gaps: {{v coverage.gaps.length "-" 5 "bold" }} [{{#if coverage.gaps.length }}{{#each coverage.gaps }}{{#unless @first}} {{/unless}}{{gapLength duration }}{{/each}}{{/if}}] - Overlaps: {{v coverage.overlaps.length "-" 5 "bold" }} [{{#if coverage.overlaps.length }}{{#each coverage.overlaps }}{{#unless @first}} {{/unless}}{{gapLength duration }}{{/each}}{{/if}}] - -{{style "KEYWORDS (" "bold"}}{{style keywords.length "white" }}{{style ")" "bold"}} - -{{#each keywords }}{{{pad name 18}}}: {{v count "-" 5 "bold"}} mention{{#isPlural count}}s{{/isPlural}} -{{/each}} - ------------------------------- -{{v keywords.length "0" 9 "bold"}} {{style "KEYWORDS" "bold"}} {{v keywords.totalKeywords "0" 5 "bold"}} {{style "mentions" "bold"}} diff --git a/dist/cli/error.js b/dist/cli/error.js deleted file mode 100644 index f87ce4d..0000000 --- a/dist/cli/error.js +++ /dev/null @@ -1,287 +0,0 @@ -(function() { - /** - Error-handling routines for HackMyResume. - @module cli/error - @license MIT. See LICENSE.md for details. - */ - var FS, HMSTATUS, M2C, PATH, SyntaxErrorEx, WRAP, _defaultLog, assembleError, chalk, extend, printf; - - HMSTATUS = require('../core/status-codes'); - - FS = require('fs'); - - PATH = require('path'); - - WRAP = require('word-wrap'); - - M2C = require('../utils/md2chalk'); - - chalk = require('chalk'); - - extend = require('extend'); - - printf = require('printf'); - - SyntaxErrorEx = require('../utils/syntax-error-ex'); - - require('string.prototype.startswith'); - - /** Error handler for HackMyResume. All errors are handled here. - @class ErrorHandler */ - module.exports = { - init: function(debug, assert, silent) { - this.debug = debug; - this.assert = assert; - this.silent = silent; - this.msgs = require('./msg').errors; - return this; - }, - err: function(ex, shouldExit) { - var o, objError, stack, stackTrace; - // Short-circuit logging output if --silent is on - o = this.silent ? function() {} : _defaultLog; - if (ex.pass) { - // Special case; can probably be removed. - throw ex; - } - // Load error messages - this.msgs = this.msgs || require('./msg').errors; - // Handle packaged HMR exceptions - if (ex.fluenterror) { - // Output the error message - objError = assembleError.call(this, ex); - o(this['format_' + objError.etype](objError.msg)); - // Output the stack (sometimes) - if (objError.withStack) { - stack = ex.stack || (ex.inner && ex.inner.stack); - stack && o(chalk.gray(stack)); - } - if (shouldExit || ex.exit) { - if (this.debug) { - o(chalk.cyan('Exiting with error code ' + ex.fluenterror.toString())); - } - if (this.assert) { - ex.pass = true; - throw ex; - } - return process.exit(ex.fluenterror); - } - } else { - // Handle raw exceptions - o(ex); - stackTrace = ex.stack || (ex.inner && ex.inner.stack); - if (stackTrace && this.debug) { - return o(M2C(ex.stack || ex.inner.stack, 'gray')); - } - } - }, - format_error: function(msg) { - msg = msg || ''; - return chalk.red.bold(msg.toUpperCase().startsWith('ERROR:') ? msg : 'Error: ' + msg); - }, - format_warning: function(brief, msg) { - return chalk.yellow(brief) + chalk.yellow(msg || ''); - }, - format_custom: function(msg) { - return msg; - } - }; - - _defaultLog = function() { - return console.log.apply(console.log, arguments); // eslint-disable-line no-console - }; - - assembleError = function(ex) { - var etype, msg, quit, se, withStack; - msg = ''; - withStack = false; - quit = false; - etype = 'warning'; - if (this.debug) { - withStack = true; - } - switch (ex.fluenterror) { - case HMSTATUS.themeNotFound: - msg = printf(M2C(this.msgs.themeNotFound.msg, 'yellow'), ex.data); - break; - case HMSTATUS.copyCSS: - msg = M2C(this.msgs.copyCSS.msg, 'red'); - quit = false; - break; - case HMSTATUS.resumeNotFound: - //msg = M2C( this.msgs.resumeNotFound.msg, 'yellow' ); - msg += M2C(FS.readFileSync(PATH.resolve(__dirname, 'help/' + ex.verb + '.txt'), 'utf8'), 'white', 'yellow'); - break; - case HMSTATUS.missingCommand: - // msg = M2C( this.msgs.missingCommand.msg + " (", 'yellow'); - // msg += Object.keys( FCMD.verbs ).map( (v, idx, ar) -> - // return ( if idx == ar.length - 1 then chalk.yellow('or ') else '') + - // chalk.yellow.bold(v.toUpperCase()); - // ).join( chalk.yellow(', ')) + chalk.yellow(").\n\n"); - msg += M2C(FS.readFileSync(PATH.resolve(__dirname, 'help/use.txt'), 'utf8'), 'white', 'yellow'); - break; - case HMSTATUS.invalidCommand: - msg = printf(M2C(this.msgs.invalidCommand.msg, 'yellow'), ex.attempted); - break; - case HMSTATUS.resumeNotFoundAlt: - msg = M2C(this.msgs.resumeNotFoundAlt.msg, 'yellow'); - break; - case HMSTATUS.inputOutputParity: - msg = M2C(this.msgs.inputOutputParity.msg); - break; - case HMSTATUS.createNameMissing: - msg = M2C(this.msgs.createNameMissing.msg); - break; - case HMSTATUS.pdfGeneration: - msg = M2C(this.msgs.pdfGeneration.msg, 'bold'); - if (ex.inner) { - msg += chalk.red('\n' + ex.inner); - } - quit = false; - etype = 'error'; - break; - case HMSTATUS.invalid: - msg = M2C(this.msgs.invalid.msg, 'red'); - etype = 'error'; - break; - case HMSTATUS.generateError: - msg = (ex.inner && ex.inner.toString()) || ex; - quit = false; - etype = 'error'; - break; - case HMSTATUS.fileSaveError: - msg = printf(M2C(this.msgs.fileSaveError.msg), (ex.inner || ex).toString()); - etype = 'error'; - quit = false; - break; - case HMSTATUS.invalidFormat: - ex.data.forEach(function(d) { - return msg += printf(M2C(this.msgs.invalidFormat.msg, 'bold'), ex.theme.name.toUpperCase(), d.format.toUpperCase()); - }, this); - break; - case HMSTATUS.missingParam: - msg = printf(M2C(this.msgs.missingParam.msg), ex.expected, ex.helper); - break; - case HMSTATUS.invalidHelperUse: - msg = printf(M2C(this.msgs.invalidHelperUse.msg), ex.helper); - if (ex.error) { - msg += '\n--> ' + assembleError.call(this, extend(true, {}, ex, { - fluenterror: ex.error - })).msg; - } - quit = false; - etype = 'warning'; - break; - case HMSTATUS.notOnPath: - msg = printf(M2C(this.msgs.notOnPath.msg, 'bold'), ex.engine); - quit = false; - etype = 'error'; - break; - case HMSTATUS.readError: - if (!ex.quiet) { - // eslint-disable-next-line no-console - console.error(printf(M2C(this.msgs.readError.msg, 'red'), ex.file)); - } - msg = ex.inner.toString(); - etype = 'error'; - break; - case HMSTATUS.mixedMerge: - msg = M2C(this.msgs.mixedMerge.msg); - quit = false; - break; - case HMSTATUS.invokeTemplate: - msg = M2C(this.msgs.invokeTemplate.msg, 'red'); - msg += M2C('\n' + WRAP(ex.inner.toString(), { - width: 60, - indent: ' ' - }), 'gray'); - etype = 'custom'; - break; - case HMSTATUS.compileTemplate: - etype = 'error'; - break; - case HMSTATUS.themeLoad: - msg = M2C(printf(this.msgs.themeLoad.msg, ex.attempted.toUpperCase()), 'red'); - if (ex.inner && ex.inner.fluenterror) { - msg += M2C('\nError: ', 'red') + assembleError.call(this, ex.inner).msg; - } - quit = true; - etype = 'custom'; - break; - case HMSTATUS.parseError: - if (SyntaxErrorEx.is(ex.inner)) { - // eslint-disable-next-line no-console - console.error(printf(M2C(this.msgs.readError.msg, 'red'), ex.file)); - se = new SyntaxErrorEx(ex, ex.raw); - if ((se.line != null) && (se.col != null)) { - msg = printf(M2C(this.msgs.parseError.msg[0], 'red'), se.line, se.col); - } else if (se.line != null) { - msg = printf(M2C(this.msgs.parseError.msg[1], 'red'), se.line); - } else { - msg = M2C(this.msgs.parseError.msg[2], 'red'); - } - } else if (ex.inner && (ex.inner.line != null) && (ex.inner.col != null)) { - msg = printf(M2C(this.msgs.parseError.msg[0], 'red'), ex.inner.line, ex.inner.col); - } else { - msg = ex; - } - etype = 'error'; - break; - case HMSTATUS.createError: - // inner.code could be EPERM, EACCES, etc - msg = printf(M2C(this.msgs.createError.msg), ex.inner.path); - etype = 'error'; - break; - case HMSTATUS.validateError: - msg = printf(M2C(this.msgs.validateError.msg), ex.inner.toString()); - etype = 'error'; - break; - case HMSTATUS.invalidOptionsFile: - msg = M2C(this.msgs.invalidOptionsFile.msg[0]); - if (SyntaxErrorEx.is(ex.inner)) { - // eslint-disable-next-line no-console - console.error(printf(M2C(this.msgs.readError.msg, 'red'), ex.file)); - se = new SyntaxErrorEx(ex, ex.raw); - if ((se.line != null) && (se.col != null)) { - msg += printf(M2C(this.msgs.parseError.msg[0], 'red'), se.line, se.col); - } else if (se.line != null) { - msg += printf(M2C(this.msgs.parseError.msg[1], 'red'), se.line); - } else { - msg += M2C(this.msgs.parseError.msg[2], 'red'); - } - } else if (ex.inner && (ex.inner.line != null) && (ex.inner.col != null)) { - msg += printf(M2C(this.msgs.parseError.msg[0], 'red'), ex.inner.line, ex.inner.col); - } else { - msg += ex; - } - msg += this.msgs.invalidOptionsFile.msg[1]; - etype = 'error'; - break; - case HMSTATUS.optionsFileNotFound: - msg = M2C(this.msgs.optionsFileNotFound.msg); - etype = 'error'; - break; - case HMSTATUS.unknownSchema: - msg = M2C(this.msgs.unknownSchema.msg[0]); - //msg += "\n" + M2C( @msgs.unknownSchema.msg[1], 'yellow' ) - etype = 'error'; - break; - case HMSTATUS.themeHelperLoad: - msg = printf(M2C(this.msgs.themeHelperLoad.msg), ex.glob); - etype = 'error'; - break; - case HMSTATUS.invalidSchemaVersion: - msg = printf(M2C(this.msgs.invalidSchemaVersion.msg), ex.data); - etype = 'error'; - } - return { - msg: msg, // The error message to display - withStack: withStack, // Whether to include the stack - quit: quit, - etype: etype - }; - }; - -}).call(this); - -//# sourceMappingURL=error.js.map diff --git a/dist/cli/help/analyze.txt b/dist/cli/help/analyze.txt deleted file mode 100644 index 8e7187e..0000000 --- a/dist/cli/help/analyze.txt +++ /dev/null @@ -1,25 +0,0 @@ -**analyze** | Analyze a resume for statistical insight - -Usage: - - **hackmyresume ANALYZE ** - - The ANALYZE command evaluates the specified resume(s) for - coverage, duration, gaps, keywords, and other metrics. - - This command can be run against multiple resumes. Each - will be analyzed in turn. - -Parameters: - - **** - - Path to a FRESH or JRS resume. Multiple resumes can be - specified, separated by spaces. - - hackmyresume ANALYZE resume.json - hackmyresume ANALYZE r1.json r2.json r3.json - -Options: - - **None.** diff --git a/dist/cli/help/build.txt b/dist/cli/help/build.txt deleted file mode 100644 index 6a1d228..0000000 --- a/dist/cli/help/build.txt +++ /dev/null @@ -1,69 +0,0 @@ -**build** | Generate themed resumes in multiple formats - -Usage: - - **hackmyresume BUILD TO [--theme]** - **[--pdf] [--no-escape] [--private]** - - The BUILD command generates themed resumes and CVs in - multiple formats. Use it to create outbound resumes in - specific formats such HTML, MS Word, and PDF. - -Parameters: - - **** - - Path to a FRESH or JRS resume (*.json) containing your - resume data. Multiple resumes may be specified. - - If multiple resumes are specified, they will be merged - into a single resume prior to transformation. - - **** - - Path to the desired output resume. Multiple resumes - may be specified. The file extension will determine - the format. - - .all Generate all supported formats - .html HTML 5 - .doc MS Word - .pdf Adobe Acrobat PDF - .txt plain text - .md Markdown - .png PNG Image - .latex LaTeX - - Note: not all formats are supported by all themes! - Check the theme's documentation for details or use - the .all extension to build all available formats. - -Options: - - **--theme -t ** - - Path to a FRESH or JSON Resume theme OR the name of a - built-in theme. Valid theme names are 'modern', - 'positive', 'compact', 'awesome', and 'basis'. - - **--pdf -p ** - - Specify the PDF engine to use. Legal values are - 'none', 'wkhtmltopdf', 'phantom', or 'weasyprint'. - - **--no-escape** - - Disable escaping / encoding of resume data during - resume generation. Handlebars themes only. - - **--private** - - Include resume fields marked as private. - -Notes: - -The BUILD command can be run against multiple source as well -as multiple target resumes. If multiple source resumes are -provided, they will be merged into a single source resume -before generation. If multiple output resumes are provided, -each will be generated in turn. diff --git a/dist/cli/help/convert.txt b/dist/cli/help/convert.txt deleted file mode 100644 index 1a065d6..0000000 --- a/dist/cli/help/convert.txt +++ /dev/null @@ -1,33 +0,0 @@ -**convert** | Convert resumes between FRESH and JRS formats - -Usage: - - **hackmyresume CONVERT TO [--format]** - - The CONVERT command converts one or more resume documents - between the FRESH Resume Schema and JSON Resume formats. - -Parameters: - - **** - - Path to a FRESH or JRS resume. Multiple resumes can be - specified. - - **** - - The path of the converted resume. Multiple resumes can - be specified, one per provided input resume. - -Options: - - **--format -f ** - - The desired format for the new resume(s). Valid values - are 'FRESH', 'JRS', or, to target the latest edge - version of the JSON Resume Schema, 'JRS@1'. - - If this parameter is omitted, the destination format - will be inferred from the source resume's format. If - the source format is FRESH, the destination format - will be JSON Resume, and vice-versa. diff --git a/dist/cli/help/help.txt b/dist/cli/help/help.txt deleted file mode 100644 index 9b11cf3..0000000 --- a/dist/cli/help/help.txt +++ /dev/null @@ -1,23 +0,0 @@ -**help** | View help on a specific HackMyResume command - -Usage: - - **hackmyresume HELP []** - - The HELP command displays help information for a specific - HackMyResume command, including the HELP command itself. - -Parameters: - - **** - - The HackMyResume command to view help information for. - Must be BUILD, NEW, CONVERT, ANALYZE, VALIDATE, PEEK, - or HELP. - - hackmyresume help convert - hackmyresume help help - -Options: - - **None.** diff --git a/dist/cli/help/new.txt b/dist/cli/help/new.txt deleted file mode 100644 index 9487793..0000000 --- a/dist/cli/help/new.txt +++ /dev/null @@ -1,29 +0,0 @@ -**new** | Create a new FRESH or JRS resume document - -Usage: - - **hackmyresume NEW [--format]** - - The NEW command generates a new resume document in FRESH - or JSON Resume format. This document can serve as an - official source of truth for your resume and career data - as well an input to tools like HackMyResume. - -Parameters: - - **** - - The filename (relative or absolute path) of the resume - to be created. Multiple resume paths can be specified, - and each will be created in turn. - - hackmyresume NEW resume.json - hackmyresume NEW r1.json foo/r2.json ../r3.json - -Options: - - **--format -f ** - - The desired format for the new resume(s). Valid values - are 'FRESH', 'JRS', or, to target the latest edge - version of the JSON Resume Schema, 'JRS@1'. diff --git a/dist/cli/help/peek.txt b/dist/cli/help/peek.txt deleted file mode 100644 index 81fe6ac..0000000 --- a/dist/cli/help/peek.txt +++ /dev/null @@ -1,31 +0,0 @@ -**peek** | View portions of a resume from the command line - -Usage: - - **hackmyresume PEEK ** - - The PEEK command displays a specific piece or part of the - resume without requiring the resume to be opened in an - editor. - -Parameters: - - **** - - Path to a FRESH or JRS resume. Multiple resumes can be - specified, separated by spaces. - - hackmyresume PEEK r1.json r2.json r3.json "employment.history[2]" - - **** - - The resume property or field to be displayed. Can be - any valid resume path, for example: - - education[0] - info.name - employment.history[3].start - -Options: - - **None.** diff --git a/dist/cli/help/use.txt b/dist/cli/help/use.txt deleted file mode 100644 index 8ece4fc..0000000 --- a/dist/cli/help/use.txt +++ /dev/null @@ -1,70 +0,0 @@ -**HackMyResume** | A Swiss Army knife for resumes and CVs - -Usage: - - **hackmyresume [--version] [--help] [--silent] [--debug]** - **[--options] [--no-colors] []** - -Commands: (type "hackmyresume help COMMAND" for details) - - **BUILD** Build your resume to the destination format(s). - **ANALYZE** Analyze your resume for keywords, gaps, and metrics. - **VALIDATE** Validate your resume for errors and typos. - **NEW** Create a new resume in FRESH or JSON Resume format. - **CONVERT** Convert your resume between FRESH and JSON Resume. - **PEEK** View a specific field or element on your resume. - **HELP** View help on a specific HackMyResume command. - -Common Tasks: - - Generate a resume in a specific format (HTML, Word, PDF, etc.) - - **hackmyresume build rez.json to out/rez.html** - **hackmyresume build rez.json to out/rez.doc** - **hackmyresume build rez.json to out/rez.pdf** - **hackmyresume build rez.json to out/rez.txt** - **hackmyresume build rez.json to out/rez.md** - **hackmyresume build rez.json to out/rez.png** - **hackmyresume build rez.json to out/rez.tex** - - Build a resume to ALL available formats: - - **hackmyresume build rez.json to out/rez.all** - - Build a resume with a specific theme: - - **hackmyresume build rez.json to out/rez.all -t themeName** - - Create a new empty resume: - - **hackmyresume new rez.json** - - Convert a resume between FRESH and JRS formats: - - **hackmyresume convert rez.json converted.json** - - Analyze a resume for important metrics - - **hackmyresume analyze rez.json** - - Find more resume themes: - - **https://www.npmjs.com/search?q=jsonresume-theme** - **https://www.npmjs.com/search?q=fresh-theme** - **https://github.com/fresh-standard/fresh-themes** - - Validate a resume's structure and syntax: - - **hackmyresume validate resume.json** - - View help on a specific command: - - **hackmyresume help [build|convert|new|analyze|validate|peek|help]** - - Submit a bug or request: - - **https://githut.com/hacksalot/HackMyResume/issues** - -HackMyResume is free and open source software published -under the MIT license. For more information, visit the -HackMyResume website or GitHub project page. diff --git a/dist/cli/help/validate.txt b/dist/cli/help/validate.txt deleted file mode 100644 index 9bc1289..0000000 --- a/dist/cli/help/validate.txt +++ /dev/null @@ -1,26 +0,0 @@ -**validate** | Validate a resume for correctness - -Usage: - - **hackmyresume VALIDATE [--assert]** - - The VALIDATE command validates a FRESH or JRS document - against its governing schema, verifying that the resume - is correctly structured and formatted. - -Parameters: - - **** - - Path to a FRESH or JRS resume. Multiple resumes can be - specified. - - hackmyresume ANALYZE resume.json - hackmyresume ANALYZE r1.json r2.json r3.json - -Options: - - **--assert -a** - - Tell HackMyResume to return a non-zero process exit - code if a resume fails to validate. diff --git a/dist/cli/index.js b/dist/cli/index.js deleted file mode 100644 index b6ce89f..0000000 --- a/dist/cli/index.js +++ /dev/null @@ -1,22 +0,0 @@ -#! /usr/bin/env node - - - -/** -Command-line interface (CLI) for HackMyResume. -@license MIT. See LICENSE.md for details. -@module index.js -*/ - - - -try { - - require('./main')( process.argv ); - -} -catch( ex ) { - - require('./error').err( ex, true ); - -} diff --git a/dist/cli/main.js b/dist/cli/main.js deleted file mode 100644 index 677f37b..0000000 --- a/dist/cli/main.js +++ /dev/null @@ -1,371 +0,0 @@ -(function() { - /** - Definition of the `main` function. - @module cli/main - @license MIT. See LICENSE.md for details. - */ - /* Invoke a HackMyResume verb. */ - /* Success handler for verb invocations. Calls process.exit by default */ - /* Init options prior to setting up command infrastructure. */ - /* Massage command-line args and setup Commander.js. */ - /* - Initialize HackMyResume options. - TODO: Options loading is a little hacky, for two reasons: - - Commander.js idiosyncracies - - Need to accept JSON inputs from the command line. - */ - /* Simple logging placeholder. */ - /* Split multiple command-line filenames by the 'TO' keyword */ - var Command, EXTEND, FS, HMR, HMSTATUS, M2C, OUTPUT, PAD, PATH, PKG, _, _err, _exitCallback, _opts, _out, _title, chalk, execute, executeFail, executeSuccess, initOptions, initialize, loadOptions, logMsg, printf, safeLoadJSON, splitSrcDest; - - HMR = require('../index'); - - PKG = require('../../package.json'); - - FS = require('fs'); - - EXTEND = require('extend'); - - chalk = require('chalk'); - - PATH = require('path'); - - HMSTATUS = require('../core/status-codes'); - - safeLoadJSON = require('../utils/safe-json-loader'); - - //StringUtils = require '../utils/string.js' - _ = require('underscore'); - - OUTPUT = require('./out'); - - PAD = require('string-padding'); - - Command = require('commander').Command; - - M2C = require('../utils/md2chalk'); - - printf = require('printf'); - - _opts = {}; - - _title = chalk.white.bold('\n*** HackMyResume v' + PKG.version + ' ***'); - - _out = new OUTPUT(_opts); - - _err = require('./error'); - - _exitCallback = null; - - /* - A callable implementation of the HackMyResume CLI. Encapsulates the command - line interface as a single method accepting a parameter array. - @alias module:cli/main.main - @param rawArgs {Array} An array of command-line parameters. Will either be - process.argv (in production) or custom parameters (in test). - */ - module.exports = function(rawArgs, exitCallback) { - var args, initInfo, program; - initInfo = initialize(rawArgs, exitCallback); - if (initInfo === null) { - return; - } - args = initInfo.args; - // Create the top-level (application) command... - program = new Command('hackmyresume').version(PKG.version).description(chalk.yellow.bold('*** HackMyResume ***')).option('-s --silent', 'Run in silent mode').option('--no-color', 'Disable colors').option('--color', 'Enable colors').option('-d --debug', 'Enable diagnostics', false).option('-a --assert', 'Treat warnings as errors', false).option('-v --version', 'Show the version').allowUnknownOption(); - program.jsonArgs = initInfo.options; - // Create the NEW command - program.command('new').arguments('').option('-f --format ', 'FRESH or JRS format', 'FRESH').alias('create').description('Create resume(s) in FRESH or JSON RESUME format.').action((function(sources) { - execute.call(this, sources, [], this.opts(), logMsg); - })); - // Create the VALIDATE command - program.command('validate').arguments('').description('Validate a resume in FRESH or JSON RESUME format.').action(function(sources) { - execute.call(this, sources, [], this.opts(), logMsg); - }); - // Create the CONVERT command - program.command('convert').description('Convert a resume to/from FRESH or JSON RESUME format.').option('-f --format ', 'FRESH or JRS format and optional version', void 0).action(function() { - var x; - x = splitSrcDest.call(this); - execute.call(this, x.src, x.dst, this.opts(), logMsg); - }); - // Create the ANALYZE command - program.command('analyze').arguments('').option('--private', 'Include resume fields marked as private', false).description('Analyze one or more resumes.').action(function(sources) { - execute.call(this, sources, [], this.opts(), logMsg); - }); - // Create the PEEK command - //.action(( sources, sectionOrField ) -> - program.command('peek').arguments('').description('Peek at a resume field or section').action(function(sources) { - var dst; - dst = (sources && sources.length > 1) ? [sources.pop()] : []; - execute.call(this, sources, dst, this.opts(), logMsg); - }); - // Create the BUILD command - //.action(( sources, targets, options ) -> - program.command('build').alias('generate').option('-t --theme ', 'Theme name or path').option('-n --no-prettify', 'Disable HTML prettification', true).option('-c --css