Skip to content
This repository was archived by the owner on Apr 11, 2024. It is now read-only.

Commit decc830

Browse files
fix(install): Find html-sketchapp path with require.resolve (#10)
Fixes #8
1 parent 01a50a1 commit decc830

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

bin/cli.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,8 @@ require('yargs')
108108
}
109109
}
110110
})
111-
.command('install', 'Install the html-sketchapp Sketch plugin', {}, async () => {
112-
const { getInstalledPath } = require('get-installed-path');
113-
const htmlSketchappPath = await getInstalledPath('html-sketchapp');
111+
.command('install', 'Install the html-sketchapp Sketch plugin', {}, () => {
112+
const htmlSketchappPath = path.dirname(require.resolve('html-sketchapp/package.json'));
114113
const pluginPath = path.resolve(htmlSketchappPath, 'asketch2sketch.sketchplugin');
115114

116115
const opn = require('opn');

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
"dependencies": {
3737
"es6-promisify": "^5.0.0",
3838
"find-up": "^2.1.0",
39-
"get-installed-path": "^4.0.8",
4039
"get-port": "^3.2.0",
4140
"html-sketchapp": "github:brainly/html-sketchapp#8f92196695497c722ecbd1a5081833e4c7267d46",
4241
"mkdirp": "^0.5.1",

0 commit comments

Comments
 (0)