diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..97c1b36 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,18 @@ +# http://editorconfig.org + +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +insert_final_newline = false +trim_trailing_whitespace = false + +[*.sh] +indent_size = 4 diff --git a/README.md b/README.md index 20b12ce..93cd520 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,12 @@ You also can use a module like `glob` to pick up a variable set of icons, too. M ## Loader parameters - `embed`, Boolean -Should the fonts be embedded in the CSS? By default the fonts are written to disk. If `embed` is specified the font is base64 encoded and embedded inside the `@font-face` declaration. Example configuration: `loader: "style!css!webfonts?embed&types=woff"`. +Should the fonts be embedded in the CSS? By default the fonts are written to disk. If `embed` is specified the font is base64 encoded and embedded inside the `@font-face` declaration. + +- `hashLength`, Number +Optional. The length of hash in fileName, maximum value: 32, minimal value: 8. + +Example configuration: `loader: "style!css!webfonts?embed&types=woff&hashLength=8"`. ## Font configuration (`*.font.js` or `*.font.json`) @@ -130,3 +135,4 @@ There is one special configuration optin that exists in both, the actual font co - `[fontname]`: The name of the font. I.e. "Awesomefont". - `[ext]`: The extension. I.e.: `.woff`. - `[hash]`: The hash of your current compilation. +- `[chunkhash]`: The hash of your source svg files. diff --git a/index.js b/index.js index 2d86b42..ee6d7b1 100644 --- a/index.js +++ b/index.js @@ -4,6 +4,7 @@ var path = require('path'); var glob = require('glob'); var isUrl = require('is-url'); var url = require('url'); +var hashFiles = require('./utils').hashFiles; var mimeTypes = { 'eot': 'application/vnd.ms-fontobject', @@ -168,8 +169,10 @@ module.exports = function (content) { for (var i in formats) { var format = formats[i]; if (!embed) { - var filename = config.fileName || params.fileName || '[hash]-[fontname].[ext]'; + var filename = config.fileName || params.fileName || '[chunkhash]-[fontname].[ext]'; + var chunkHash = filename.indexOf('[chunkhash]') !== -1 ? hashFiles(generatorConfiguration.files, params.hashLength) : ''; filename = filename + .replace('[chunkhash]', chunkHash) .replace('[fontname]', generatorConfiguration.fontName) .replace('[ext]', format); var formatUrl = loaderUtils.interpolateName(this, diff --git a/package.json b/package.json index 9ee8dd5..f9de090 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "license": "Unlicense", "dependencies": { "glob": "^7.1.1", + "hash-files": "^1.1.1", "is-url": "^1.2.2", "loader-utils": "^1.0.2", "webfonts-generator": "^0.4.0" diff --git a/test/ava.js b/test/ava.js new file mode 100644 index 0000000..8365997 --- /dev/null +++ b/test/ava.js @@ -0,0 +1,26 @@ +var test = require('ava'); +var glob = require('glob').sync; +var hashFiles = require('../utils').hashFiles; + +test('check consistency of files hash without hash length option', function (t) { + var files = glob('./test/test-svg/*.svg'); + var expected = 'da39a3ee5e6b4b0d3255'; + + t.is(hashFiles(files), expected); +}); + +test('check consistency of files hash with min hash length option', function (t) { + var files = glob('./test/test-svg/*.svg'); + var expected = 'da39a3ee'; + var minHashLength = 8; + + t.is(hashFiles(files, minHashLength), expected); +}); + +test('check consistency of files hash with max hash length option', function (t) { + var files = glob('./test/test-svg/*.svg'); + var expected = 'da39a3ee5e6b4b0d3255bfef95601890'; + var maxHashLength = 32; + + t.is(hashFiles(files, maxHashLength), expected); +}); diff --git a/test/octicons.font.js b/test/octicons.font.js index 5fff5ef..a30b9bd 100644 --- a/test/octicons.font.js +++ b/test/octicons.font.js @@ -1,6 +1,6 @@ module.exports = { 'files': [ - 'node_modules/octicons/build/svg/*.svg' + './test-svg/*.svg' ], 'fontName': 'octicons', 'classPrefix': 'octicon-', diff --git a/test/package.json b/test/package.json index ef6b273..c09a17b 100644 --- a/test/package.json +++ b/test/package.json @@ -3,12 +3,10 @@ "private": true, "main": "entry.js", "scripts": { - "test": "rimraf ./dist && webpack" - }, - "dependencies": { - "octicons": "^5.0.1" + "test": "rimraf ./dist && webpack && ava -v ./ava.js" }, "devDependencies": { + "ava": "^0.21.0", "css-loader": "^0.28.0", "rimraf": "^2.6.1", "style-loader": "^0.18.1", diff --git a/test/test-svg/alert.svg b/test/test-svg/alert.svg new file mode 100644 index 0000000..bfc86a5 --- /dev/null +++ b/test/test-svg/alert.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/arrow-down.svg b/test/test-svg/arrow-down.svg new file mode 100644 index 0000000..90d52c4 --- /dev/null +++ b/test/test-svg/arrow-down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/arrow-left.svg b/test/test-svg/arrow-left.svg new file mode 100644 index 0000000..e248758 --- /dev/null +++ b/test/test-svg/arrow-left.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/arrow-right.svg b/test/test-svg/arrow-right.svg new file mode 100644 index 0000000..eeaf48e --- /dev/null +++ b/test/test-svg/arrow-right.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/arrow-small-down.svg b/test/test-svg/arrow-small-down.svg new file mode 100644 index 0000000..363c3c5 --- /dev/null +++ b/test/test-svg/arrow-small-down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/arrow-small-left.svg b/test/test-svg/arrow-small-left.svg new file mode 100644 index 0000000..efcee32 --- /dev/null +++ b/test/test-svg/arrow-small-left.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/arrow-small-right.svg b/test/test-svg/arrow-small-right.svg new file mode 100644 index 0000000..7753c5e --- /dev/null +++ b/test/test-svg/arrow-small-right.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/arrow-small-up.svg b/test/test-svg/arrow-small-up.svg new file mode 100644 index 0000000..0a34b79 --- /dev/null +++ b/test/test-svg/arrow-small-up.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/arrow-up.svg b/test/test-svg/arrow-up.svg new file mode 100644 index 0000000..e8b17f4 --- /dev/null +++ b/test/test-svg/arrow-up.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/beaker.svg b/test/test-svg/beaker.svg new file mode 100644 index 0000000..0997bb0 --- /dev/null +++ b/test/test-svg/beaker.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/bell.svg b/test/test-svg/bell.svg new file mode 100644 index 0000000..d076a0c --- /dev/null +++ b/test/test-svg/bell.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/bold.svg b/test/test-svg/bold.svg new file mode 100644 index 0000000..d2f2995 --- /dev/null +++ b/test/test-svg/bold.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/book.svg b/test/test-svg/book.svg new file mode 100644 index 0000000..d21fa56 --- /dev/null +++ b/test/test-svg/book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/bookmark.svg b/test/test-svg/bookmark.svg new file mode 100644 index 0000000..de64157 --- /dev/null +++ b/test/test-svg/bookmark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/briefcase.svg b/test/test-svg/briefcase.svg new file mode 100644 index 0000000..5104b81 --- /dev/null +++ b/test/test-svg/briefcase.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/broadcast.svg b/test/test-svg/broadcast.svg new file mode 100644 index 0000000..ddc1458 --- /dev/null +++ b/test/test-svg/broadcast.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/browser.svg b/test/test-svg/browser.svg new file mode 100644 index 0000000..00f512a --- /dev/null +++ b/test/test-svg/browser.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/bug.svg b/test/test-svg/bug.svg new file mode 100644 index 0000000..7518829 --- /dev/null +++ b/test/test-svg/bug.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/calendar.svg b/test/test-svg/calendar.svg new file mode 100644 index 0000000..fede886 --- /dev/null +++ b/test/test-svg/calendar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/check.svg b/test/test-svg/check.svg new file mode 100644 index 0000000..fe2b0b4 --- /dev/null +++ b/test/test-svg/check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/checklist.svg b/test/test-svg/checklist.svg new file mode 100644 index 0000000..671aa3b --- /dev/null +++ b/test/test-svg/checklist.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/chevron-down.svg b/test/test-svg/chevron-down.svg new file mode 100644 index 0000000..a344381 --- /dev/null +++ b/test/test-svg/chevron-down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/chevron-left.svg b/test/test-svg/chevron-left.svg new file mode 100644 index 0000000..79a86ad --- /dev/null +++ b/test/test-svg/chevron-left.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/chevron-right.svg b/test/test-svg/chevron-right.svg new file mode 100644 index 0000000..1ff108a --- /dev/null +++ b/test/test-svg/chevron-right.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/chevron-up.svg b/test/test-svg/chevron-up.svg new file mode 100644 index 0000000..2b34f4d --- /dev/null +++ b/test/test-svg/chevron-up.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/circle-slash.svg b/test/test-svg/circle-slash.svg new file mode 100644 index 0000000..edfb3d8 --- /dev/null +++ b/test/test-svg/circle-slash.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/circuit-board.svg b/test/test-svg/circuit-board.svg new file mode 100644 index 0000000..f9a4c7e --- /dev/null +++ b/test/test-svg/circuit-board.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/clippy.svg b/test/test-svg/clippy.svg new file mode 100644 index 0000000..9cb6337 --- /dev/null +++ b/test/test-svg/clippy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/clock.svg b/test/test-svg/clock.svg new file mode 100644 index 0000000..4bb89e0 --- /dev/null +++ b/test/test-svg/clock.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/cloud-download.svg b/test/test-svg/cloud-download.svg new file mode 100644 index 0000000..8cc3d0f --- /dev/null +++ b/test/test-svg/cloud-download.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/cloud-upload.svg b/test/test-svg/cloud-upload.svg new file mode 100644 index 0000000..c17e1d3 --- /dev/null +++ b/test/test-svg/cloud-upload.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/code.svg b/test/test-svg/code.svg new file mode 100644 index 0000000..6e6560e --- /dev/null +++ b/test/test-svg/code.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/comment-discussion.svg b/test/test-svg/comment-discussion.svg new file mode 100644 index 0000000..c155b88 --- /dev/null +++ b/test/test-svg/comment-discussion.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/comment.svg b/test/test-svg/comment.svg new file mode 100644 index 0000000..2c6d88c --- /dev/null +++ b/test/test-svg/comment.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/credit-card.svg b/test/test-svg/credit-card.svg new file mode 100644 index 0000000..7da9f29 --- /dev/null +++ b/test/test-svg/credit-card.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/dash.svg b/test/test-svg/dash.svg new file mode 100644 index 0000000..383a78d --- /dev/null +++ b/test/test-svg/dash.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/dashboard.svg b/test/test-svg/dashboard.svg new file mode 100644 index 0000000..dad1fd7 --- /dev/null +++ b/test/test-svg/dashboard.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/database.svg b/test/test-svg/database.svg new file mode 100644 index 0000000..e686d98 --- /dev/null +++ b/test/test-svg/database.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/desktop-download.svg b/test/test-svg/desktop-download.svg new file mode 100644 index 0000000..74b2c7d --- /dev/null +++ b/test/test-svg/desktop-download.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/device-camera-video.svg b/test/test-svg/device-camera-video.svg new file mode 100644 index 0000000..dc0e55e --- /dev/null +++ b/test/test-svg/device-camera-video.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/device-camera.svg b/test/test-svg/device-camera.svg new file mode 100644 index 0000000..609be0e --- /dev/null +++ b/test/test-svg/device-camera.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/device-desktop.svg b/test/test-svg/device-desktop.svg new file mode 100644 index 0000000..3671fd0 --- /dev/null +++ b/test/test-svg/device-desktop.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/device-mobile.svg b/test/test-svg/device-mobile.svg new file mode 100644 index 0000000..84559ca --- /dev/null +++ b/test/test-svg/device-mobile.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/diff-added.svg b/test/test-svg/diff-added.svg new file mode 100644 index 0000000..8394151 --- /dev/null +++ b/test/test-svg/diff-added.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/diff-ignored.svg b/test/test-svg/diff-ignored.svg new file mode 100644 index 0000000..eaa2bee --- /dev/null +++ b/test/test-svg/diff-ignored.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/diff-modified.svg b/test/test-svg/diff-modified.svg new file mode 100644 index 0000000..6a17dc3 --- /dev/null +++ b/test/test-svg/diff-modified.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/diff-removed.svg b/test/test-svg/diff-removed.svg new file mode 100644 index 0000000..2dfe2a1 --- /dev/null +++ b/test/test-svg/diff-removed.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/diff-renamed.svg b/test/test-svg/diff-renamed.svg new file mode 100644 index 0000000..c1f0982 --- /dev/null +++ b/test/test-svg/diff-renamed.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/diff.svg b/test/test-svg/diff.svg new file mode 100644 index 0000000..cbaa51f --- /dev/null +++ b/test/test-svg/diff.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/ellipses.svg b/test/test-svg/ellipses.svg new file mode 100644 index 0000000..7d4b9d8 --- /dev/null +++ b/test/test-svg/ellipses.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/ellipsis.svg b/test/test-svg/ellipsis.svg new file mode 100644 index 0000000..87d905b --- /dev/null +++ b/test/test-svg/ellipsis.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/eye.svg b/test/test-svg/eye.svg new file mode 100644 index 0000000..4f43a09 --- /dev/null +++ b/test/test-svg/eye.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/file-binary.svg b/test/test-svg/file-binary.svg new file mode 100644 index 0000000..93d0f54 --- /dev/null +++ b/test/test-svg/file-binary.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/file-code.svg b/test/test-svg/file-code.svg new file mode 100644 index 0000000..5b4b199 --- /dev/null +++ b/test/test-svg/file-code.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/file-directory.svg b/test/test-svg/file-directory.svg new file mode 100644 index 0000000..4bf1f1c --- /dev/null +++ b/test/test-svg/file-directory.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/file-media.svg b/test/test-svg/file-media.svg new file mode 100644 index 0000000..018e533 --- /dev/null +++ b/test/test-svg/file-media.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/file-pdf.svg b/test/test-svg/file-pdf.svg new file mode 100644 index 0000000..0cbde4e --- /dev/null +++ b/test/test-svg/file-pdf.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/file-submodule.svg b/test/test-svg/file-submodule.svg new file mode 100644 index 0000000..355a905 --- /dev/null +++ b/test/test-svg/file-submodule.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/file-symlink-directory.svg b/test/test-svg/file-symlink-directory.svg new file mode 100644 index 0000000..4b6263a --- /dev/null +++ b/test/test-svg/file-symlink-directory.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/file-symlink-file.svg b/test/test-svg/file-symlink-file.svg new file mode 100644 index 0000000..b2aaf24 --- /dev/null +++ b/test/test-svg/file-symlink-file.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/file-text.svg b/test/test-svg/file-text.svg new file mode 100644 index 0000000..8b326ca --- /dev/null +++ b/test/test-svg/file-text.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/file-zip.svg b/test/test-svg/file-zip.svg new file mode 100644 index 0000000..e2bb5b0 --- /dev/null +++ b/test/test-svg/file-zip.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/file.svg b/test/test-svg/file.svg new file mode 100644 index 0000000..0997406 --- /dev/null +++ b/test/test-svg/file.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/flame.svg b/test/test-svg/flame.svg new file mode 100644 index 0000000..1fcb94b --- /dev/null +++ b/test/test-svg/flame.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/fold.svg b/test/test-svg/fold.svg new file mode 100644 index 0000000..1b0b399 --- /dev/null +++ b/test/test-svg/fold.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/gear.svg b/test/test-svg/gear.svg new file mode 100644 index 0000000..bf82007 --- /dev/null +++ b/test/test-svg/gear.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/gift.svg b/test/test-svg/gift.svg new file mode 100644 index 0000000..4539ce6 --- /dev/null +++ b/test/test-svg/gift.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/gist-secret.svg b/test/test-svg/gist-secret.svg new file mode 100644 index 0000000..6495281 --- /dev/null +++ b/test/test-svg/gist-secret.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/gist.svg b/test/test-svg/gist.svg new file mode 100644 index 0000000..9584460 --- /dev/null +++ b/test/test-svg/gist.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/git-branch.svg b/test/test-svg/git-branch.svg new file mode 100644 index 0000000..21ca8d8 --- /dev/null +++ b/test/test-svg/git-branch.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/git-commit.svg b/test/test-svg/git-commit.svg new file mode 100644 index 0000000..3cc2e82 --- /dev/null +++ b/test/test-svg/git-commit.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/git-compare.svg b/test/test-svg/git-compare.svg new file mode 100644 index 0000000..4737499 --- /dev/null +++ b/test/test-svg/git-compare.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/git-merge.svg b/test/test-svg/git-merge.svg new file mode 100644 index 0000000..63c43f7 --- /dev/null +++ b/test/test-svg/git-merge.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/git-pull-request.svg b/test/test-svg/git-pull-request.svg new file mode 100644 index 0000000..4f59759 --- /dev/null +++ b/test/test-svg/git-pull-request.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/globe.svg b/test/test-svg/globe.svg new file mode 100644 index 0000000..990554c --- /dev/null +++ b/test/test-svg/globe.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/grabber.svg b/test/test-svg/grabber.svg new file mode 100644 index 0000000..1a41fd0 --- /dev/null +++ b/test/test-svg/grabber.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/graph.svg b/test/test-svg/graph.svg new file mode 100644 index 0000000..cd3909e --- /dev/null +++ b/test/test-svg/graph.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/heart.svg b/test/test-svg/heart.svg new file mode 100644 index 0000000..8b81f88 --- /dev/null +++ b/test/test-svg/heart.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/history.svg b/test/test-svg/history.svg new file mode 100644 index 0000000..ee4d9fb --- /dev/null +++ b/test/test-svg/history.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/home.svg b/test/test-svg/home.svg new file mode 100644 index 0000000..f3d3138 --- /dev/null +++ b/test/test-svg/home.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/horizontal-rule.svg b/test/test-svg/horizontal-rule.svg new file mode 100644 index 0000000..9a05c30 --- /dev/null +++ b/test/test-svg/horizontal-rule.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/hubot.svg b/test/test-svg/hubot.svg new file mode 100644 index 0000000..fea9f4b --- /dev/null +++ b/test/test-svg/hubot.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/inbox.svg b/test/test-svg/inbox.svg new file mode 100644 index 0000000..f9cfec2 --- /dev/null +++ b/test/test-svg/inbox.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/info.svg b/test/test-svg/info.svg new file mode 100644 index 0000000..26db463 --- /dev/null +++ b/test/test-svg/info.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/issue-closed.svg b/test/test-svg/issue-closed.svg new file mode 100644 index 0000000..0a7819a --- /dev/null +++ b/test/test-svg/issue-closed.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/issue-opened.svg b/test/test-svg/issue-opened.svg new file mode 100644 index 0000000..a88cbcc --- /dev/null +++ b/test/test-svg/issue-opened.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/issue-reopened.svg b/test/test-svg/issue-reopened.svg new file mode 100644 index 0000000..789e18b --- /dev/null +++ b/test/test-svg/issue-reopened.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/italic.svg b/test/test-svg/italic.svg new file mode 100644 index 0000000..51d65f1 --- /dev/null +++ b/test/test-svg/italic.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/jersey.svg b/test/test-svg/jersey.svg new file mode 100644 index 0000000..776e456 --- /dev/null +++ b/test/test-svg/jersey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/key.svg b/test/test-svg/key.svg new file mode 100644 index 0000000..ac8badc --- /dev/null +++ b/test/test-svg/key.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/keyboard.svg b/test/test-svg/keyboard.svg new file mode 100644 index 0000000..89712ad --- /dev/null +++ b/test/test-svg/keyboard.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/law.svg b/test/test-svg/law.svg new file mode 100644 index 0000000..5ccc464 --- /dev/null +++ b/test/test-svg/law.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/light-bulb.svg b/test/test-svg/light-bulb.svg new file mode 100644 index 0000000..d2ff74c --- /dev/null +++ b/test/test-svg/light-bulb.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/link-external.svg b/test/test-svg/link-external.svg new file mode 100644 index 0000000..70b569d --- /dev/null +++ b/test/test-svg/link-external.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/link.svg b/test/test-svg/link.svg new file mode 100644 index 0000000..820aef7 --- /dev/null +++ b/test/test-svg/link.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/list-ordered.svg b/test/test-svg/list-ordered.svg new file mode 100644 index 0000000..5bba70f --- /dev/null +++ b/test/test-svg/list-ordered.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/list-unordered.svg b/test/test-svg/list-unordered.svg new file mode 100644 index 0000000..0b43536 --- /dev/null +++ b/test/test-svg/list-unordered.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/location.svg b/test/test-svg/location.svg new file mode 100644 index 0000000..f6372a3 --- /dev/null +++ b/test/test-svg/location.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/lock.svg b/test/test-svg/lock.svg new file mode 100644 index 0000000..5587064 --- /dev/null +++ b/test/test-svg/lock.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/logo-gist.svg b/test/test-svg/logo-gist.svg new file mode 100644 index 0000000..29f2213 --- /dev/null +++ b/test/test-svg/logo-gist.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/logo-github.svg b/test/test-svg/logo-github.svg new file mode 100644 index 0000000..253c13e --- /dev/null +++ b/test/test-svg/logo-github.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/mail-read.svg b/test/test-svg/mail-read.svg new file mode 100644 index 0000000..bf4deaf --- /dev/null +++ b/test/test-svg/mail-read.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/mail-reply.svg b/test/test-svg/mail-reply.svg new file mode 100644 index 0000000..cf06ee5 --- /dev/null +++ b/test/test-svg/mail-reply.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/mail.svg b/test/test-svg/mail.svg new file mode 100644 index 0000000..9fca68b --- /dev/null +++ b/test/test-svg/mail.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/mark-github.svg b/test/test-svg/mark-github.svg new file mode 100644 index 0000000..af1bfa1 --- /dev/null +++ b/test/test-svg/mark-github.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/markdown.svg b/test/test-svg/markdown.svg new file mode 100644 index 0000000..999110e --- /dev/null +++ b/test/test-svg/markdown.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/megaphone.svg b/test/test-svg/megaphone.svg new file mode 100644 index 0000000..a62f82d --- /dev/null +++ b/test/test-svg/megaphone.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/mention.svg b/test/test-svg/mention.svg new file mode 100644 index 0000000..c09499b --- /dev/null +++ b/test/test-svg/mention.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/milestone.svg b/test/test-svg/milestone.svg new file mode 100644 index 0000000..803465b --- /dev/null +++ b/test/test-svg/milestone.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/mirror.svg b/test/test-svg/mirror.svg new file mode 100644 index 0000000..76e0c37 --- /dev/null +++ b/test/test-svg/mirror.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/mortar-board.svg b/test/test-svg/mortar-board.svg new file mode 100644 index 0000000..869f9ae --- /dev/null +++ b/test/test-svg/mortar-board.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/mute.svg b/test/test-svg/mute.svg new file mode 100644 index 0000000..e448808 --- /dev/null +++ b/test/test-svg/mute.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/no-newline.svg b/test/test-svg/no-newline.svg new file mode 100644 index 0000000..2a8fb94 --- /dev/null +++ b/test/test-svg/no-newline.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/note.svg b/test/test-svg/note.svg new file mode 100644 index 0000000..cbf7963 --- /dev/null +++ b/test/test-svg/note.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/octoface.svg b/test/test-svg/octoface.svg new file mode 100644 index 0000000..bb1a40d --- /dev/null +++ b/test/test-svg/octoface.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/organization.svg b/test/test-svg/organization.svg new file mode 100644 index 0000000..f658bf3 --- /dev/null +++ b/test/test-svg/organization.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/package.svg b/test/test-svg/package.svg new file mode 100644 index 0000000..2db0351 --- /dev/null +++ b/test/test-svg/package.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/paintcan.svg b/test/test-svg/paintcan.svg new file mode 100644 index 0000000..08b4a4b --- /dev/null +++ b/test/test-svg/paintcan.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/pencil.svg b/test/test-svg/pencil.svg new file mode 100644 index 0000000..8702f4d --- /dev/null +++ b/test/test-svg/pencil.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/person.svg b/test/test-svg/person.svg new file mode 100644 index 0000000..5871e2f --- /dev/null +++ b/test/test-svg/person.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/pin.svg b/test/test-svg/pin.svg new file mode 100644 index 0000000..95405c5 --- /dev/null +++ b/test/test-svg/pin.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/plug.svg b/test/test-svg/plug.svg new file mode 100644 index 0000000..42865d5 --- /dev/null +++ b/test/test-svg/plug.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/plus-small.svg b/test/test-svg/plus-small.svg new file mode 100644 index 0000000..d469ad6 --- /dev/null +++ b/test/test-svg/plus-small.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/plus.svg b/test/test-svg/plus.svg new file mode 100644 index 0000000..4f2566c --- /dev/null +++ b/test/test-svg/plus.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/primitive-dot.svg b/test/test-svg/primitive-dot.svg new file mode 100644 index 0000000..6f465da --- /dev/null +++ b/test/test-svg/primitive-dot.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/primitive-square.svg b/test/test-svg/primitive-square.svg new file mode 100644 index 0000000..dc874fc --- /dev/null +++ b/test/test-svg/primitive-square.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/project.svg b/test/test-svg/project.svg new file mode 100644 index 0000000..a728f74 --- /dev/null +++ b/test/test-svg/project.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/pulse.svg b/test/test-svg/pulse.svg new file mode 100644 index 0000000..5a7232e --- /dev/null +++ b/test/test-svg/pulse.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/question.svg b/test/test-svg/question.svg new file mode 100644 index 0000000..a6fc753 --- /dev/null +++ b/test/test-svg/question.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/quote.svg b/test/test-svg/quote.svg new file mode 100644 index 0000000..da5c2b2 --- /dev/null +++ b/test/test-svg/quote.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/radio-tower.svg b/test/test-svg/radio-tower.svg new file mode 100644 index 0000000..f89a705 --- /dev/null +++ b/test/test-svg/radio-tower.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/reply.svg b/test/test-svg/reply.svg new file mode 100644 index 0000000..12717db --- /dev/null +++ b/test/test-svg/reply.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/repo-clone.svg b/test/test-svg/repo-clone.svg new file mode 100644 index 0000000..32b86e8 --- /dev/null +++ b/test/test-svg/repo-clone.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/repo-force-push.svg b/test/test-svg/repo-force-push.svg new file mode 100644 index 0000000..0aece33 --- /dev/null +++ b/test/test-svg/repo-force-push.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/repo-forked.svg b/test/test-svg/repo-forked.svg new file mode 100644 index 0000000..cc5e46a --- /dev/null +++ b/test/test-svg/repo-forked.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/repo-pull.svg b/test/test-svg/repo-pull.svg new file mode 100644 index 0000000..dfe8e6c --- /dev/null +++ b/test/test-svg/repo-pull.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/repo-push.svg b/test/test-svg/repo-push.svg new file mode 100644 index 0000000..408dca6 --- /dev/null +++ b/test/test-svg/repo-push.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/repo.svg b/test/test-svg/repo.svg new file mode 100644 index 0000000..e653d4e --- /dev/null +++ b/test/test-svg/repo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/rocket.svg b/test/test-svg/rocket.svg new file mode 100644 index 0000000..a64c904 --- /dev/null +++ b/test/test-svg/rocket.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/rss.svg b/test/test-svg/rss.svg new file mode 100644 index 0000000..3b2705d --- /dev/null +++ b/test/test-svg/rss.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/ruby.svg b/test/test-svg/ruby.svg new file mode 100644 index 0000000..8463908 --- /dev/null +++ b/test/test-svg/ruby.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/screen-full.svg b/test/test-svg/screen-full.svg new file mode 100644 index 0000000..e78d371 --- /dev/null +++ b/test/test-svg/screen-full.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/screen-normal.svg b/test/test-svg/screen-normal.svg new file mode 100644 index 0000000..a884713 --- /dev/null +++ b/test/test-svg/screen-normal.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/search.svg b/test/test-svg/search.svg new file mode 100644 index 0000000..d0304b6 --- /dev/null +++ b/test/test-svg/search.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/server.svg b/test/test-svg/server.svg new file mode 100644 index 0000000..78bc79f --- /dev/null +++ b/test/test-svg/server.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/settings.svg b/test/test-svg/settings.svg new file mode 100644 index 0000000..f22b92e --- /dev/null +++ b/test/test-svg/settings.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/shield.svg b/test/test-svg/shield.svg new file mode 100644 index 0000000..087a969 --- /dev/null +++ b/test/test-svg/shield.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/sign-in.svg b/test/test-svg/sign-in.svg new file mode 100644 index 0000000..91560c6 --- /dev/null +++ b/test/test-svg/sign-in.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/sign-out.svg b/test/test-svg/sign-out.svg new file mode 100644 index 0000000..e0893cb --- /dev/null +++ b/test/test-svg/sign-out.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/smiley.svg b/test/test-svg/smiley.svg new file mode 100644 index 0000000..0d93af5 --- /dev/null +++ b/test/test-svg/smiley.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/squirrel.svg b/test/test-svg/squirrel.svg new file mode 100644 index 0000000..3e5b51b --- /dev/null +++ b/test/test-svg/squirrel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/star.svg b/test/test-svg/star.svg new file mode 100644 index 0000000..60a7a0c --- /dev/null +++ b/test/test-svg/star.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/stop.svg b/test/test-svg/stop.svg new file mode 100644 index 0000000..6ae8523 --- /dev/null +++ b/test/test-svg/stop.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/sync.svg b/test/test-svg/sync.svg new file mode 100644 index 0000000..692349a --- /dev/null +++ b/test/test-svg/sync.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/tag.svg b/test/test-svg/tag.svg new file mode 100644 index 0000000..6c8a9c4 --- /dev/null +++ b/test/test-svg/tag.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/tasklist.svg b/test/test-svg/tasklist.svg new file mode 100644 index 0000000..a0bd560 --- /dev/null +++ b/test/test-svg/tasklist.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/telescope.svg b/test/test-svg/telescope.svg new file mode 100644 index 0000000..95047dc --- /dev/null +++ b/test/test-svg/telescope.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/terminal.svg b/test/test-svg/terminal.svg new file mode 100644 index 0000000..d6072fc --- /dev/null +++ b/test/test-svg/terminal.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/text-size.svg b/test/test-svg/text-size.svg new file mode 100644 index 0000000..f83a5f9 --- /dev/null +++ b/test/test-svg/text-size.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/three-bars.svg b/test/test-svg/three-bars.svg new file mode 100644 index 0000000..bb3b2c8 --- /dev/null +++ b/test/test-svg/three-bars.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/thumbsdown.svg b/test/test-svg/thumbsdown.svg new file mode 100644 index 0000000..ac4c7c6 --- /dev/null +++ b/test/test-svg/thumbsdown.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/thumbsup.svg b/test/test-svg/thumbsup.svg new file mode 100644 index 0000000..e77f1e3 --- /dev/null +++ b/test/test-svg/thumbsup.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/tools.svg b/test/test-svg/tools.svg new file mode 100644 index 0000000..67a5984 --- /dev/null +++ b/test/test-svg/tools.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/trashcan.svg b/test/test-svg/trashcan.svg new file mode 100644 index 0000000..3d8c051 --- /dev/null +++ b/test/test-svg/trashcan.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/triangle-down.svg b/test/test-svg/triangle-down.svg new file mode 100644 index 0000000..e3f692d --- /dev/null +++ b/test/test-svg/triangle-down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/triangle-left.svg b/test/test-svg/triangle-left.svg new file mode 100644 index 0000000..4ee3fdd --- /dev/null +++ b/test/test-svg/triangle-left.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/triangle-right.svg b/test/test-svg/triangle-right.svg new file mode 100644 index 0000000..089af05 --- /dev/null +++ b/test/test-svg/triangle-right.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/triangle-up.svg b/test/test-svg/triangle-up.svg new file mode 100644 index 0000000..3e3e8b9 --- /dev/null +++ b/test/test-svg/triangle-up.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/unfold.svg b/test/test-svg/unfold.svg new file mode 100644 index 0000000..ab04339 --- /dev/null +++ b/test/test-svg/unfold.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/unmute.svg b/test/test-svg/unmute.svg new file mode 100644 index 0000000..19b375f --- /dev/null +++ b/test/test-svg/unmute.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/unverified.svg b/test/test-svg/unverified.svg new file mode 100644 index 0000000..6120fca --- /dev/null +++ b/test/test-svg/unverified.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/verified.svg b/test/test-svg/verified.svg new file mode 100644 index 0000000..2d995a1 --- /dev/null +++ b/test/test-svg/verified.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/versions.svg b/test/test-svg/versions.svg new file mode 100644 index 0000000..274bbdb --- /dev/null +++ b/test/test-svg/versions.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/watch.svg b/test/test-svg/watch.svg new file mode 100644 index 0000000..45b2499 --- /dev/null +++ b/test/test-svg/watch.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/x.svg b/test/test-svg/x.svg new file mode 100644 index 0000000..378d9d1 --- /dev/null +++ b/test/test-svg/x.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/test-svg/zap.svg b/test/test-svg/zap.svg new file mode 100644 index 0000000..e3438e9 --- /dev/null +++ b/test/test-svg/zap.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/utils.js b/utils.js new file mode 100644 index 0000000..4ace8a8 --- /dev/null +++ b/utils.js @@ -0,0 +1,8 @@ +var hashFiles = require('hash-files'); + +module.exports = { + hashFiles: function (files, hashLength) { + hashLength = hashLength && +hashLength >= 8 && +hashLength <= 32 ? +hashLength : 20; + return hashFiles.sync({files: files}).slice(0, hashLength); + } +};