Skip to content

Instantly share code, notes, and snippets.

@d4rkr00t
Last active January 5, 2023 18:18
Show Gist options
  • Save d4rkr00t/6b724e1d85586a350908502039025ca7 to your computer and use it in GitHub Desktop.
Save d4rkr00t/6b724e1d85586a350908502039025ca7 to your computer and use it in GitHub Desktop.
Aik Talk

Introduction

Hi, my name is Stan. And I moved here with my family just about 2 months ago from Russia.

And I'm very nervous now. Because it's my first talk in English. I hope it goes well. But. Anyway. Let's start.

When I started getting into web development a while ago, I was doing mostly PHP. And do you know what I loved the most about PHP? It's how easy it was to start actually doing something.

MAMP

And these projects helped me a lot.

— Who knows what those are?

— Exactly, MAMP and Denwer.

— And who's used them?

Cool. They are basically the way of spinning up development stack for PHP, with apache and mysql.

And I loved them! They were so easy to use! You just put a file in a folder, open some url in a browser and that just worked. No configuration at all!

CDNs World

Then switched to JavaScript. Back then, CDNs became a thing. And everyone started to use this long urls include some library in a project.

And that was an awesome time. My JavaScript projects were simple. And for prototyping I had to just create an html file, put this url in, open it in a browser and that was it.

The world has changed

But the world has changed.

Tools

A bunch of cool stuff has appeared in the last couple of years. Tools like NPM, Webpack, React with JSX, Babel, PostCSS, and etc...

NPM INSTALL

And now we can install things like never before. Instead of these long urls. We can just run npm install plus the name of the package and start to use it.

Struggle

But there is always a but... With all these awesome tools that have appeared recently the JavaScript build pipeline has gotten more complicated.

Intermediate steps

Now we have to setup all these intermediate steps, like NPM, transpilers for JavaScript, bundlers, etc...

Cat

And for me, when I wanna play around with some new library or just prototype some idea, that's too much! I'd rather give up than do all those steps over and over again. Or usually what happened to me was that I buried myself into a configuration and when I was done doing this all my desire to do something had disappeared. It was destroying all my ideas over and over again.

We definitely can do better.

Talk

And then I stumbled upon a talk from React Core Team Member — Ben Alpert. And he was talking about a possible future for React — how it can evolve; where they are heading to, etc. And one part of his talk was about developer experience — what we can do to be able to prototype as fast as we used to in PHP world or in old JavaScript world, but using all modern stuff we love to use so much.

I was so impressed that I started thinking of how I can improve my own workflow.

AIK

And that's how Aik appeared.

So now, I'm going to briefly talk about what features it offers and how to start using it.

NPM INSTALL

Honestly, the only thing you need to do is install Aik CLI globally via NPM.

Web server

And now you can run Aik and give it a path to a JavaScript file.

It will spin up a webpack dev server, generate some base html and include a bundle produced by webpack for this file into this html. So you can just open a URL and start working.

Auto install npm modules

Another annoying thing for me, is having to come back to the CLI to install some npm module. And even more, when I have to stop dev server, install module, run dev server again. And Aik solves this too by installing npm modules automatically once you have required or imported them.

Babel

Also Aik comes with Babel, obviously, to transpile JavaScript using these 2 presets — preset-latest and preset-react.

PostCSS

For simplifying writing CSS there is PostCSS with autoprefixer and PreCSS. For those not familiar with PreCSS — it allows you to write CSS more like SASS with nesting, variables and stuff like that. But it just a plugin for PostCSS.

Ngrok

Another important part of prototyping is being able to share your prototype with somebody. And for that purpose, Aik has built-in support for Ngrok. With one extra option, you can expose your prototype to real world by ngrok. It's also useful for testing on mobile devices for example.

Build

With the --build option, you can ask Aik to produce kinda "ready-to-deploy" build with minimized assets. For example, I use it for deploying my personal web site.

Error messages

And it has pretty good error messages, almost like in create-react-app.

Some words in the end of a talk

If you are iterested, here is a link to Aik's GitHub repository. And here is my handle for pretty much every social network. So feel free to ask me any questions there.

That's it. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment