def jstest(hot=False): '''Run JS tests suite''' header('Run client tests suite') cmd = 'webpack-dev-server --config webpack.config.test.js' if hot: cmd += ' --hot --inline' nrun(cmd, pty=True)
def assets(progress=False): '''Install and compile assets''' header('Building static assets') cmd = 'webpack -c --config {0}.js' if progress: cmd += ' --progress' nrun(cmd.format('webpack.config.prod'), pty=True) nrun(cmd.format('webpack.widgets.config'), pty=True)
def assets_build(progress=False): '''Install and compile assets''' header('Building static assets') cmd = 'npm run assets:build -- --config {0}.js' if progress: cmd += ' --progress' nrun(cmd.format('webpack.config.prod'), pty=True) nrun(cmd.format('webpack.widgets.config'), pty=True)
def qa(): '''Run a quality report''' header('Performing static analysis') info('Python static analysis') flake8_results = lrun('flake8 udata', warn=True) info('JavaScript static analysis') jshint_results = nrun('jshint js', warn=True) if flake8_results.failed or jshint_results.failed: exit(flake8_results.return_code or jshint_results.return_code)
def qa(): '''Run a quality report''' header('Performing static analysis') info('Python static analysis') flake8_results = lrun('flake8 udata', pty=True, warn=True) info('JavaScript static analysis') eslint_results = nrun('eslint js/ --ext .vue,.js', pty=True, warn=True) if flake8_results.failed or eslint_results.failed: exit(flake8_results.return_code or eslint_results.return_code) print(green('OK'))
def qa(): '''Run a quality report''' header('Performing static analysis') info('Python static analysis') flake8_results = lrun('flake8 udata', warn=True) info('JavaScript static analysis') jshint_results = nrun('jshint js --extra-ext=.vue --extract=auto', warn=True) if flake8_results.failed or jshint_results.failed: exit(flake8_results.return_code or jshint_results.return_code) print(green('OK'))
def jsdoc(): '''Build the JS documentation''' header('Build the JS documentation') nrun('esdoc -c esdoc.json', pty=True)
def karma(): '''Continuous Karma test''' nrun('karma start --browsers=PhantomJS', pty=True)
def watch(): nrun('webpack -d -c --progress --watch', pty=True)
def widgets_watch(): nrun('npm run widgets:watch', pty=True)
def assets_watch(): nrun('npm run assets:watch', pty=True)
def widgets(): nrun('webpack -d -c --progress --watch --config webpack.widgets.config.js', pty=True)
def assets(): '''Install and compile assets''' header('Building static assets') nrun('webpack -c --progress --config webpack.config.prod.js', pty=True)