Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions scripts/gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ bash ./scripts/setup.sh
export PLAYGROUND="playground"
export HIGHLIGHTJS_RASCRIPT="${PLAYGROUND}/extra/highlightjs-rascript"

cp ${PLAYGROUND}/rascript.js src/languages

rm -rf dist
mkdir -p dist
cd ${PLAYGROUND}
Expand Down
2 changes: 2 additions & 0 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

export PLAYGROUND="playground"
export HIGHLIGHTJS_RASCRIPT="${PLAYGROUND}/extra/highlightjs-rascript"
export RASCRIPT_SYNTAX_VERSION="v0.2.0"

rm -rf ${PLAYGROUND}
mkdir -p ${PLAYGROUND}
git clone https://github.com/highlightjs/highlight.js ${PLAYGROUND}
wget -O ${PLAYGROUND}/rascript.js "https://github.com/joshraphael/rascript-syntax/releases/download/${RASCRIPT_SYNTAX_VERSION}/rascript.js"
mkdir -p ${HIGHLIGHTJS_RASCRIPT}
cp -r src ${HIGHLIGHTJS_RASCRIPT}
cp -r test ${HIGHLIGHTJS_RASCRIPT}
Expand Down
5 changes: 5 additions & 0 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ bash ./scripts/setup.sh
export PLAYGROUND="playground"
export HIGHLIGHTJS_RASCRIPT="${PLAYGROUND}/extra/highlightjs-rascript"

diff -q "src/languages/rascript.js" "${PLAYGROUND}/rascript.js"
if [ $? -ne 0 ]; then
exit 1
fi

cd ${PLAYGROUND}
node ./tools/build.js -t cdn
npm run build_and_test
Expand Down
1 change: 1 addition & 0 deletions src/languages/rascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Language: RAScript
Author: Joshua Raphael
Description: Syntax grammar for RAScript, a RetroAchievements.org DSL
Category: syntax
Version: v0.2.0
*/
export default function(hljs) {
return {
Expand Down