How to use the create-resolve-app.resolvePackages function in create-resolve-app

To help you get started, we’ve selected a few create-resolve-app 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 reimagined / resolve / examples / shopping-list-advanced / scripts / install.js View on Github external
name: require(path.join(__dirname, '..', directory, 'package.json')).name,
      directory: path.join(__dirname, '..', directory)
    }))

  for (const { name } of localPackages) {
    redefine[name] = `http://${address}:${port}/${safeName(name)}.tgz`
  }

  let isResolveMonorepo = false
  try {
    isResolveMonorepo = require('../../../package').name === 'resolve'
  } catch (e) {}

  if (isResolveMonorepo) {
    // eslint-disable-next-line import/no-extraneous-dependencies
    const resolvePackagesNames = require('create-resolve-app').resolvePackages

    // 4. Remove all resolve packages in node_modules
    for (const { directory } of localPackages) {
      for (const name of resolvePackagesNames) {
        const resolvePackagePath = path.normalize(
          path.join(directory, 'node_modules', name)
        )

        if (fs.existsSync(resolvePackagePath)) {
          removeExtra(resolvePackagePath)
        }
      }
    }

    resolvePackages.push(
      ...resolvePackagesNames.map(packageName => ({

create-resolve-app

A tool that generates boilerplate web applications based on the reSolve framework

MIT
Latest version published 2 years ago

Package Health Score

48 / 100
Full package analysis