Reid  Rohan

Reid Rohan

1614917000

Building A Npm Library with Web Components

How to setup a npm package project with Web Components using Lerna, Rollup, TypeScript and Jest.

I’m no expert, so I suggest you don’t trust everything I write below. That said, this worked on my machine 🙈 and is what I used to figure out how to setup my own npm package with  Web Components using Lerna,  Rollup,  TypeScript and Jest. If you find something I should change, please head over to  the discussion on GitHub and help me make both the article and the  example repo better.

I won’t dwell too much on my choice of frameworks, I guess you landed on this guide because you googled for some of them.

Web Components

My initial goal was to recreate some react components from the design system we use at work as  web components. My two cents here is that web components, using  shadow DOM, makes it easy to encapsulate the components and fully control the look and feel and they are framework agnostic.

Lerna

I wanted to publish separate packages on npm and needed a framework for making it easier to maintain a JavaScript project with multiple packages with dependencies and independently versioned packages. Lerna documentation.

Rollup

The old saying “Rollup for libraries, Webpack for apps” might no longer be entirely correct. The functionality gap between different bundlers has been narrowing over the years and new bundlers like Parcel and Snowpack gets traction. Anyway, I just wanted to learn more about Rollup.

Jest

Easy to get started and easy to use.

#programming #javascript #typescript

What is GEEK

Buddha Community

Building A Npm Library with Web Components
Earlene  Rowe

Earlene Rowe

1593805500

Creating and Publishing Multiple Vue Web and Library Components

I’ve been reading around on articles about creating vue web/lib components. However, I could not find one handling multiple components. There is also a little emphasis on producing different target builds — the Library and Web Components. Thence, here it is — my attempt to share my experience setting up a multiple web and library components using vue.

On this reading, we will cover the following parts:

  • Configuring two target builds: Web and Library builds
  • Handling multiple components
  • Publishing the vue components as a scoped package to npm
  • Bonus — usage of the new published package
  • Bonus — how to work with the new components and see it in action

I know most developers want to get on the gist right away, so let’s start.


Initial Setup

Pre-requisites

Make sure first that vue cli and vue cli-service-global was installed globally. They will be use on building packages and serving components

npm install -g @vue/cli @vue/cli-service-global

Create a vue project

vue create dxc-components

It will prompt you with some setup options, you should just choose “default” and hit enter.


Build Targets

We have to specify our build configurations and to do that, we need to make changes on package.json. In scripts, update that portion to have it like this —

"scripts": {
     "serve": "vue-cli-service serve",
     "build": "npm run build:wc & npm run build:lib",
     "lint": "vue-cli-service lint",
     "build:lib": "vue-cli-service build --target lib --name dxc-components 'src/main.js'",
     "build:wc": "vue-cli-service build --target wc --name dxc-components 'src/components/*.vue'"
   },

build:lib will build our package designed for library use. Example

import MyComponent from 'my-component';  

export default {
   components: {
       MyComponent,   
   },
  // rest of the component 
}

build:wc will allow usage via <script> tag directly in the browser . Example

<script src="https://unpkg.com/vue"></script> <script src="https://unpkg.com/my-component"></script>
... 
<my-component></my-component> 
...

the 'src/components/*.vue' , is the entry that will register multiple components found insrc/components directory. In our configuration,--name was set to dxc-components , with that, the result of the bundle will be registered as <dxc-components-my-component> . That is, if we have a component named MyComponent.vue in src/components .

**Note! **When you only have one component inside src/components the --name will be use as the tag element name. So, the resulting element will be <dxc-components /> instead of <dxc-components-my-component />

The build on script commands will allow us to easily build both lib and web components.

#npm #web-components #vue #components-library

Evolution in Web Design: A Case Study of 25 Years - Prismetric

The term web design simply encompasses a design process related to the front-end design of website that includes writing mark-up. Creative web design has a considerable impact on your perceived business credibility and quality. It taps onto the broader scopes of web development services.

Web designing is identified as a critical factor for the success of websites and eCommerce. The internet has completely changed the way businesses and brands operate. Web design and web development go hand-in-hand and the need for a professional web design and development company, offering a blend of creative designs and user-centric elements at an affordable rate, is growing at a significant rate.

In this blog, we have focused on the different areas of designing a website that covers all the trends, tools, and techniques coming up with time.

Web design
In 2020 itself, the number of smartphone users across the globe stands at 6.95 billion, with experts suggesting a high rise of 17.75 billion by 2024. On the other hand, the percentage of Gen Z web and internet users worldwide is up to 98%. This is not just a huge market but a ginormous one to boost your business and grow your presence online.

Web Design History
At a huge particle physics laboratory, CERN in Switzerland, the son of computer scientist Barner Lee published the first-ever website on August 6, 1991. He is not only the first web designer but also the creator of HTML (HyperText Markup Language). The worldwide web persisted and after two years, the world’s first search engine was born. This was just the beginning.

Evolution of Web Design over the years
With the release of the Internet web browser and Windows 95 in 1995, most trading companies at that time saw innumerable possibilities of instant worldwide information and public sharing of websites to increase their sales. This led to the prospect of eCommerce and worldwide group communications.

The next few years saw a soaring launch of the now-so-famous websites such as Yahoo, Amazon, eBay, Google, and substantially more. In 2004, by the time Facebook was launched, there were more than 50 million websites online.

Then came the era of Google, the ruler of all search engines introducing us to search engine optimization (SEO) and businesses sought their ways to improve their ranks. The world turned more towards mobile web experiences and responsive mobile-friendly web designs became requisite.

Let’s take a deep look at the evolution of illustrious brands to have a profound understanding of web design.

Here is a retrospection of a few widely acclaimed brands over the years.

Netflix
From a simple idea of renting DVDs online to a multi-billion-dollar business, saying that Netflix has come a long way is an understatement. A company that has sent shockwaves across Hollywood in the form of content delivery. Abundantly, Netflix (NFLX) is responsible for the rise in streaming services across 190 countries and meaningful changes in the entertainment industry.

1997-2000

The idea of Netflix was born when Reed Hastings and Marc Randolph decided to rent DVDs by mail. With 925 titles and a pay-per-rental model, Netflix.com debuts the first DVD rental and sales site with all novel features. It offered unlimited rentals without due dates or monthly rental limitations with a personalized movie recommendation system.

Netflix 1997-2000

2001-2005

Announcing its initial public offering (IPO) under the NASDAQ ticker NFLX, Netflix reached over 1 million subscribers in the United States by introducing a profile feature in their influential website design along with a free trial allowing members to create lists and rate their favorite movies. The user experience was quite engaging with the categorization of content, recommendations based on history, search engine, and a queue of movies to watch.

Netflix 2001-2005 -2003

2006-2010

They then unleashed streaming and partnering with electronic brands such as blu-ray, Xbox, and set-top boxes so that users can watch series and films straight away. Later in 2010, they also launched their sophisticated website on mobile devices with its iconic red and black themed background.

Netflix 2006-2010 -2007

2011-2015

In 2013, an eye-tracking test revealed that the users didn’t focus on the details of the movie or show in the existing interface and were perplexed with the flow of information. Hence, the professional web designers simply shifted the text from the right side to the top of the screen. With Daredevil, an audio description feature was also launched for the visually impaired ones.

Netflix 2011-2015

2016-2020

These years, Netflix came with a plethora of new features for their modern website design such as AutoPay, snippets of trailers, recommendations categorized by genre, percentage based on user experience, upcoming shows, top 10 lists, etc. These web application features yielded better results in visual hierarchy and flow of information across the website.

Netflix 2016-2020

2021

With a sleek logo in their iconic red N, timeless black background with a ‘Watch anywhere, Cancel anytime’ the color, the combination, the statement, and the leading ott platform for top video streaming service Netflix has overgrown into a revolutionary lifestyle of Netflix and Chill.

Netflix 2021

Contunue to read: Evolution in Web Design: A Case Study of 25 Years

#web #web-design #web-design-development #web-design-case-study #web-design-history #web-development

Justyn  Ortiz

Justyn Ortiz

1599994800

Web Component Solutions: A Comparison

“Don’t repeat yourself.” Every programmer has this concept drilled into their head when first learning to code. Any time you have code you find yourself duplicating in several places, it’s time to abstract that code away into a class or a function. But how does this apply to user interfaces? How do you avoid re-writing the same HTML and CSS over and over again?

If you’re using a UI framework like Angular or a UI library like React, the answer is simple: you build a component. Components are bits of HTML, CSS, and JavaScript put together in a way that they can be easily reused.

But what if you’re not using Angular, React, Vue, or whatever else is the latest and greatest new JavaScript framework? What if you’re writing plain vanilla HTML, CSS, and JavaScript? Or what if you want to write a component that is framework-agnostic and can be used in any web app regardless of what it’s written in?

#javascript #development #web developement #html #salesforce #web components #lightning web components framework #stencil #ui frameworks

Kabanda  Nat

Kabanda Nat

1624094899

[Part 2]: Using Lightning Web Components to Create Progressive Web Apps

When a server sends a push notification to a subscribed user, it needs to authenticate itself as the same server to which the user subscribed. To do this, there is an entire spec (called the VAPID spec) that dictates how this authentication works. Fortunately for us, the web-push package helps to abstract away most of these low-level details.

The one thing we do need to do, however, is generate a VAPID public/private key pair, and store it in a .env file so we can access those keys as environment variables.

#web dev #progressive #web apps #lightning web #components

prashant patil

1598286700

whatsapp web-w app web-webs whatsapp »

Through whatsapp web you can easily run whatsapp on your android pc on your android mobile. Just like whatsapp mobile is for android device, whatsapp web is for windows device. Whatsapp web is quite popular which has quite cool features.

whatsapp web

how to use whatsapp web desktop
Whatsapp web is very easy to use. Simply you have to search web.whatsapp.com in your google chrome and click on first result which is the official website of whatsapp web.

As soon as you click, an interface will open in front of you, on which you will see a barcode. Follow the steps given below to use whatsapp web on your desktop

web.whatsapp.com

open your whatsapp on your mobile
You will see 3dots on the right side top inside whatsapp, you have to click
The 3rd option is whatsapp web, you have to click it
Now you have to capture the barcode you see on your desktop through your phone.
Now you can use whatsapp of your android mobile in your desktop
webs whatsapp

note: You can see whatsapp of anyone’s mobile by pointing to the barcode of your desktop. You can also call it whatsapp hack.

Remember that after using whatsapp web, logout it from your desktop. To logout follow the steps given below.

w app web

open your whatsapp on your mobile
You will see 3dots on the right side top inside whatsapp, you have to click
The 3rd option is whatsapp web, you have to click it
You will see the symbol for logout, you have to logout by clicking it.

read more

#whatsapp #whatappweb #https://web.whatsapp.com/ #wsp web #web.whatsapp web #web whatsapp