Skip to content

Instantly share code, notes, and snippets.

View aelbore's full-sized avatar

Jay aelbore

View GitHub Profile
@aelbore
aelbore / esm-cjs-modules.md
Last active January 22, 2024 13:57
Publish your npm package as ES Module, and backward compatibility CommonJS

Create your library

  • Initialize project npm init -y
  • Create esm module ./src/esm/my-lib.js
    function addNumber(value, value2) {
      return value + value2;
    }
    
    export { addNumber };
@aelbore
aelbore / typescript-web-components.md
Last active December 7, 2023 20:14
Step by Step creating web components in typescript using rollup

Getting Started

  • Install Dependencies
    npm init
    npm install --save-dev ts-node typescript tslib express @types/express
    

Create your web server

  • Create server.ts in root folder of your app.
@aelbore
aelbore / horizontal-timeline-with-swiper.markdown
Created November 16, 2020 08:40
Horizontal Timeline with Swiper

Horizontal Timeline with Swiper

Horizontal Timeline with SwiperJS

A Pen by Jay on CodePen.

License.

@aelbore
aelbore / index.html
Created November 16, 2020 05:26
Timeline
<link href='https://fonts.googleapis.com/css?family=Titillium+Web:400,200,300,600,700' rel='stylesheet' type='text/css'>
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<button id="toggleButton">Toggle</button>
<ul class="timeline" id="timeline">
<li class="li complete">
<div class="timestamp">
<span class="author">Abhi Sharma</span>
<span class="date">11/15/2014<span>
</div>
@aelbore
aelbore / vue-vite-headless-testing.md
Last active May 30, 2020 03:26
Vue 3 + Vite headless unit testing

Testing in Vue

Write lots of tests so people will afraid to delete yout code

alt text

Why need test?

@aelbore
aelbore / getting-started-with-mongo-docker.md
Last active March 16, 2020 05:14
Getting Started with Mongodb Docker

Testing in Vue

Write lots of tests so people will afraid to delete yout code
  - creator of redux
  
Don't just write tests that let you verify unit works with confidence.
Write tests that let you *delete* that unit of confidence.
  - creator of redux
@aelbore
aelbore / App.vue
Last active July 24, 2019 10:32
Step by Step creating web components in Vue
<template>
<div id="app">
<div style="text-align:center;margin-bottom:20px;">
<h1>Welcome to Vue</h1>
<img width="200" src="https://vuejs.org/images/logo.png" />
</div>
<div class="cards">
<div v-for="(profile, index) in profiles" v-bind:key="index">
<Card :profile="profile" />
</div>

Getting Started

ng new ng-elements --enable-ivy

Create and Build HelloWorldElements

  • Remove all the files in src/app folder
  • Create card.ts file in src/app folder
  • Add Component