Skip to content

Commit

Permalink
Meta tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Feb 18, 2017
1 parent e687fed commit 7ffc779
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitattributes
@@ -1 +1,2 @@
* text=auto
*.js text eol=lf
3 changes: 2 additions & 1 deletion lib/macos.js
Expand Up @@ -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());
Expand Down
3 changes: 2 additions & 1 deletion lib/win.js
Expand Up @@ -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());
Expand Down
3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -30,8 +30,7 @@
"background",
"image",
"picture",
"photo",
"image"
"photo"
],
"dependencies": {
"pify": "^2.3.0"
Expand Down
10 changes: 5 additions & 5 deletions 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);
});

0 comments on commit 7ffc779

Please sign in to comment.