forked from thesayyn/protoc-gen-ts
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
e99f990
commit b6aa52d
Showing
1 changed file
with
14 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,14 @@ | ||
@echo off | ||
|
||
@REM check if package is installed locally. | ||
for /f %%i in ('npm root') do set install_path=%%i | ||
|
||
@REM if not installed locally, set install path to global one | ||
setlocal enabledelayedexpansion | ||
if not exist !install_path!\protoc-gen-ts\ ( | ||
for /f %%i in ('npm root -g') do set install_path=%%i | ||
) | ||
endlocal & set install_path=%install_path% | ||
|
||
@REM invoke the index.js | ||
node %install_path%\protoc-gen-ts\src\index |