Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit22b88ab

Browse files
committed
Merge pull request#2 from bcoe/travis
get Travis and Coveralls up and running
2 parentse303560 +4ddf45b commit22b88ab

File tree

5 files changed

+18
-2
lines changed

5 files changed

+18
-2
lines changed

‎.npmignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.DS_Store
2+
src
3+
.nyc_output
4+
node_modules

‎.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
language:node_js
2+
node_js:
3+
-"0.10"
4+
-"0.12"
5+
-"node"
6+
after_script:npm run coverage

‎package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
22
"name":"yarsay",
3-
"version":"1.0.0",
3+
"version":"1.0.4",
44
"description":"Tell Pirate Joe what to say",
55
"main":"lib/yarsay.js",
66
"bin":"lib/cli.js",
77
"scripts": {
88
"build":"cd src; babel ./*.js -d ../lib",
9+
"coverage":"nyc --reporter text-lcov --require babel-core/register mocha | coveralls",
910
"prepublish":"npm run build",
1011
"pretest":"standard ./src/*.js",
1112
"test":"nyc --require babel-core/register mocha"
@@ -24,7 +25,9 @@
2425
"babel-core":"^6.2.1",
2526
"babel-preset-es2015":"^6.1.18",
2627
"chai":"^3.4.1",
28+
"coveralls":"^2.11.4",
2729
"mocha":"^2.3.4",
30+
"nyc":"^4.0.0",
2831
"standard":"^5.4.1"
2932
},
3033
"dependencies": {

‎src/cli.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env node
2+
13
if(typeofGLOBAL.Promise==='undefined')GLOBAL.Promise=require('bluebird')
24

35
varYarsay=require('./yarsay')

‎src/yarsay.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
varchalk=require('chalk')
22
varfs=require('fs')
3+
varpath=require('path')
34
varws=require('window-size')
45
varui=require('cliui')({
56
width:Math.min(ws.width||60,60)
67
})
78

89
classYarsay{
910
constructor(msg="maybe if we ask nicely, they'll just give us their riffiwobbles!"+chalk.bold(' --Pirate Joe, the eternal optimist...')){
10-
varjoe=fs.readFileSync('./joe.txt','utf-8')
11+
varjoe=fs.readFileSync(path.resolve(__dirname,'../joe.txt'),'utf-8')
1112

1213
// the layout engine treats Joe as one
1314
// giant pirate-shaped word.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp