How to use the @s-ui/helpers/packages.getPackageJson function in @s-ui/helpers

To help you get started, we’ve selected a few @s-ui/helpers 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 SUI-Components / sui / packages / sui-mono / bin / sui-mono-release.js View on Github external
.then(() => {
        // Create release commit
        const {version} = getPackageJson(cwd, true)
        return serialSpawn(
          [['git', [`commit -m "release(${packageScope}): v${version}"`]]],
          {cwd}
        )
      })
      .then(() => serialSpawn(docCommands))
github SUI-Components / sui / packages / sui-mono / bin / sui-mono-release.js View on Github external
.then(() => {
        // Create release tag
        const {version} = getPackageJson(cwd)
        return serialSpawn(
          [['git', [`tag -a ${tagPrefix}${version} -m "v${version}"`]]],
          {cwd}
        )
      })
      .then(() => serialSpawn(publishCommands, {cwd}))
github SUI-Components / sui / packages / sui-bundler / bin / sui-bundler-lib.js View on Github external
path: publicPath,
  args: [entry],
  root = false
} = program

if (!output) {
  showError(new Error('--output is mandatory.'), program)
}

if (!entry) {
  showError(new Error('Please provide an entry file path.'), program)
}

process.env.NODE_ENV = process.env.NODE_ENV || 'production'

const version = getPackageJson(process.cwd()).version
const outputFolder = path.join(
  process.cwd(),
  output,
  path.sep,
  root ? '' : version
)
const webpackConfig = Object.assign({}, config, {
  entry: path.resolve(process.cwd(), entry)
})
webpackConfig.output.publicPath = publicPath + version + '/'
webpackConfig.output.path = outputFolder

if (clean) {
  showInfo(`Removing previous build in ${output}...`)
  rimraf.sync(outputFolder)
}