How to use the @skpm/builder.webpackConfig 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 / sketch-dev-tools / assets / build-script.js View on Github external
const webpack = require('webpack')
const path = require('path')
const generateWebpackConfig = require('@skpm/builder').webpackConfig

generateWebpackConfig(
  {},
  path.join(process.cwd(), './.scripts'),
  path.join(process.cwd(), './.scripts'),
  {}
)({
  isPluginCommand: true,
  script: path.basename(process.argv[2]),
  absolutePath: process.argv[2],
  handlers: ['onRun'],
})
  .then(webpackConfig => {
    const compiler = webpack(webpackConfig)

    return compiler.run((err, res) => {
      if (err) {
        console.error(err)

@skpm/builder

A script to build and link sketch plugins

MIT
Latest version published 1 year ago

Package Health Score

49 / 100
Full package analysis