npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

blop-language

v1.0.1

Published

Blop language is JavaScript-like language for the web

Downloads

25

Readme

The blop language

Blop is a language for the Web that can natively generates Virtual DOM using a familiar HTML like syntax. The Blop language compiles to ES6 compliant JavaScript. The language is mostly self contained and has very few dependencies. Blop is using snabbdom library to handle the virtual nodes.

Unlike JSX Blop is not limited to expressions and can use the full power of the language to generate Virtual DOM nodes. You can mix any statement, expressions, and HTML like syntax within the same function.

The blop runtime also comes with a Component and Lifecycle system.

Example project from this repository

State management and routing can be up to you, but 2 small libraries provide the basics to get started

How to get get started

Language features

  • Virtual DOM generation is natively supported by the language.
  • Fast compilation (+30'000 lines by second).
  • A linter is integrated into the language: no linter debate.
  • Good integration with Visual Studio Code: linter and syntactic coloration.
  • Source maps.
  • Server Side Rendering in the example.
  • Hot module reloading in the example (HMR)
  • Type annotation with very basic type inference warnings.
  • Similar syntax and features than ES6.
  • 100% Webpack and Jest compatible
  • Very small payload size for Snabbdom and Blop runtime: Parsed size: ~20KB, Gzipped: ~7KB

Language features missing

  • The language is still in beta

Installation

npm install blop-language

Or if you want to use the development version with examples

git clone this repo
npm install
npm start
open http://localhost:3000

Command line usage

To convert a single file

blop -i input.blop -o output.js

Configure Webpack loader for blop

Add this rule into your webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        test: /\.blop$/,
        use: [
          {
            loader: 'blop-language/src/loader',
            options: {debug: false}
          }
        ]
      }
    ]
  }
};

Configure Jest for blop

// jest.config.js
module.exports = {
  moduleFileExtensions: [
    'blop',
    'js',
  ],
  testMatch: ['**/*.test.blop'],
  transform: {
    '^.+\\.blop$': 'blop-language/src/jest',
  },
};

Install Visual Studio Code extensions

Install them though visualstudio marketplace.

vscode will prompt you to install the extenstion when you open a .blop file

Here is a link to the extensions on the visualstudio marketplace

Install the extensions https://marketplace.visualstudio.com/search?term=blop&target=VSCode&category=All%20categories&sortBy=Relevance

Install them throught github

If you cloned the repository, it is has simple has creating a symbolic link to your ~/.vscode/extensions directory. This function will do it for you:

cd blop-language/
npm run link-extensions

Relaunch vscode and open a .blop file to see if the linter and coloration work