Skip to content

Instantly share code, notes, and snippets.

@dmajda
Created July 14, 2016 07:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmajda/b4269dae6829ec12835a32737e8b2bfb to your computer and use it in GitHub Desktop.
Save dmajda/b4269dae6829ec12835a32737e8b2bfb to your computer and use it in GitHub Desktop.
#!/bin/sh
# Script to reproduce https://github.com/pegjs/pegjs/issues/434.
#
# Copy into an empty directory and run:
#
# $ sh 434.sh
mkdir src
mkdir lib
echo 'start = "a"' > src/parser.pegjs
cat > package.json <<EOT
{
"private": true,
"scripts": {
"generator": "pegjs --output lib/parser.js src/parser.pegjs"
},
"dependencies": {
"pegjs": "pegjs/pegjs"
},
"engines": {
"node": ">= 4.0.0"
}
}
EOT
npm install
npm run generator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment