File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,10 @@ var repl = require('repl')
33var npmi = require ( 'npmi' )
44var path = require ( 'path' )
55var colors = require ( 'colors' )
6+ var replHistory = require ( 'repl.history' )
67
78const TRYMODULE_PATH = process . env . TRYMODULE_PATH || path . resolve ( ( process . env . HOME || process . env . USERPROFILE ) , '.trymodule' )
9+ const TRYMODULE_HISTORY_PATH = process . env . TRYMODULE_HISTORY_PATH || path . resolve ( TRYMODULE_PATH , 'repl_history' )
810
911if ( process . argv [ 2 ] === undefined ) {
1012 throw new Error ( 'You need to provide package name as first argument' )
@@ -66,6 +68,7 @@ Promise.all(promises_for_installation).then((packages) => {
6668 var replServer = repl . start ( {
6769 prompt : '> '
6870 } )
71+ replHistory ( replServer , TRYMODULE_HISTORY_PATH )
6972 replServer . context = Object . assign ( replServer . context , context_packages )
7073 }
7174} )
Original file line number Diff line number Diff line change 1414 "license" : " MIT" ,
1515 "dependencies" : {
1616 "colors" : " ^1.1.2" ,
17- "npmi" : " ^1.0.1"
17+ "npmi" : " ^1.0.1" ,
18+ "repl.history" : " ^0.1.3"
1819 },
1920 "devDependencies" : {
2021 "standard" : " ^6.0.8"
You can’t perform that action at this time.
0 commit comments