-
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
Showing
13 changed files
with
193 additions
and
118 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 |
---|---|---|
@@ -1 +1 @@ | ||
{"scriptId":"1z3zhO0nbuORRJg_f96axDu7wKbiqfk0H4t3jGcNxWebiDuled3DNjNxo","rootDir":"/Users/aspann/Documents/Development/google/javascript/BerlitzSchedule/code"} | ||
{"scriptId":"1z3zhO0nbuORRJg_f96axDu7wKbiqfk0H4t3jGcNxWebiDuled3DNjNxo","rootDir":"/Users/aspann/Documents/Development/google/javascript/BerlitzSchedule/dist"} |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
code/configuration.js | ||
code/.clasp.json | ||
node_modules/** | ||
dist/** |
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,3 @@ | ||
!dist2/*.js | ||
!dist/*.js | ||
**/** |
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,34 @@ | ||
#!/usr/bin/env bash | ||
|
||
BASEDIR=$(pwd) | ||
SOURCE=$BASEDIR/code | ||
DEST=$BASEDIR/dist | ||
|
||
APPSCRIPT='appsscript.json' | ||
|
||
# Make dir if it does not exist. | ||
mkdir -p ${DEST} | ||
|
||
# Clear Distribution Directly for update | ||
echo "Clearing ${DEST}..." | ||
rm -v ${DEST}/* | ||
echo "Done." | ||
|
||
# Copy AppsScript JSON file | ||
cp ${BASEDIR}/${APPSCRIPT} ${DEST} | ||
|
||
for FULL_PATH_NAME in $(ls ${SOURCE}/*.js); do | ||
FILE=$(basename ${FULL_PATH_NAME}) | ||
egrep -v '(^i|^\/* eslint-disable)' ${FULL_PATH_NAME} | | ||
while read mLine; do | ||
echo ${mLine} >>${DEST}/${FILE} | ||
done | ||
|
||
# There is an issue with this script. Its adding /Applications/ and other folders. This ia temp fix | ||
sed '/^\/Application/d' ${DEST}/${FILE} >/tmp/temp.txt && mv /tmp/temp.txt ${DEST}/${FILE} | ||
# Report exports at the end of the file This is used as these may span multiple lines | ||
sed '/^export {/,/};/d' ${DEST}/${FILE} >/tmp/temp.txt && mv /tmp/temp.txt ${DEST}/${FILE} | ||
done | ||
|
||
# Fix code formatting after striping import and export statements | ||
npx prettier ${DEST} --write |
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
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
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
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
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
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
Oops, something went wrong.