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

agilis

v0.0.1-alpha

Published

A straighforward frontend framework

Downloads

2

Readme

Agilis

Agilis is a straightforward frontend framework that only requires a basic knowledge of HTML to get started. The framework enables you to organise your HTML, CSS and JavaScript and provides an intuitive way of creating templates and components.

Installation

Install with yarn:

yarn global add agilis

or with npm:

npm install -g agilis

Basic usage

Once installed, agilis can be used like so:

agilis input-folder output-folder

This will parse the contents of input-folder and save the compiled html to the folder output-folder.

How it works

The idea of agilis is very simple. All it does is to parse the contents of a folder and compile it into a single HTML file. It does so, by introducing just a single addition to the HTML languge called the <template> tag.

The <template> tag allows you to import other html files, like so:

<template href="header.html" />

agilis will replace the <template> tag with the contents of header.html. The contents of header.html might look something like this:

<link href="header.css">
<div>I'm a fancy header</div>
<script src="header.js">

As with the <template> tag, agilis will replace <link> and <script> tags with the contents of header.css and header.js.

Assets

...

Why do we need this?

One of the intended usecases for agilis is for rapid prototyping and building simple static web pages. Personally, I like to use plain HTML. CSS & JavaScript when creating prototypes. But when a prototype starts getting complex, a need arises to organise code in smaller chunks.

Another intended usecase is to help newcomers to the frontend development field organise their code and. Frontend frameworks often require expert JavaScript skills. And if having those, they often require adopting a bunch of new conventions and ideas as well. agilis is extremely basic in its .

This all sounds a bit like Web Components...

In HTML, we lack the basic ability of importing and combining the contents of multiple .html files. There is already a <link rel="import" href="some-file.html"> tag in the Web Components specification. But this doesn't simply import the contents of that file into yours in place. We have to do scripting to use the content. Working with Web Components require expert JavaScript skills and there is still a lack of cross-browser support making it cumbersome to use.

Command line interface

Usage: agilis [options]

Options:

  -h, --help                     Output usage information.
  -w, --watch                    Save file on change
  -s, --serve                    Serve file on localhost:3000
  -d, --dev                      Serve application and automaically save file on changes

Serving an application & watching for changes

agilis comes with a build-in server and file-watcher proving a simple development workflow. Simply use the --dev option, like so:

agilis input-folder output-folder --dev

This will fire up a webserver hosting output-folder on localhost:3000. The contents of output-folder will be updated whenever a change occurs in input-folder. And any browser tab that has navigated to localhost:3000 will be reloaded.

Usage in Node.js

You can also use agilis in a node application. For instance, to use it with express, a simple application might look something like this:

const path = require('path');
const app = require('express')();
const cakewalk = require('agilis');
const clientFolder = path.join(__dirname, './input-folder');

app.get('/', (req, res) => res.send(cakewalk(clientFolder)));
app.listen(3000, () => console.log('Go to http://localhost:3000'));

Here, the client code will be compiled and sent to the client when navigating to localhost:3000.