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

acute

v0.0.3

Published

Modular build management for client side javascript applications.

Downloads

5

Readme

acute.js

The no strings attached JavaScript build solution.

This project is very much in its infancy. Feel free to contribute if you dig it!

Why?

Because organising your client side application shouldn't be a chore. acute.js let's you do it however you please, and build it with a single command.

How?

At its core, acute.js uses the /// import and /// export directives to describe a modules context in the project. The triple-slash comments allows acute.js modules to be incredibly portable.

The hello world! example demonstrates, pretty much, all the components of acute.js.

Getting Started

acute.js is best installed globally.

npm install -g acute

Now let's whip up a quick hello world! library to demonstrate acute.js's fool proof module system.

hello.js

/// exports foo.hello from bar;
var bar = 'hello';

First we create a namespace foo.hello and give it the object bar.

world.js

/// exports foo.world;
var world = 'world';

Now we create a namespace foo.world and it infers that it should receive the object world.

example.js

/// exports example;
/// imports foo.hello;
/// imports foo.world to bar;
var example = function() {
  console.log(hello + ' ' + bar + '!');
};

This will be our entry point. It creates a namespace example which infers the function we've defined and it also imports our namespaces foo.hello and foo.world. In this instance we've imported foo.world as bar.

So how do build this trivial little example? With an acute.json file of course!

acute.json

{
  "root": "./",
  "public": {
    "example": "foo"
  },
  "output": "./build.js"
}

So what is this telling us? Well assuming all our files are in the same directory, acute.json is going to instruct the compiler that all source files are located in the ./, this directory; it wants to make the namespace example publically accessible as window.foo, and finally; it wants to output the result to a file ./build.js. Now it's simply a matter of executing the acute.js compiler on the command line.

$ acute .

And voila! We now have a portable JavaScript hello world! library!

Programmatic API

If you decide you would like to use acute.js in your Gruntfile, or anything else, you can execute a build by requiring acute in your source code.

var $acute = require('acute');
$acute.make('./path/to/acute.json', function(err) {
  if (err) return console.log(err);
  console.log('All good man!');
);

Questions, Comments?

Feel free to email or submit an issue!

Contributing

To say acute.js is in its infancy would be an understatement. Please feel free to contribute by forkng this repository and issuing a pull request! Please maintain the coding style if you do!