Checking to see if an npm package is tree shake-able (is-esm)

Sometimes on a project I need to know if an npm package is tree shake-able. The is-esm utility checks to see if the package contains a distribution with ECMAScript module and outputs.

To run it: `npx is-esm PACKAGE_NAME`

ex: `npx is-esm @angular/core`

Minko Gechev originally posted this method on Twitter. At least that is where I found it. 🙂 I’m posting it here so I know where I can look for this method later.

Journal the Day – April 12, 2020

Blades in the Dark custom map snippet

Whelp, didn’t make it a habit, unless you count seven months between posts.

Work has been pretty heavy since that post. My current client is averaging 50 hours a week of work.

I’m currently working on several projects outside of work in the spare time I have, but also to keep me sane outside of work.

Standing Desktop

I picked up the frame for a sitting/standing desk since I work remotely and find myself sitting far too much. Some days I get in less than 500 steps according to the tracking stuff I use. Far far too few.

When I say a frame, I mean just that. I am in the middle of crafting a desktop for it out of shagbark hickory. I had looked into buying a top with the desk as well as buying a butcher block style top from a big box store, but neither really appealed to me and the price was pretty high for some of the options that had mdf at their core.

Since I enjoy woodworking and have never used rough lumber I decided to create my own desktop. It’s been an adventure. I found an arborist in my area that had just the last year started selling lumber and was lucky that he was willing to open for me just as the first Covid-19 social distancing measures went into place.

I picked up several slabs of 8/4 shagbark hickory and have planed them down, cut them to rough size, and am almost ready to glue them up into the desktop. Right now I am having trouble getting them to join, since I don’t own a jointer. I’m currently waiting for the glue to dry on a jig I hope will work with the tablesaw to give me true and straight edges. We’ll see.

Gaming Maps

I’m also working on a challenging coding project, since it uses technologies I know about but haven’t yet needed to learn myself. It’s a gaming mapping project that I hope to release to the world at some point.

Right now, I am able to take in a high resolution map image, cut it up, and have a user be able to see the map, zoom in and out, and look at markers on it, similar to Google Maps.

The next steps will be to take this prototype and fit it to a back end, so that a gaming group could upload their own map, add markers, notes, and be able to have those notes link to a wiki-like set of pages to manage a campaign.

I haven’t done much back end coding in my career given that I have specialized in UI development. I’ve chosen NestJS as the back end since it is very similar to Angular, I am hoping that this will mean that I have less of a learning curve and more time to just create.

I haven’t chosen a database to store the data yet. I am considering MongoDB or Contentful. Both of which I am not familiar with, so I’m going to need to research what the best option for me is. Since I am going with a Node back end, I’ll eventually need to dig into how to host it. Right now with static data, I can host it here, but once I implement the NestJS back end, I’ll need to host that somewhere else.

Here’s a prototype of what I am working on now with a map of Duskvol from Blades in the Dark. All of the data is hard-coded at the time of this writing. Feel free to click around and see the different marker text and the information about the polygons.

That’s all for now!

Journal the day

This is first of something I have wanted to do for a while, mainly so I would get back into writing more often. I’m going to do a short journal of the day. It’s not in any particular format or content, just a journal of things that I did that day.

Today I crammed the start of a bunch of projects. I am sure not all of them will be continued, but I’ve been feeling bored lately and wanting to *do* something.

Here’s the list of projects:

  • Complete rewrite of a friend’s site called Mechanical Wars, using Angular and Nest with NX tooling. It’ll have the additional advantage of getting me more experience with NX and Nest.
  • Bought the Unity 2019 Humble Bundle and started learning Unity.
  • Began a dashboard/grid library project to be used as a library to other Angular projects. Again, using Angular and NX. It’ll also force me to learn more CSS and Sass.

I’ve also done a little woodworking, making cubes for Erin’s upcoming lesson she is teaching. I may have to make boxes to accommodate the larger sized cubes she needs.

The puppy Zeke has been a handful today and has Erin and I a bit on edge. He’s not wanting to be in his playpen, but we can’t let him out for long since he still isn’t house-trained. He’s also teething and seems to find Erin a good chew toy. I seem to have been able to curb that habit with me, but I’m not sure why he still wants to bite Erin.

That’s it for today! I’ll see if I can make this a habit.

Development on a Pixelbook?!?

I’ve started on a strange journey, one I didn’t think was possible before. I don’t even know if it is possible now, though I have started on it. I’m attempting to do all of my development work and teaching Angular on a Pixelbook.

I’m not the first to start this journey, but I haven’t found a lot of coherent documentation about it, so I want to write what I have learned down for those that might go after me.

Relatively recently, using Linux on a Pixelbook got a lot easier. Using linux means that many of the tools that I use (node, npm, the Angular CLI, NX, and others) will just work. The other tools, like an IDE, graphical Git interface, diff tools, and others, I wasn’t so sure of. Turns out, most of them just work too, it’s like working on a Mac a few years ago, before I made my ill fated switch to Windows for a while. (Corner me at a conference or ask me in the comments and I’ll unpack that last sentence about Mac and Windows for you.)

Setting up Linux

It’s a lot easier than it used to be. You essentially just turn it on in your Pixelbook settings. It may work with newer Chromebooks, but I don’t have one of those to test with. The full instructions are here, along with troubleshooting steps:

Don’t forget to occasionally check for Linux updates with sudo apt-get update && sudo apt-get dist-upgrade. I don’t know if there is an automated way to do this, so let me know if anyone finds one.

The flavor of Linux the Pixelbook uses is Debian. So far, anything I have used that supports a Debian install has worked out of the box.

The File System

The files Linux has access to is in a different area than the normal Chrome OS file system. Chrome OS has a nice way of copying files over from one to the other though. So if you download something from your browser it is a simple copy away from being able to be used in your Linux partition.

If you open up the Files folder on Chrome OS, you’ll see a list of files in Chrome OS but also in the left hand nav you will see a Linux Files folder. Dragging and dropping into that file structure will copy over the files into Linux for you.

Linux Terminal

I pinned the Linux terminal to my Shelf, but you can easily get to it by going to the Launcher and the Linux apps folder.

I do wish it had tab support but right now if you want more than one terminal, you have to launch a new window. Makes for a cluttered desktop right now, so check out the Virtual Desktops section below to help minimize it.

Installing Linux Apps

Each Linux app will have a slightly different install process, but I have found that following the instructions for each of them has succeeded. Remember, the flavor of Linux the Pixelbook uses is Debian, which is a pretty common flavor of Linux and thus well supported.

I’ll list the instructions for the tools that I currently use here.


I didn’t document the way to install VSCode when I installed it, but I believe I used the instructions here for the “Debian and Ubuntu based distributions”:

If you are a Linux guru, which I am not, you can also directly download VSCode from the installers page:

The VSCode auto update seems to work fine, but I haven’t used it much since installing Idea. There is an update section on the link listed above, so it it doesn’t update properly you should check there.

Launch VSCode (two ways):

  • terminal: just type code into the terminal
  • Launcher: Go to the “Linux apps” folder and click on the icon

IntelliJ Idea

It took me a while to get Idea running, mainly due to conflicting/old documentation on the Pixelbook Linux container. Here is what I finally did. If you have a streamlined method for installing it, please let me know in the comments. I’ll update it here and give you credit.

  1. Download the tar.gz:
  2. Copy the tar.gz into the Linux files folder. I made a special “Installers” folder just for packages like these.
  3. Follow the Linux instructions for a Standalone Install on this page:
    1. Summary: sudo tar -xzf ideaIU.tar.gz -C /opt
    2. Do not extract the tarball over an existing installation to avoid conflicts. Always extract it to a clean directory.
  4. I created an alias in my .bash_aliases so I could just type idea in the terminal to run it.

Caveat: Updating Idea

I haven’t yet successfully updated my version of Idea using the automatic update process. I’ll update this post when I successfully update.

I suspect that doing the install steps with the new tar.gz version would work fine, but I’m going to try and keep searching for something less manual.

Launch Idea (two ways):

  • terminal:
  • Launcher: Go to the “Linux apps” folder and click on the penguin icon with “IntelliJ Idea…”

Beyond Compare (file diff tool that I cannot rave enough about)

I used the Terminal Install instructions for Debian here, it was super simple:

Launch Beyond Compare (two ways):

  • terminal: bcompare
  • Launcher: Go to the “Linux apps” folder and click on it’s icon


Nope! No Linux version. I use both Idea’s and VSCode’s built in Git tools and the command line.

I hear GitKraken is good, but I have yet to try it.

The “Shelf”

I’ve made my life easier by pinning my most used apps to the Chrome OS Shelf. It’s a simple thing so I’m not going belabor the point. Just two finger click on the app’s icon and select “Pin to shelf”.

My App is Super Tiny and Unusable! Help!

Apps on the Pixelbook don’t always know how to display themselves. It took me a month to find out the best way to run applications so that the menus weren’t super small or had weird layouts. Turns out the solution was simple: Use High Density/Use Low Density.

Before you launch an app that you are having issues with, do a two finger click on it’s launch icon. This only shows up when the icon is in the shelf, not on the icons in the Launcher! Which is why it took me forever (in development time) to find it. The menu that comes up should have an option that says Use low density. Selecting this and then launching the app will tell the app to use it’s low screen density settings, and everything should now look normal.

If you ever need to go back, just do the same two finger click and select Use high density. You’ll be back to the default app view. I have not found any apps, so far, that were not fixed by selecting the low density setting.

Launching apps from the terminal will often launch them in high density mode. If you two finger tap on the icon in the shelf, you can relaunch it in low density mode.

We’ve got our apps installed and now they are readable/usable. So far, so good!

Virtual Desktops

I have it already/I don’t have it!

In the last month or so, the Chrome OS team rolled out Virtual Desktops! Unfortunately, it may not be automatically turned on for you. To see if it is, you can click the Overview key ( []|| ). In the upper right corner of the screen you should see a button + New Desk. If not, then you can do the following:

  1. Make sure your OS is updated
    1. Check again after the update
    2. If you still don’t see the button, continue
  2. Open Chrome
  3. Enter chrome://flags into the URL
  4. You should see under the Experiments Enable Virtual Desks
    1. Enable it via the dropdown
  5. Restart your machine

After that, you should see the new button and can add new virtual desktops!

Switching Between

There aren’t any keyboard, or worse yet, trackpad shortcuts to switch between desktops right now. The Chrome OS developers do have it listed as something to be added, so hopefully soon.

In the mean time, to switch between desktops there are a few things you can do. These are in order of how often I use them.

  • Swipe up with four fingers to bring up the Overview and click on the desktop you want. I list this first because I use it most out of habit, but the next one is more efficient.
  • Click on the app in the Shelf
    • This one is usually the most efficient for me, however if I have multiples of the same app open on different desktops, then it isn’t and I go back to the swipe gesture.
  • alt-tab – This will switch between app windows and switches desktops as a side effect. I discovered this by accident today and is as close to a shortcut to switching desktops as I have found so far.
  • Hit the Overview ( []|| ) button and click on the desktop you want.

Other Resources

I’ll post other resources as I find them here. I found that googling “X for Linux” and “X linux installer” got me much of the way there.

%d bloggers like this: