How to create multiple output paths in Webpack config

Webpack does support multiple output paths. Set the output paths as the entry key. And use the name as output template. webpack config: entry: { ‘module/a/index’: ‘module/a/index.js’, ‘module/b/index’: ‘module/b/index.js’, }, output: { path: path.resolve(__dirname, ‘dist’), filename: ‘[name].js’ } generated: └── module ├── a │   └── index.js └── b └── index.js

How to pipe stdout while keeping it on screen ? (and not to a output file)

Here is a solution that works at on any Unix / Linux implementation, assuming it cares to follow the POSIX standard. It works on some non Unix environments like cygwin too. echo ‘ee’ | tee /dev/tty | foo Reference: The Open Group Base Specifications Issue 7 IEEE Std 1003.1, 2013 Edition, §10.1: /dev/tty Associated with … Read more

What is ‘YTowOnt9’?

It seems to be a PHP-serialized empty array, base 64 encoded. $ base64 -D <<< ‘YTowOnt9’ a:0:{} $ php -r ‘var_dump(unserialize(base64_decode(“YTowOnt9”)));’ array(0) { } There are many scripts that serialize arrays of data. When the arrays have data, they vary greatly, so the Base64 encoded PHP-serialized values do too, but when they are empty they … Read more

How do I print colored text to the terminal?

This somewhat depends on what platform you are on. The most common way to do this is by printing ANSI escape sequences. For a simple example, here’s some Python code from the Blender build scripts: class bcolors: HEADER = ‘\033[95m’ OKBLUE = ‘\033[94m’ OKCYAN = ‘\033[96m’ OKGREEN = ‘\033[92m’ WARNING = ‘\033[93m’ FAIL = ‘\033[91m’ … Read more

tech