Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'../../test-runner.sketchplugin/Contents/Sketch'
)
// https://webpack.js.org/configuration/output/#output-devtoolmodulefilenametemplate
config.output.devtoolModuleFilenameTemplate = '[absolute-resource-path]'
config.plugins.push(
new webpack.ProvidePlugin({
expect: require.resolve('../../expect'),
})
)
if (!argv.buildOnly) {
config.plugins.push(
// eslint-disable-next-line
new WebpackTestRunner({
script: sketchtoolRunCommand(
path.resolve(__dirname, '../../test-runner.sketchplugin'),
'plugin-tests',
{
app: argv.app,
withoutActivating: true,
handleError: false,
}
),
watching: argv.watch,
getTestFiles,
logProgress,
})
)
}
config.plugins.push({
async function runPlugin (json, callback) {
fs.writeFileSync(jsonPath, json);
const command = sketchtoolRunCommand(
path.resolve(__dirname, '../plugin', 'asketch2sketch.sketchplugin'),
'run',
{ context: { jsonPath } }
);
exec(command, (error, stdout) => {
if (error) {
console.error(`exec error: ${error}`);
return;
}
console.log(`stdout: ${stdout}`);
callback(stdout.trim());
});
}