You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
665 B
29 lines
665 B
const launchEditor = require('../lib');
|
|
const path = require('path');
|
|
|
|
(async () => {
|
|
try {
|
|
await launchEditor(`${path.join(__dirname, 'test.js')}:8:1`)
|
|
} catch (e) {
|
|
console.error('user error handler', e);
|
|
}
|
|
|
|
try {
|
|
const res = await launchEditor(`${path.join(__dirname, 'test.js:8:1')}`, {
|
|
editor: 'atom'
|
|
})
|
|
console.log('resresres', res);
|
|
} catch (e) {
|
|
console.error('user error handler 2', e);
|
|
}
|
|
|
|
try {
|
|
const res = await launchEditor(`${path.join(__dirname, 'test.js:8:1')}`, {
|
|
editor: 'sublime'
|
|
})
|
|
console.log('resresres', res);
|
|
} catch (e) {
|
|
console.error('user error handler 2', e);
|
|
}
|
|
})()
|