Beispiel #1
0
      karma: {
        default: series(
          rimraf('test/coverage-karma'),
          'karma start test/karma.conf.js'
        ),
        watch: 'karma start test/karma.conf.js --auto-watch --no-single-run',
        debug: 'karma start test/karma.conf.js --auto-watch --no-single-run --debug'
      },

      lint: {
        default: 'eslint src',
        fix: 'eslint src --fix'
      },
      all: concurrent({
        browser: series.nps('test.karma'),
        jest: 'nps test.jest',
        lint: 'nps test.lint'
      })
    },
    build: 'nps webpack.build',
    webpack: {
      default: 'nps webpack.server',
      build: {
        before: rimraf('dist'),
        default: 'nps webpack.build.production',
        development: {
          default: series(
            'nps webpack.build.before',
            'webpack --progress -d'
          ),
          extractCss: series(
      default: 'nps test.karma',
      karma: {
        default: series(
          rimraf('test/coverage-karma'),
          'karma start test/karma.conf.js'
        ),
        watch: 'karma start test/karma.conf.js --auto-watch --no-single-run',
        debug: 'karma start test/karma.conf.js --auto-watch --no-single-run --debug'
      },

      lint: {
        default: 'eslint src',
        fix: 'eslint --fix'
      },
      all: concurrent({
        browser: series.nps('test.karma'),
        lint: 'nps test.lint'
      })
    },
    e2e: {
      default: concurrent({
        webpack: `webpack-dev-server --inline --port=${E2E_PORT}`,
        protractor: 'nps e2e.whenReady',
      }) + ' --kill-others --success first',
      protractor: {
        install: 'webdriver-manager update',
        default: series(
          'nps e2e.protractor.install',
          'protractor test/protractor.conf.js'
        ),
        debug: series(
          'nps e2e.protractor.install',
const config = require("../config")
const {series, crossEnv, concurrent, open, rimraf} = require('nps-utils')
const {config: {port: E2E_PORT}} = require('./test/protractor.conf')
const WEB_UI_PORT = config.webUiPort;

module.exports = {
  scripts: {
    default: concurrent({
      webpack: 'nps webpack',
      openBrowser: 'nps browseWhenReady',
    }) + ' --kill-others-on-fail --success first',
    test: {
      default: 'nps test.jest',
      jest: {
        default: series(
          rimraf('test/coverage-jest'),
          'jest'
        ),
        accept: 'jest -u',
        watch: 'jest --watch',
      },
      karma: {
        default: series(
          rimraf('test/coverage-karma'),
          'karma start test/karma.conf.js'
        ),
        watch: 'karma start test/karma.conf.js --auto-watch --no-single-run',
        debug: 'karma start test/karma.conf.js --auto-watch --no-single-run --debug',
      },
      all: concurrent({
        browser: series.nps('test.karma', 'e2e'),
       rimraf('test/coverage-jest'),
       'jest'
     ),
     accept: 'jest -u',
     watch: 'jest --watch',
   },
   karma: {
     default: series(
       rimraf('test/coverage-karma'),
       'karma start test/karma.conf.js'
     ),
     watch: 'karma start test/karma.conf.js --auto-watch --no-single-run',
     debug: 'karma start test/karma.conf.js --auto-watch --no-single-run --debug',
   },
   all: concurrent({
     browser: series.nps('test.karma', 'e2e'),
     jest: 'nps test.jest',
   })
 },
 build: 'nps webpack.build',
 webpack: {
   default: 'nps webpack.server',
   build: {
     before: rimraf('dist'),
     default: 'nps webpack.build.production',
     development: {
       default: series(
         'nps webpack.build.before',
         'webpack --progress -d'
       ),
       extractCss: series(
         'nps webpack.build.before',