sintaxi/harp

harp with wercker

sugizo opened this issue · 0 comments

wercker.yml
box: node
build:
steps:
#- npm-install
- script:
name: install
code: npm list harp || npm install harp
- script:
name: compile
code: ./node_modules/.bin/harp compile

result failed on harp compile
export WERCKER_STEP_ROOT="/pipeline/script-a99adb60-e64c-4fa2-8482-4c4d856a4a11"
export WERCKER_STEP_ID="script-a99adb60-e64c-4fa2-8482-4c4d856a4a11"
export WERCKER_STEP_OWNER="wercker"
export WERCKER_STEP_NAME="script"
export WERCKER_REPORT_NUMBERS_FILE="/report/script-a99adb60-e64c-4fa2-8482-4c4d856a4a11/numbers.ini"
export WERCKER_REPORT_MESSAGE_FILE="/report/script-a99adb60-e64c-4fa2-8482-4c4d856a4a11/message.txt"
export WERCKER_REPORT_ARTIFACTS_DIR="/report/script-a99adb60-e64c-4fa2-8482-4c4d856a4a11/artifacts"
source "/pipeline/script-a99adb60-e64c-4fa2-8482-4c4d856a4a11/run.sh" < /dev/null
{
"source": "Jade",
"dest": "HTML",
"filename": "/pipeline/source/node_modules/harp/lib/templates/_layout.jade",
"lineno": 129,
"name": "TypeError",
"message": "Cannot read property 'version' of undefined",
"stack": "doctype\nhtml(lang="en")\n\thead\n\t\tmeta(charset="utf-8")\n\t\tmeta(http-equiv="X-UA-Compatible", content="IE=edge,chrome=1")\n\t\t//- title #{ pkg.name } #{ pkg.version }\n\t\ttitle Harp\n\t\tmeta(name="handheldfriendly", content="true")\n\t\tmeta(name="mobileoptimized", content="320")\n\t\tmeta(name="viewport", content="width=device-width, initial-scale=1.0")\n\t\tmeta(http-equiv="cleartype", content="on")\n\t\tstyle.\n\t\t\tbody {\n\t\t\t\tfont-family: Verdana;\n\t\t\t\tpadding:10px 10px;\n\t\t\t}\n\n\t\t\th1, h2, h3, h4, h5, h6{\n\t\t\t\tfont-weight: 300;\n\t\t\t\tline-height: 1.5em;\n\t\t\t}\n\n\t\t\th3 {\n\t\t\t\tfont-weight: 500;\n\t\t\t\tfont-size: 1em;\n\t\t\t}\n\n\t\t\tp {\n\t\t\t\tfont-size: 1em;\n\t\t\t\tline-height: 1.5em;\n\t\t\t}\n\n\t\t\theader{\n\t\t\t\tpadding:20px 0px;\n\t\t\t}\n\n\t\t\theader h1{\n\t\t\t\tmargin:0;\n\t\t\t}\n\n\t\t\theader h3{\n\t\t\t\tmargin:0;\n\t\t\t}\n\n\t\t\t.stacktrace{\n\t\t\t\tpadding:0px;\n\t\t\t\tmargin-bottom:20px;\n\t\t\t\tmargin-top:40px;\n\t\t\t\tborder:2px solid #a44;\n\t\t\t\tbackground:#a44;\n\t\t\t}\n\n\t\t\t.stacktrace h3{\n\t\t\t\tpadding:22px 0px 20px 10px;\n\t\t\t\tcolor: #fff;\n\t\t\t\tmargin:0px;\n\t\t\t\tfont-size:0.75em;\n\t\t\t\tline-height:1em;\n\t\t\t\tfont-weight:600;\n\t\t\t\toverflow:auto;\n\t\t\t}\n\n\t\t\tpre {\n\t\t\t\tpadding: 20px 0px;\n\t\t\t\tmargin:0;\n\t\t\t\tbackground:#f8f8f8;\n\t\t\t\twidth:100%;\n\t\t\t\toverflow:auto;\n\t\t\t}\n\n\t\t\tcode{\n\t\t\t\tline-height: 1.5em;\n\t\t\t\tfont-size: 1em;\n\t\t\t}\n\n\t\t\tfooter{\n\t\t\t\tbackground: #f8f8f8;\n\t\t\t\tpadding:20px 0px 20px 20px;\n\t\t\t\tborder-top:2px solid #eee;\n\t\t\t}\n\n\t\t\t.version{\n\t\t\t\tbackground: #6b919e;\n\t\t\t\tpadding: 2px 6px;\n\t\t\t\tborder-radius: 3px;\n\t\t\t\tcolor:#FFF;\n\t\t\t\tfont-weight: 300;\n\t\t\t}\n\n\t\t\tul.projects {\n\t\t\t\tpadding: 0;\n\t\t\t}\n\n\t\t\tul.projects li{\n\t\t\t\tlist-style-type:none;\n\t\t\t\tmargin-bottom:10px;\n\t\t\t}\n\n\t\t\tul.projects li a{\n\t\t\t\tbackground: #eee;\n\t\t\t\tpadding:25px 0px 25px 20px;\n\t\t\t\tborder-left: 4px solid #6b919e;\n\t\t\t\tdisplay:block;\n\t\t\t\tborder-radius: 5px;\n\t\t\t\ttext-decoration:none;\n\t\t\t}\n\n\t\t\tul.projects li a h2{\n\t\t\t\tfont-weight:bold;\n\t\t\t\tcolor: #6b919e;\n\t\t\t\tmargin:0px;\n\t\t\t}\n\n\t\t\tul.projects li a code{\n\t\t\t\tmargin:0px;\n\t\t\t\tcolor:#666;\n\t\t\t\ttext-decoration:none;\n\t\t\t}\n\n\t\t\t.center {\n\t\t\t\ttext-align:center;\n\t\t\t\tpadding-top: 100px;\n\t\t\t\tpadding-bottom: 100px;\n\t\t\t}\n\n\tbody\n\t\t!= yield\n\t\tfooter\n\t\t\tp Harp <span class="version">v#{ pkg.version }  \n\t\t\t\ta(href="http://harpjs.com/docs/\", target="_blank") Documentation\n"
}

strange things

  1. same code can work smoothly in netlify
  2. i don't use jade in my code (i use *.ejs)