-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support versioning of ramda-repl js file
- also added a util script to generate the repl/index.html from handlerbars
- Loading branch information
Zehua Liu
committed
Sep 25, 2017
1 parent
a49a701
commit 86d5a5a
Showing
4 changed files
with
36 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
var fs = require('fs') | ||
|
||
var get_ramda_file = require('./get_ramda_file') | ||
|
||
var handlebars = require('handlebars') | ||
|
||
var marked = require('marked') | ||
|
||
var devDependencies = require('./package.json').devDependencies | ||
var version = devDependencies.ramda | ||
var repl_tag = devDependencies['ramda-repl'] | ||
|
||
get_ramda_file('README.md') | ||
.catch((err) => console.error(err)) | ||
.then((readme_md) => { | ||
var readme_html = marked(readme_md) | ||
|
||
var template = fs.readFileSync('repl/index.html.handlebars', {encoding: 'utf8'}) | ||
|
||
var html = handlebars.compile(template)({ | ||
version: version, | ||
repl_tag: repl_tag | ||
}) | ||
|
||
fs.writeFileSync('repl/index.html', html, {encoding: 'utf8'}) | ||
console.log('Generated repl/index.html'); | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters