Correct whitespace errors in conversion scripts
This commit is contained in:
@@ -22,14 +22,14 @@ SOURCE_DIR="$1"; shift
|
||||
MOD_SLUG="$1"; shift
|
||||
MOD_VERSION="$1"; shift
|
||||
|
||||
mkdir -p "./data/$MOD_SLUG/versions/$MOD_VERSION"
|
||||
DATA_FILE="./data/$MOD_SLUG/versions/$MOD_VERSION/mod-version.cg"
|
||||
|
||||
if [[ "$SOURCE_DIR" == "" || "$MOD_SLUG" == "" || "$MOD_VERSION" == "" ]]; then
|
||||
echo "$USAGE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p "./data/$MOD_SLUG/versions/$MOD_VERSION"
|
||||
DATA_FILE="./data/$MOD_SLUG/versions/$MOD_VERSION/mod-version.cg"
|
||||
|
||||
if [[ ! -e "$DATA_FILE" ]]; then
|
||||
echo "schema: 1" > $DATA_FILE
|
||||
echo "" >> $DATA_FILE
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ try
|
||||
text = fs.readFileSync sourceFileName, 'UTF-8'
|
||||
parser = new ModVersionParser model:new ModVersion modSlug:'', version:''
|
||||
modVersion = parser.parse text
|
||||
text = parser.unparse(modVersion).trim().replace(/^\s\s*$/gm, '')
|
||||
text = parser.unparse(modVersion).trim().replace(/^\s\s*$/gm, '') + '\n\n'
|
||||
|
||||
if targetFileName is '-'
|
||||
console.log text
|
||||
|
||||
Reference in New Issue
Block a user