How to use the @nstudio/xplat.updatePackageScripts function in @nstudio/xplat

To help you get started, we’ve selected a few @nstudio/xplat 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 nstudio / xplat / packages / electron / src / utils / xplat.ts View on Github external
let testDefault = scripts[`test`];
      if (testDefault) {
        // prefix it
        scripts[`test`] = `${postinstallWeb} && ${testDefault}`;
      } else {
        scripts[`test`] = `${postinstallWeb} && nx test`;
      }
      let e2eDefault = scripts[`e2e`];
      if (e2eDefault) {
        // prefix it
        scripts[`e2e`] = `${postinstallWeb} && ${e2eDefault}`;
      } else {
        scripts[`e2e`] = `${postinstallWeb} && nx e2e`;
      }

      return updatePackageScripts(tree, scripts);
    };
  }
github nstudio / xplat / packages / angular / src / schematics / elements / index.ts View on Github external
(tree: Tree) => {
      if (options.builderModule) {
        return noop();
      } else {
        const scripts = {};
        scripts[
          `build.web.elements`
        ] = `ng build web-elements --prod --output-hashing=none --single-bundle=true --keep-polyfills=true`;
        scripts[`preview.web.elements`] = `http-server dist/ngelements`;
        return updatePackageScripts(tree, scripts);
      }
    },
    (tree: Tree, context: SchematicContext) => {
github nstudio / xplat / packages / nativescript-angular / src / schematics / application / index.ts View on Github external
scripts[
        `clean`
      ] = `npx rimraf -- hooks node_modules package-lock.json && npm i`;
      scripts[
        `start.${platformApp}.ios`
      ] = `cd apps/${directory}${options.name} && tns run ios --emulator`;
      scripts[
        `start.${platformApp}.android`
      ] = `cd apps/${directory}${options.name} && tns run android --emulator`;
      scripts[
        `start.${platformApp}.preview`
      ] = `cd apps/${directory}${options.name} && tns preview`;
      scripts[
        `clean.${platformApp}`
      ] = `cd apps/${directory}${options.name} && npx rimraf -- hooks node_modules platforms package-lock.json && npm i && npx rimraf -- package-lock.json`;
      return updatePackageScripts(tree, scripts);
    },
    (tree: Tree, context: SchematicContext) => {
github nstudio / xplat / packages / ionic / src / schematics / application / index.ts View on Github external
scripts[
        `prepare.${platformApp}.android`
      ] = `npm run prepare.${platformApp} && cd apps/${directory}${options.name} && npm run cap.add.android`;
      scripts[
        `open.${platformApp}.ios`
      ] = `cd apps/${directory}${options.name} && npm run cap.ios`;
      scripts[
        `open.${platformApp}.android`
      ] = `cd apps/${directory}${options.name} && npm run cap.android`;
      scripts[
        `sync.${platformApp}`
      ] = `cd apps/${directory}${options.name} && npm run cap.copy`;
      scripts[
        `clean.${platformApp}`
      ] = `cd apps/${directory}${options.name} && npx rimraf -- hooks node_modules platforms www plugins ios android package-lock.json && npm i && rimraf -- package-lock.json`;
      return updatePackageScripts(tree, scripts);
    },
    (tree: Tree, context: SchematicContext) => {
github nstudio / xplat / packages / angular / src / schematics / application / index.ts View on Github external
(tree: Tree) => {
      const platformApp = options.name.replace('-', '.');
      const scripts = {};
      scripts[
        `clean`
      ] = `npx rimraf hooks node_modules package-lock.json && npm i`;
      scripts[`start.${platformApp}`] = `nx serve ${options.name}`;
      return updatePackageScripts(tree, scripts);
    },
    formatFiles({ skipFormat: options.skipFormat })
github nstudio / xplat / packages / nativescript / src / schematics / application / index.ts View on Github external
scripts[
        `clean`
      ] = `npx rimraf -- hooks node_modules package-lock.json && npm i`;
      scripts[
        `start.${platformApp}.ios`
      ] = `cd apps/${directory}${options.name} && tns run ios --emulator`;
      scripts[
        `start.${platformApp}.android`
      ] = `cd apps/${directory}${options.name} && tns run android --emulator`;
      scripts[
        `start.${platformApp}.preview`
      ] = `cd apps/${directory}${options.name} && tns preview`;
      scripts[
        `clean.${platformApp}`
      ] = `cd apps/${directory}${options.name} && npx rimraf -- hooks node_modules platforms package-lock.json && npm i && npx rimraf -- package-lock.json`;
      return updatePackageScripts(tree, scripts);
    },
    (tree: Tree, context: SchematicContext) => {