-
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.
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 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,11 @@ | ||
var fs = require('fs') | ||
|
||
var get_ramda_file = require('./get_ramda_file') | ||
|
||
var path = require('path') | ||
|
||
get_ramda_file(path.join('dist', 'ramda.js')) | ||
.catch((err) => console.error(err)) | ||
.then((ramda_js) => { | ||
fs.writeFileSync(path.join('docs', 'dist', 'ramda.js'), ramda_js, {encoding: 'utf8'}) | ||
}) |
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,18 @@ | ||
var fs = require('fs') | ||
|
||
var path = require('path') | ||
|
||
module.exports = (child_path) => new Promise ((resolve, reject) => { | ||
var ramda_module_path = require.resolve('ramda') | ||
|
||
var ramda_folder = path.normalize(path.join(ramda_module_path, '..', '..')) | ||
|
||
var file_path = path.join(ramda_folder, child_path) | ||
|
||
fs.readFile(file_path, 'utf8', (err, data) => { | ||
if (err) | ||
reject(err) | ||
else | ||
resolve(data) | ||
}) | ||
}) |