1.0.11 • Published 5 years ago

socket-pouchdb-creator v1.0.11

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
5 years ago

hello-javascript

A simple JavaScript module that demonstrates how to write a JavaScript library that can be published in various formats (AMD, UMD, CommonJS, ES6 modules, globals) and to various repositories (npm, Bower, jspm).

All this module does is export a function that prints out "hello javascript!".

Instructions for module authors

Building

npm run build or yarn build will build the Node-ready and browser-ready versions, which are written to the dist-node and dist directories.

Publishing

First, run npm run build, then git commit the built files. (Yes, we're checking the built files into Git for the benefit of Github and Bower.)

Then do npm version patch|minor|major to create the npm version as well as the Git tag. Then git push origin master --tags, run npm publish, and you're good to go!

For Bower, you will also need to register your module using the steps described here.

Instructions for module users

Module authors: copy-paste these instructions when you publish. This module is not actually published anywhere.

You can install this module in a variety of ways:

npm

On the command line, run:

npm install hello-javascript

Or for yarn:

yarn add hello-javascript

Then you can build with Browserify/Webpack using require('hello-javascript'), or you can include it directly as a <script> tag via the dist/hello-javascript.js file. For Rollup users, it uses a "jsnext:main" field, so you can directly include the ES6 source.

Direct download

Download either the unminified hello-javascript.js file or the minified hello-javascript.min.js file from the Github releases page.

Bower

bower install hello-javascript

Then use the dist/hello-javascript.js as a <script> tag inside your HTML page.

jspm

jspm install hello-javascript

Then you can use dist/hello-javascript.js.

Why?

Writing JavaScript libraries has become complicated. I'm hoping this repository can serve as a Rosetta Stone so that newbie JavaScript authors have an idea of how to build their code for distribution in various channels.

Missing something?

Open a pull request! I'm sure there is some exotic publishing mechanism that I forgot about. :)

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago