#meta #blogging #technical writing #hugo6 months of Code with Hugo, in numbersGoing from 0 to small. A developer’s journey starting a technical blog from scratch. Stats in this post as of 21st of October, follow me on Twitter for monthly updates. Contents: ...
#node #javascript #es6Use ES modules/ES6 import in Node without Babel/Webpack using `esm`Node has been implementing more and more ES6+ (ESNext) features natively. One of the features that is taking the longest to implement is modules. The reason for this is that Node and npm run on what is called CommonJS, with which you use require('module-name') to import from othe ...
#javascript #deployment #observablehqObservableHQ notebooks for JavaScript demos and prototypesObservableHQ is a platform being built by Mike Bostock (creator of the D3 visualisation library), Jeremy Ashkenas (“Made CoffeeScript, Backbone.js, Underscore and other ragbag” from his Twitter bio) and Tom MacWright (creator of the big presentation framework, simple-statistics a ...
#javascript #es6 #interview #functional programmingImpress interviewers with recursion in JavaScript with ES6 featuresThere’s nothing as flashy and useful for JavaScript interviews than recursion. If you just want to be impressive with recursion in JavaScript, here are some semi real-world (technical test type) examples. The short definition of a recursive solution to a problem (in computer sci ...
#javascript #vuejs #web developmentWriting multiple Vue components in a single fileWriting multiple components in one file is a pattern from React where some files contain multiple components. Some of those components are “private” to the file/exported component since no other component needs to consume them. ...
#node #jest #testing #javascript #SequelizeMocking/stubbing ES6 classes in tests with examples of Sequelize model unit testsThis post goes through some patterns that can be used to unit test ES6 classes. The examples will use Jest module auto-mocking but should be portable to other module mocking libraries (eg. Proxyquire) with some modifications. In “Using ES6 classes for Sequelize 4 models&rdq ...
#node #javascript #es6Why you should wrap your (JavaScript) dependenciesAn email sending example. ...
#graphql #tooling #web developmentA gentle introduction to GraphQL API integrationsGraphQL is a great alternative to REST (or other HTTP API designs). This is an quick introduction to the core concepts around consuming a GraphQL API. To see some examples consuming a GraphQL API: In Python, see Python GraphQL client requests example using gql In JavaScript (brow ...
#javascript #node #graphql #web developmentJavaScript GraphQL client requests in Node and the browser using `graphql.js`An example consuming a GraphQL API in JavaScript from Node and the browser using graphql.js See the example live: https://example.codewithhugo.com/js-graphql-client-example/. Full repo: https://github.com/HugoDF/js-graphql-client-example. ...
#node #deployment #javascript #toolingBuild and deploy a Vue/React/Vanilla JS app with Parcel and GitHub pagesParcel allows us to bundle frontend applications with no configuration and GitHub pages affords us a way to deploy them for free. Here’s how to use these two tools together to deploy a JavaScript application. Full example of a repo deployed like this: https://github.com/Hug ...