Skip to content

Instantly share code, notes, and snippets.

@enil
Last active July 2, 2017 12:17
Show Gist options
  • Save enil/4715ad3bde15edecd5864d2cd2b4ffe3 to your computer and use it in GitHub Desktop.
Save enil/4715ad3bde15edecd5864d2cd2b4ffe3 to your computer and use it in GitHub Desktop.
Trying to publish an NPM project through gist

Hello world

This is the documentation.

exports.hello = function hello() {
return 'Hello gist!';
};
{
"name": "4715ad3bde15edecd5864d2cd2b4ffe3",
"version": "1.0.0",
"description": "This is the documentation.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+ssh://git@gist.github.com/4715ad3bde15edecd5864d2cd2b4ffe3.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"bugs": {
"url": "https://gist.github.com/4715ad3bde15edecd5864d2cd2b4ffe3"
},
"homepage": "https://gist.github.com/4715ad3bde15edecd5864d2cd2b4ffe3"
}
@enil
Copy link
Author

enil commented Jul 2, 2017

Install with npm install -S gist:4715ad3bde15edecd5864d2cd2b4ffe3.

const {hello} = require('4715ad3bde15edecd5864d2cd2b4ffe3');
console.log(hello);

Not very pretty, but effective ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment