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

nw-init

v0.2.0

Published

Provides scaffolding for node-webkit applications

Downloads

10

Readme

NW.js Application Initializer

Dependency Status npm version

Node plugin for creating scaffolding necessary to start a new NW.js application. This creates the project structure need to build Windows and OSX Applications. It also will package your application into a sexy and simple setup installer DMG or EXE. Initialized application automatically include Bootstrap and JQuery.

Installing

Install this node module globally.

npm install -g nw-init

Usage

Give a path to the new project folder. If no path is set, it will install in the current working directory.

nw-init ~/Desktop/MyNewApp

Dependencies

In order to build your new application, there are some external global dependencies that are required.

grunt

Grunt is required to build. See the getting started guide.

npm install -g grunt-cli

makensis

makensis is required to create the Windows setup executable. Can be installed with brew:

brew install makensis

appdmg

node-appdmg is required to create the OS X DMG installer image.

npm install -g appdmg

wine

On OSX if building for Windows, Wine needs to be installed to create the application icon. Can be installed with brew

brew install wine

Building

The Grunt project is an extension of the project-grunt and all those grunt tasks can be used on your app. In addition, there are several Grunt tasks that are specific and useful to building your NW.js application:

Task | Description ---|--- app[:(platform)] | Builds a release version of the NW.js app app-debug[:(platform)] | Builds a debug version of the NW.js app package[:(platform)] | Create the installers open:(platform) | Open the application, requires a platform.

  • platform Valid types include osx32, osx64, win32, win64

Examples

Build the application in debug mode and run for OS X 64-bit:

grunt app-debug:osx64 open:osx64

Build the release application and package to all installers:

grunt app package

Conditional Compiling

In addition to project-grunt's DEBUG and RELEASE condititional constants for JavaScript, applications created with nw-init support APP and WEB.


if (APP)
{
	// Only app builds will show this code
	var fs = require('fs');
	fs.readFile('data.json', function(err, data){
		data = JSON.parse(data);
		// load a json file with node
	});
}

if (WEB)
{
	// Only default builds, like grunt tasks 'build' and 'build:dev'
	$.getJSON('data.json', function(data){
		// load a json file with jQuery
	});
}

Examples

##License

MIT License