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

nobj-build-tools

v1.5.64

Published

Build tools for HTML/Javascript Applications and Libraries

Downloads

26

Readme

nobj-build-tools

Utilities to pack and obfuscate HTML/Javascript Applications and Libraries, featuring enhanced obfuscation, CSS processor, assets and a number of other interesting features.

Initial Requirements

  • Tool runs on Linux, macOS and Windows (requires Cygwin pre-installed)
  • Tool can be installed globally or as devDependencies
  • Tool uses google closure compiler and uglifycss to process the source code. Different settings apply.

Installation

Installing globally

If you develop a lot of applications, you can be interested in installing nobj-build-tools globally. That allows to invoke the different utilities from any folder, as symlinks will be created in /usr/local/bin.

[sudo] npm install -g nobj-build-tools

Installing as devDepencencies

npm install nobj-build-tools --save-dev

In this case, utilities will be ./node_modules/.bin.

Included Tools

| command | parameter | Description | |--------------------|--------------|----------------------------------------------| | nobj-init-lib | libName | Creates a new Library | | nobj-init-app | appName | Creates a new Application | | nobj-build | Version | Builds the library or app in this folder. | | nobj-build-app | appVersion | Builds the application in this folder | | nobj-build-closure | appVersion | Builds the closure in this folder | | nobj-build-update | | Update the tool's templates |

Usage

Creating a New Library

nobj-init-lib <libname>

The command, assumming you used mylib as the libname, will generate the following folder structure:

mylibrary
    src/
        *.js
        ... all the different source files, using CommonJS modules
    css/
        *.css
        ... all the css files
    main/
        main.js
        ... the main module to run, if any
    assets/
        *
        ... copied to the library web root recursively

Building a Library

Just type from the project directory:

nobj-build [libversion]

  • libversion is the library version.

    • If specified, compiled library will be published to NPM, providing that a npm-package.json.template is present on the root folder. This file will use the placeholder ${VERSION} in the Version Field, and will be substituted with the pacage version.

    • If not specified, no package will be uploaded to NPM

The command will compile all source modules in the folders, and use google-closure-compiler to minimize the code. A stub with CommonJS is automatically added, so you can use require() in your modules. Additionally,

  • Packs all the CSS found in the CSS folders
  • Copies your included assets to the resulting Web Root
  • The selected template can also have CSS, Assets and code, that is equally merged
  • Finally, if you have set the CLOUDDIR env var, the resulting library will be uploded to that S3 bucket path.
  • If you have created a npm-package.json, the package is uploaded to NPM

Creating a New Application

nobj-init-app <template> <appname>

  • [appname] is the application short name. A folder will be created with this name, so avoid spaces and conflictive symbols.
  • [template] is the application template to use. The tool provides an always growing list of templates: The tool help page will display them.

The command above, assumming you used myapp as the appname, will generate the following folder structure:

myapp
    src/
        main.js
        *.js

        section1/
            *.js
            css/
                *.css
        .
        .

        ... placeholder for your different source modules (CommonJS modules). You can also create arbitrary folders
            with code and their own CSS folders to better organize your code.

    css/
        *.css
        ... placeholder for the application css files


    assets/
        index.html
        *.html ...
        *.jpg ....

        ... copied to the library web root recursively. This is the place to
            put the "index.html"

The selected template may have populated that tree with arbitrary files you can customize.

Building an Application

To build an application you have created, just type from the project directory:

nobj-build [version]

The command will compile all source modules in the folders, and use google-closure-compiler to minimize the code. A stub with CommonJS is automatically added, so you can use require() in your modules. Additionally:

  • Packs all the CSS found in the CSS folders
  • Copies your included assets to the resulting Web Root
  • The selected template can also have CSS, Assets and code, that is equally merged
Uploading the application to your CDN

Set the CLOUDDIR environment variable with the S3 bucket path, like:

export CLOUDDIR=s3://mycdnbucket/public/lib
  • Requires AWS Client Software installed on the computer,.

License

nobj-build-tools (C) 2021 Nebular Streams, All rights reserved. https://bitbucket.org/nebularstreams/nobj-build-tools/