Skip to content

Content Tagged "javascript"

Page 1 of 2

Content Tagged "javascript"

Change the File Extension in Typescript - Using Path

April 28, 2017Categories: Software, Tutorial
Following from my previous post , I've updated the function to use only the path module. Now, the code looks like: I've updated the workflow presented previously to: isolate the dir , ext and root components of the path replace the ext with the new extension return the normalized version…

Angular 2Refresh Bound Variables from Callback

January 31, 2017Category: Software
TL;DR: Use ChangeDetectorRef 's detectChanges() at the end of your callback code. While developing my electron.js app, I've had the following workflow: I have an input element and a button The input element is capable of editing a path The button triggers a File Open dialog The…

Make Electron Work with Sqlite3

December 16, 2016Categories: Software, Tutorial
The other day I tried to integrate knex with a SQLITE3 back-end. Unfortunately, the instant I've tried to instantiate knex , I've got a lot of errors . After getting rid of them, I found that I can't get sqlite3 to work at all, even though I've checked the installation and it was OK (got the…

Make Electron work with Knex.js

December 16, 2016Categories: Software, Tutorial
To make my life easier (and because I hate writing SQL statements), I thought of installing an ORM. After some search, I've decided to use knex . Unfortunately, the moment I integrated it into my app, webpack started generating errors like: ERROR in ./~/knex/lib/dialects/maria/index.js Module not…

Electron AppUse SCSS, Luke!

December 2, 2016Categories: Project Management, Software
Traditionally, I've been a LESS supporter. The way it does mixins for example seems to me more intuitive. However, I noticed that my go-to framework ( bootstrap ) is now doing SASS-first and then LESS. So, one adapts... and the option in angular-cli makes things less painful. What was painful was…

Electron and WebPack - Live Reloads

December 2, 2016Categories: Software, Tutorial
I wanted to create a skeleton with Electron, Angular 2, capable of live reload while in development. I've settled on the following framework: Electron (d'oh!) Angular 2 Angular CLI (because it makes it easy to generate boilerplate code) SASS (SCSS in fact) Webpack 2 and Babel After a lot of trial…

Electron App - Is It Alive?

December 2, 2016Categories: Software, Tutorial
TL;DR: Yes, but it's limping badly. Now that I've created the angular app, I wanted to find out if I could develop an Electron app without actually adding the Electron dependency yet. My naive findings are: You can develop any ui-related bit I could not implement actual business logic. This is due…

Electron App. Why angular-cli?

December 2, 2016Categories: Software, Tutorial
The decision has been made for me since I'm new to Angular in general and the CLI offers a package deal particularly where code generation and initial package management is concerned. There's also the boon of webpack, which is used as engine. Although the balance tilts heavily in favour of using…

Debug Javascript - Some Methods

November 17, 2016Category: Software
These days I'm trying to tweak a 3rd-party framework and I'm missing stuff sometimes (e.g. injected data). Below are some methods I've found useful when debugging the script. console.log - print all things Object inspection - see your object's content HTH,

Debug Javascript - Object Inspection

November 17, 2016Category: Software
Many times, you have objects where you may or may not know their content. If you're running in the browser, life is easy as you can pause the code and inspect the object. at command line is a bit more annoying. In this case, at least for the first run, you can execute something like: where obj is…
Next

All tags