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

enyo-builder

v0.1.3

Published

Bundle your enyo project for production times.

Downloads

2

Readme

Enyo Builder

An alternative to the enyo minifier build tool that comes with the bootplate application. Key benefits are as follows:

  1. Bundles everything into one css file and one javascript file. No separate files for enyo and your project.
  2. Ability to generate a source map of the bundled javascript file for debugging purposes.
  3. You can run this as a command line tool from anywhere. You don't have to be in a specific directory to execute the build. All you need to do is tell the tool where the main enyo directory is. This is only necessary for the enyo dependency loader to work properly.
  4. Available as an npm module. Whee!

Installation

npm install enyo-builder -g

You don't have to install it globally, but if you do, then you can run it with enyo-builder from anywhere instead of ./bin/enyo-builder from the locally installed path.

Assumptions

This assumes that your project is structured like so:

/
  enyo/
  lib/
  assets/
  source/
  build/

Your project's package dependency files must be named package.js.

Limitations

No support for less just yet. It wouldn't be difficult to add, but I'm not using it in my projects, so I didn't throw it in. In order for the script to bundle the enyo source with your project, you have to list enyo as a dependency in your project's package.js file. And when you do it, do it like this:

enyo.depends(
  "$enyo/source/boot",
  "$enyo/source",
  // ... Other files needed by your project.
);

Usage

If the module is installed globally, do this:

enyo-builder -e /path/to/enyo/directory

The path to the enyo directory can be absolute or relative. Your main index.html for your application needs the following in order to load the bundled css and javascript files:

<!-- BUILD VERSION -->
<link rel="stylesheet" href="build/bundle.css">
<script src="build/bundle.js"></script>

Adjust the src path accordingly for your environment.

Options

  • -e, --enyo: Absolute or relative path to main enyo directory. This is the only required option. This is needed in order for the enyo dependency loader to work correctly.
  • -s, --source: Path to your project source files. Default is to assume your source lives at the same level as enyo directory.
  • -o, --output: Absolute or relative path to your build directory. Default is build at the same level as your project source files.
  • -m, --sourcemap: Specify this option if you want the script to generate a source map file from your bundled files.

Notes

If you are loading enyo separately from your project files, simply omit the references to $enyo/source/boot and $enyo/source from your project's package.js file. The script will only bundle your project's source files in that case.

Script paths in the generated source map file will be relative to the bundle.js output file which is located in build/ by default. If you use the -o option to write the generated bundle files to another location, then the script paths in the source map will be relative from your specified output path. There are probably some environments where this will not work properly.