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

osnova-module-template

v0.3.13

Published

Client+Server module template for node.js and browsers with built-in ES6 syntax support.

Downloads

5

Readme

#OSNOVA: Client+Server module template

###bI Client+Server module template for node.js and browsers with built-in ES6 syntax support. Wow such ready-to-go much time to watch anime.

###Philosophy Decoupling is good in a theory. On a practice you sometimes need to add a feature both to client and server. Client-server OSNOVA's modules is a fast way to accomplish this task. It is reusable, ES6-ready (thanks Babel) components. Components transpiles to ES5 code and can be used in most every enviroments without ES6 support as CommonJS module.

###Install

####via git (preferable)

git clone [email protected]:Noviel/osnova-module-template.git <your-module-name>

####or via download

https://github.com/Noviel/osnova-module-template/archive/master.zip

and uznip to new project directory.

####or via npm

npm install osnova-module-template

and then cut'n'paste content of /node_modules/osnova-module-template to the root of your project.

###Prepare

  • Go to <your-module-name> root directory.
  • Delete .git directory.
  • npm install for dependencies.
  • Set in package.json information about your module.

###Usage

  • Write some cool code in src/code folder.

Client-side code is located in src/code/client, server-side in src/code/server. index.js in both directories are entry points for client/server. This system is server-first in some aspects. Common code used at server and at client is treated as more server-side and located in src/code/server/common.

There are two sample sub-modules for client and server. If sub-module is big - you better give him his own directory.

  • Run npm run build to build your revolutionary changes in code. This will put transpiled to ES5 code to client and server directories
  • Run some tests.
  • Share your brilliant brand-new module with the whole world! or selfishly use it by yourself as local module without publication.

###Usage of your OSNOVA's module

To run your module without contamination of it you need a Host. There is some hosts examples in hosts directory for quick tests of your module, for example. Mainly host for your OSNOVA's module is a project in which it was installed.

Host just do:

  • At client require('your-osnova-module/client');
  • At server require('your-osnova-module/server'); or require('your-osnova-module');

Webpack or Browserify or any other build system that supports CommonJS modules is required to include your module at a client-side.

####via Inner-Host

  • node ./hosts/<hostname.js>

####via npm

  • npm install your-osnova-module.

####as Local Module

TBA in June

###Publish

Order for commands:

  1. build
  2. npm
  3. git

First of all to transpile your code:

npm run build

####to npm Npm won't allow you to publish the same version of module that is already exist in its registry.

There is useful scripts in package.json for automatic bumping of version before publication to npm: patch-release, minor-release, major-release.

More about version system: https://github.com/npm/node-semver#functions

  • Ensure that you are logged-in into your npm account and located in module's root directory and:

    npm run <patch|minor|major>-release or update version in package.json by your own and:

    npm publish

#####to GitHub

  • Create new repository on GitHub.

    git init git remote add origin git add . git commit -m "first commit" git push -u origin master

####Publish commands sample

npm run build
npm run patch-release
git add .
git commit -m "wow hidden genius has been revealed!"
git push -u origin master

###Bugs

Babel es-2015 export default feature is not working :() I am investigating the situation!