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

id-project

v2.14.0

Published

DRY project automation for Node.js and javascript frontend projects.

Downloads

68

Readme

A gulp based project structure and compilation automation.

Installation

Install the required dependencies to run id-project with NPM.

$ npm install --save-dev id-project gulp coffee-script

Usage

Running id-project should work with very little configuration. Right now the policy is to enable all options by default.

  1. Put a file named gulpfile.coffee in your project directory containing:
idProject = require "id-project"
idProject()
  1. Run the gulpfile from the commandline:
$ gulp

Or with debugging:

$ DEBUGGING=true gulp

Default directory structure

This is the directory structure the default options assume:

build/             # Output directory. Typically what you want to bundle with
                   # NPM and run.

docs/              # Generated documentation.

src/               # Input directory.

  client/          # Browser files.

    js/            # Browser JavaScript.

      app/         # Your app.

        app.coffee # The app entry point (for browserify).

  server/          # Server files.

    <anything>

test/              # Mocha unit tests.

app.js             # The server entry point. Generally starts something from
                   # the build/server/ directory.

Default options

These options assume the default directory structure (but you can change it to anything you like):

idProject = require "id-project"

idProject
  browserify:
    enabled:             true
    entryFilePath:       "src/client/js/app/app.js"
    targetDirectoryPath: "build/client/js/app"
    targetFilename:      "app.bundle.js"

  clean:
    enabled:             true
    targetDirectoryPath: targetDirectoryPath

  coffee:
    enabled:             true
    sourceDirectoryPath: "src"
    targetDirectoryPath: "build"

  copy:
    enabled:             true
    excluded:            [ "!**/*.coffee", "!**/*.less" ]
    sourceDirectoryPath: "src"
    targetDirectoryPath: "build"

  documentation:
    enabled:             true
    sourceDirectoryPath: "src"
    targetDirectoryPath: "docs"

  less:
    enabled:             true
    entryFilePath:       "src/client/less/app.less"
    targetDirectoryPath: "build/client/css"

  livereload:
    enabled:             true

  forever:
    enabled:             true
    entryFilePath:       "app.js"
    watchDirectoryPath:  "build/server"

  tests:
    enabled:             true
    directoryPath:       "test"

  watch:
    enabled:             true
    sourceDirectoryPath: "src"
    testDirectoryPath:   "build"

Features

Clean

Cleans the build directory.

CoffeeScript

Compiles CoffeeScript files to JavaScript files and places them in the build directory.

Less

Compiles Less files starting from an entry file to one Cascading Style Sheet file and places it in the build directory.

Copy

Copies any file that is not a CoffeeScript file or Less file and places it in the build directory.

Documentation

Generates API documentation for all CoffeeScript files in the source directory. Uses the Codo system.

Browserify

Compiles the outputted JavaScript files from the CoffeeScript task and Jade files copied over with the Copy task to one javascript file called the bundle.

Nodemon

Starts a server in development mode and keeps watch over server files. When an outputted JavaScript file from the CoffeeScfipt task in the build directory changes, it restarts the server.

Tests

Runs assertion tests with the Mocha test runner.

Watch

When any file in the source directory changes, this task sends a message to the corresponding tasks, triggering another compile/copy/etc of the subject files.

Livereload

Starts a LiveReload server. When a file changes that affects the browser, sends a message to the livereload server, reloading the browser.