Skip to content

yyid/guides

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 

Repository files navigation

How to create a module/package/library in any programming language.

How to Structure Code and Publish a Module

JavaScript

The package manager situation can be confusing at the beginning. Most modules are published on npmjs.com, but some are served directly from github.com. To complicate things even further, there are different module systems, which describe how to access the code. Here are three different ways how you can publish your code. If you are doing server-side node.js programming, pick option one (npm plus CommonJS). If you are doing front-end programming, you are encouraged to go with option two (npm plus ES6 modules). Option three (Bower plus browser globals) is simple to use, but disregarded in large parts of the JavaScript community.

You can also go through the struggle (= less time for actual coding) and try to support everything at once. A very detailed description of current JavaScript package managers and module systems can found in this blog arcticle by Nolan Lawsons.

Ruby

The usual way to publish Ruby modules is using rubygems.org:

How to Write and Run a Unit Test

Ruby

While using RSpec is quasi-standard in the Ruby community, minitest is getting more attention lately, and is even bundled in Ruby's standard library.

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •