configure babel
setup global bin
This commit is contained in:
parent
4830e50375
commit
921c50e54b
35
.gitiginore
Normal file
35
.gitiginore
Normal file
@ -0,0 +1,35 @@
|
||||
#### joe made this: https://goel.io/joe
|
||||
|
||||
#####=== Node ===#####
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (http://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directory
|
||||
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
|
||||
node_modules
|
||||
|
||||
# Debug log from npm
|
||||
npm-debug.log
|
||||
|
@ -3,6 +3,12 @@ node-games
|
||||
|
||||
Some fun console games written using Node.
|
||||
|
||||
```
|
||||
npm i -g node-games
|
||||
|
||||
node-games
|
||||
```
|
||||
|
||||
spacecraft
|
||||
----------
|
||||
![spacecraft](https://raw.githubusercontent.com/mdibaiee/node-games/master/spacecraft.png)
|
||||
|
14
index.js
Executable file
14
index.js
Executable file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
var game = process.argv[2];
|
||||
|
||||
if (!game) {
|
||||
console.log('Games');
|
||||
console.log('- spacecraft');
|
||||
return;
|
||||
}
|
||||
|
||||
require('babel-polyfill');
|
||||
require('babel-core/register');
|
||||
|
||||
require(__dirname + '/' + game);
|
30
package.json
Normal file
30
package.json
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
"name": "node-games",
|
||||
"version": "1.0.0",
|
||||
"description": "Simple node console games",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"bin": "index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/mdibaiee/node-games.git"
|
||||
},
|
||||
"keywords": [
|
||||
"game",
|
||||
"console"
|
||||
],
|
||||
"author": "Mahdi Dibaiee <mdibaiee@aol.com> (http://dibaiee.ir/)",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/mdibaiee/node-games/issues"
|
||||
},
|
||||
"homepage": "https://github.com/mdibaiee/node-games#readme",
|
||||
"dependencies": {
|
||||
"ansi": "0.3.0",
|
||||
"babel-core": "6.3.17",
|
||||
"babel-polyfill": "6.3.14",
|
||||
"babel-preset-es2015": "6.3.13"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user