From 7ffc7795a62b7c0c6c6ef9c5886986fb3b397f64 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Sat, 18 Feb 2017 16:40:01 +0700 Subject: [PATCH] Meta tweaks --- .gitattributes | 1 + lib/macos.js | 3 ++- lib/win.js | 3 ++- package.json | 3 +-- test.js | 10 +++++----- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.gitattributes b/.gitattributes index 176a458..391f0a4 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ * text=auto +*.js text eol=lf diff --git a/lib/macos.js b/lib/macos.js index 41161ea..78720bb 100644 --- a/lib/macos.js +++ b/lib/macos.js @@ -4,7 +4,8 @@ const childProcess = require('child_process'); const pify = require('pify'); const execFile = pify(childProcess.execFile); -// binary source → https://github.com/sindresorhus/macos-wallpaper + +// Binary source → https://github.com/sindresorhus/macos-wallpaper const bin = path.join(__dirname, 'macos-wallpaper'); exports.get = () => execFile(bin).then(x => x.trim()); diff --git a/lib/win.js b/lib/win.js index f992c17..7599356 100644 --- a/lib/win.js +++ b/lib/win.js @@ -4,7 +4,8 @@ const childProcess = require('child_process'); const pify = require('pify'); const execFile = pify(childProcess.execFile); -// binary source → https://github.com/sindresorhus/win-wallpaper + +// Binary source → https://github.com/sindresorhus/win-wallpaper const bin = path.join(__dirname, 'win-wallpaper.exe'); exports.get = () => execFile(bin).then(x => x.trim()); diff --git a/package.json b/package.json index c062f06..54ff7d8 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,7 @@ "background", "image", "picture", - "photo", - "image" + "photo" ], "dependencies": { "pify": "^2.3.0" diff --git a/test.js b/test.js index 867d6b3..f175074 100644 --- a/test.js +++ b/test.js @@ -1,12 +1,12 @@ import path from 'path'; import test from 'ava'; -import fn from '.'; +import m from '.'; test(async t => { - const orignalImagePath = await fn.get(); + const orignalImagePath = await m.get(); - await fn.set('fixture.jpg'); - t.is(await fn.get(), path.resolve('fixture.jpg')); + await m.set('fixture.jpg'); + t.is(await m.get(), path.resolve('fixture.jpg')); - await fn.set(orignalImagePath); + await m.set(orignalImagePath); });