gulp-resume
Advanced tools
Comparing version 0.2.0 to 0.3.0
35
index.js
'use strict'; | ||
var through = require('through2'); | ||
var gutil = require('gulp-util'); | ||
var request = require('request'); | ||
const through = require('through2'); | ||
const request = require('request'); | ||
var PluginError = gutil.PluginError; | ||
const PluginError = require('plugin-error'); | ||
var PLUGIN_NAME = 'gulp-resume'; | ||
var THEME_SERVER = 'http://themes.jsonresume.org/theme/'; | ||
var THEME_REGISTRY = 'http://themes.jsonresume.org/themes.json'; | ||
var SUPPORTED_FORMATS = ['html']; | ||
var SUPPORTED_THEMES = []; | ||
var DEFAULT_THEMES = [ | ||
const PLUGIN_NAME = 'gulp-resume'; | ||
const THEME_SERVER = 'http://themes.jsonresume.org/theme/'; | ||
const THEME_REGISTRY = 'http://themes.jsonresume.org/themes.json'; | ||
const SUPPORTED_FORMATS = ['html']; | ||
let SUPPORTED_THEMES = []; | ||
const DEFAULT_THEMES = [ | ||
'elegant', 'paper', 'kendall', 'flat', | ||
@@ -20,6 +19,6 @@ 'modern', 'classy', 'class', 'short', | ||
var getThemes = function (options, cb) { | ||
const getThemes = function (options, cb) { | ||
options.url = THEME_REGISTRY; | ||
request(options, function (err, resp, body) { | ||
var themes = Object.keys(JSON.parse(body).themes) || DEFAULT_THEMES; | ||
const themes = Object.keys(JSON.parse(body).themes) || DEFAULT_THEMES; | ||
cb(themes, err); | ||
@@ -32,8 +31,8 @@ }); | ||
var format = options.format || 'html'; | ||
var theme = options.theme || 'flat'; | ||
var proxy = options.proxy || null; | ||
const format = options.format || 'html'; | ||
const theme = options.theme || 'flat'; | ||
const proxy = options.proxy || null; | ||
var stream = through.obj(function (file, enc, cb) { | ||
var _self = this; | ||
const stream = through.obj(function (file, enc, cb) { | ||
const _self = this; | ||
@@ -45,3 +44,3 @@ if (SUPPORTED_FORMATS.indexOf(format) === -1) { | ||
var requestOptions = {}; | ||
const requestOptions = {}; | ||
@@ -48,0 +47,0 @@ if (proxy) { |
{ | ||
"name": "gulp-resume", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "gulp plugin to generate resumes from jsonresume.org", | ||
@@ -44,3 +44,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"gulp-util": "^3.0.7", | ||
"plugin-error": "0.1.2", | ||
"request": "^2.69.0", | ||
@@ -47,0 +47,0 @@ "through2": "^2.0.1" |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6053
5
71
+ Addedplugin-error@0.1.2
+ Addedansi-cyan@0.1.1(transitive)
+ Addedansi-red@0.1.1(transitive)
+ Addedarr-diff@1.1.0(transitive)
+ Addedarr-flatten@1.1.0(transitive)
+ Addedarr-union@2.1.0(transitive)
+ Addedarray-slice@0.2.3(transitive)
+ Addedextend-shallow@1.1.4(transitive)
+ Addedkind-of@1.1.0(transitive)
+ Addedplugin-error@0.1.2(transitive)
- Removedgulp-util@^3.0.7
- Removedansi-gray@0.1.1(transitive)
- Removedansi-regex@2.1.1(transitive)
- Removedansi-styles@2.2.1(transitive)
- Removedarray-differ@1.0.0(transitive)
- Removedarray-uniq@1.0.3(transitive)
- Removedbeeper@1.1.1(transitive)
- Removedchalk@1.1.3(transitive)
- Removedclone@1.0.4(transitive)
- Removedclone-stats@0.0.1(transitive)
- Removedcolor-support@1.1.3(transitive)
- Removeddateformat@2.2.0(transitive)
- Removedduplexer2@0.0.2(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedfancy-log@1.3.3(transitive)
- Removedglogg@1.0.2(transitive)
- Removedgulp-util@3.0.8(transitive)
- Removedgulplog@1.0.0(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedhas-gulplog@0.1.0(transitive)
- Removedisarray@0.0.1(transitive)
- Removedlodash._basecopy@3.0.1(transitive)
- Removedlodash._basetostring@3.0.1(transitive)
- Removedlodash._basevalues@3.0.0(transitive)
- Removedlodash._getnative@3.9.1(transitive)
- Removedlodash._isiterateecall@3.0.9(transitive)
- Removedlodash._reescape@3.0.0(transitive)
- Removedlodash._reevaluate@3.0.0(transitive)
- Removedlodash._reinterpolate@3.0.0(transitive)
- Removedlodash._root@3.0.1(transitive)
- Removedlodash.escape@3.2.0(transitive)
- Removedlodash.isarguments@3.1.0(transitive)
- Removedlodash.isarray@3.0.4(transitive)
- Removedlodash.keys@3.1.2(transitive)
- Removedlodash.restparam@3.6.1(transitive)
- Removedlodash.template@3.6.2(transitive)
- Removedlodash.templatesettings@3.1.1(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmultipipe@0.1.2(transitive)
- Removedobject-assign@3.0.0(transitive)
- Removedparse-node-version@1.0.1(transitive)
- Removedreadable-stream@1.1.14(transitive)
- Removedreplace-ext@0.0.1(transitive)
- Removedsparkles@1.0.1(transitive)
- Removedstring_decoder@0.10.31(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedsupports-color@2.0.0(transitive)
- Removedtime-stamp@1.1.0(transitive)
- Removedvinyl@0.5.3(transitive)