Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.

Issue#41 - Get input/output files from extension #111

Merged
merged 2 commits into from
Oct 18, 2016
Merged

Issue#41 - Get input/output files from extension #111

merged 2 commits into from
Oct 18, 2016

Conversation

tenshi13
Copy link
Contributor

@tenshi13 tenshi13 commented Oct 17, 2016

  • attempt for issue Get input/output files from extension #41
  • added logic to do file name extension fallback, when there is no specified renderer
  • if no suitable extension is available, it goes back to default to pdf as the renderer
  • if renderrer flag is specified (e.g. --pdf), the specified renderer will have precedence

e.g. : as per example/commends in #102
yamp "README.md" "-o" "readme.html"
readme.html created

yamp "README.md" "-o" "readme.pdf"
readme.pdf created

yamp "README.md" "-o" "readme.html" "--pdf"
readme.html.pdf created

- added logic to do file name extension fallback, when there is no specified renderer
- if no suitable extension is available, it goes back to default to pdf as the renderer

e.g. :
"README.md" "-o" "readme.html"
readme.html created

"README.md" "-o" "readme.pdf"
readme.pdf created

"README.md" "-o" "readme.html" "--pdf"
readme.html.pdf created
@angrykoala
Copy link
Owner

angrykoala commented Oct 17, 2016

jshint failed in travis, please fix the following problems before merge:

  • bin/yamp_cli.js: line 78, col 25, ['outputFileExtension'] is better written in dot notation.
  • bin/yamp_cli.js: line 79, col 56, ['outputFileExtension'] is better written in dot notation.
  • bin/yamp_cli.js: line 80, col 47, ['outputFileExtension'] is better written in dot notation.
  • bin/yamp_cli.js: line 110, col 38, Expected '===' and instead saw '=='.

@tenshi13
Copy link
Contributor Author

Hi @angrykoala I've just did a quick update, hopefully its ok now.
Sorry am still very new with nodejs

@codecov-io
Copy link

codecov-io commented Oct 18, 2016

Current coverage is 94.64% (diff: 100%)

Merging #111 into dev will increase coverage by 0.22%

@@                dev       #111   diff @@
==========================================
  Files            12         12          
  Lines           215        224     +9   
  Methods          39         39          
  Messages          0          0          
  Branches         35         37     +2   
==========================================
+ Hits            203        212     +9   
  Misses           12         12          
  Partials          0          0          

Powered by Codecov. Last update 05f581e...8086a48

@angrykoala
Copy link
Owner

@tenshi13 No problem, good job

@angrykoala angrykoala merged commit d52b5cf into angrykoala:dev Oct 18, 2016
@tenshi13
Copy link
Contributor Author

wooo awesome! thx for the merge : D

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants