UNPKG

angular-wizard-form

Version:

<!-- [![npm version](https://badge.fury.io/js/angular2-wizard.svg)](https://badge.fury.io/js/angular2-wizard) --> <!-- [![Build Status](https://travis-ci.org/maiyaporn/angular2-wizard.svg?branch=master)](https://travis-ci.org/maiyaporn/angular2-wizard) --

34 lines (27 loc) 835 B
/** * taken from angular2-webpack-starter */ var path = require('path'); // Helper functions var ROOT = path.resolve(__dirname, '..'); function hasProcessFlag(flag) { return process.argv.join('').indexOf(flag) > -1; } function isWebpackDevServer() { return process.argv[1] && !! (/webpack-dev-server$/.exec(process.argv[1])); } function root(args) { console.log(args); args = Array.prototype.slice.call(arguments, 0); return path.join.apply(path, [ROOT].concat(args)); } function checkNodeImport(context, request, cb) { if (!path.isAbsolute(request) && request.charAt(0) !== '.') { cb(null, 'commonjs ' + request); return; } cb(); } exports.hasProcessFlag = hasProcessFlag; exports.isWebpackDevServer = isWebpackDevServer; exports.root = root; exports.checkNodeImport = checkNodeImport;