How to use the @skpm/builder/lib/utils/webpackCommandPlugin/webpackShellPlugin.sketchtoolRunCommand function in @skpm/builder

To help you get started, we’ve selected a few @skpm/builder examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github skpm / skpm / packages / test-runner / lib / utils / update-webpack-config.js View on Github external
'../../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({
github KimDal-hyeong / html-to-sketch-electron / script / runPlugin.js View on Github external
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());
  });
}

@skpm/builder

A script to build and link sketch plugins

MIT
Latest version published 10 months ago

Package Health Score

56 / 100
Full package analysis