Using global style rules in a Vue.js app

If you are new to vue-cli and its webpack template, you are probably in a situation where you do not really know how to declare global style rules for your project. This article will show you how to do this with standard CSS, but also with a preprocessor. We will use Stylus with stylus-loader.

Read More

Share Comments

JavaScript one-liners to show off

JavaScript is sometimes quite verbose, isn’t it? If conciseness and effectiveness matter to you, a nice programming motto might be: write less, do more. (jQuery, I’m looking at you!)

Writing complex and powerful code on a single line is often an exciting experience where the only tangible limit is readability. One-liners in JavaScript represent a key topic that has been boosted by the arrival of ECMAScript 2015 (ES6). We cover this right here.

Read More

Share Comments

End-to-End testing with Nightwatch.js: TDD vs BDD

Have you ever heard of Nightwatch.js, the well-known “Node.js powered End-to-End testing framework“? Here we will experiment with the two main testing components of Nightwatch, dealing with the classicism of Test-Driven Development (TDD) and the agility of Behavior-Driven Development (BDD).

To be consistent, let’s test the Nightwatch official website!

Read More

Share Comments

What if JavaScript was a Java scripting language?

Meanwhile, in a parallel universe…

JavaScript is a scripting language for the Java Platform and JS scripts should strictly apply the key concepts of object-oriented programming (OOP).

Our task is to model and implement a simple program that involves living beings. This is of course a vast topic and, for the sake of simplicity, we will not deal with peripheral concepts like generics, synchronized methods, collections or packages. This would bring us too far.

Read More

Share Comments

Building a visual form in your terminal emulator with Blessed

Do you like ncurses? Do you like JavaScript? If yes, you will love Blessed; a Node.js library to create highly interactive and rich text-based user interfaces.

Read More

Share Comments

Scraping a Ghost blog with PhantomJS and SlimerJS using CasperJS

This blog post will haunt your computer forever. You have been warned! :D

In this article, we are going to present different techniques to scrape a Ghost blog (especially with the default Casper theme). We will use CasperJS, which is a scripting utility for PhantomJS (WebKit headless browser) and SlimerJS (Gecko minimalist GUI browser).

Read More

Share Comments

Understanding JSFuck

JavaScript: The Good Parts readers and Douglas Crockford fans know that JavaScript subsets matter. Due to the permissive and versatile nature of the language, it is reasonable to select only the most solid stones to build a wall. But hey, why would we need to bother with a full programming language when we just need 6 characters? Here comes JSFuck by Martin Kleppe

Read More

Share Comments