Skip to content

Commit 201e5f4

Browse files
committed
Add Yarn package manager and dependencies
- Created package.json to include @google/gemini-cli as a dependency. - Added shell script (yarn) for Unix-like systems to execute Yarn commands. - Added Windows batch script (yarn.cmd) for executing Yarn commands on Windows. - Added PowerShell script (yarn.ps1) for executing Yarn commands in PowerShell. - Created yarnpkg scripts for Yarn package manager compatibility.
1 parent eb08a34 commit 201e5f4

File tree

19 files changed

+13248
-1
lines changed

19 files changed

+13248
-1
lines changed

doc/source/user_guide/io.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,9 @@ skiprows : list-like or integer, default ``None``
193193

194194
.. ipython:: python
195195
196+
import pandas as pd
197+
from io import StringIO
198+
196199
data = "col1,col2,col3\na,b,1\na,b,2\nc,d,3"
197200
pd.read_csv(StringIO(data))
198201
pd.read_csv(StringIO(data), skiprows=lambda x: x % 2 != 0)
@@ -2761,7 +2764,8 @@ Read an XML string:
27612764
.. ipython:: python
27622765
27632766
from io import StringIO
2764-
xml = """<?xml version="1.0" encoding="UTF-8"?>
2767+
2768+
xml = """<?xml version="1.0" encoding="UTF-8"?>
27652769
<bookstore>
27662770
<book category="cooking">
27672771
<title lang="en">Everyday Italian</title>

npm/gemini

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/sh
2+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3+
4+
case `uname` in
5+
*CYGWIN*|*MINGW*|*MSYS*)
6+
if command -v cygpath > /dev/null 2>&1; then
7+
basedir=`cygpath -w "$basedir"`
8+
fi
9+
;;
10+
esac
11+
12+
if [ -x "$basedir/node" ]; then
13+
exec "$basedir/node" "$basedir/node_modules/@google/gemini-cli/dist/index.js" "$@"
14+
else
15+
exec node "$basedir/node_modules/@google/gemini-cli/dist/index.js" "$@"
16+
fi

npm/gemini.cmd

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
@ECHO off
2+
GOTO start
3+
:find_dp0
4+
SET dp0=%~dp0
5+
EXIT /b
6+
:start
7+
SETLOCAL
8+
CALL :find_dp0
9+
10+
IF EXIST "%dp0%\node.exe" (
11+
SET "_prog=%dp0%\node.exe"
12+
) ELSE (
13+
SET "_prog=node"
14+
SET PATHEXT=%PATHEXT:;.JS;=;%
15+
)
16+
17+
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\node_modules\@google\gemini-cli\dist\index.js" %*

npm/gemini.ps1

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env pwsh
2+
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
3+
4+
$exe=""
5+
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
6+
# Fix case when both the Windows and Linux builds of Node
7+
# are installed in the same directory
8+
$exe=".exe"
9+
}
10+
$ret=0
11+
if (Test-Path "$basedir/node$exe") {
12+
# Support pipeline input
13+
if ($MyInvocation.ExpectingInput) {
14+
$input | & "$basedir/node$exe" "$basedir/node_modules/@google/gemini-cli/dist/index.js" $args
15+
} else {
16+
& "$basedir/node$exe" "$basedir/node_modules/@google/gemini-cli/dist/index.js" $args
17+
}
18+
$ret=$LASTEXITCODE
19+
} else {
20+
# Support pipeline input
21+
if ($MyInvocation.ExpectingInput) {
22+
$input | & "node$exe" "$basedir/node_modules/@google/gemini-cli/dist/index.js" $args
23+
} else {
24+
& "node$exe" "$basedir/node_modules/@google/gemini-cli/dist/index.js" $args
25+
}
26+
$ret=$LASTEXITCODE
27+
}
28+
exit $ret

npm/node_modules/.bin/gemini

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

npm/node_modules/.bin/gemini.cmd

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

npm/node_modules/.bin/gemini.ps1

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)