Using modern JavaScript and CI tooling for Google Apps Scripts
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
#!/bin/bash | |
npm run build | |
gas deploy -s ./conf/$CLIENT_SECRETS -c ./conf/$OAUTH_CREDENTIALS -b ./build -f $GAS_FILE_ID |
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
{ | |
"name": "sprintly-spreadsheet", | |
"version": "0.0.1", | |
"description": "A Google Apps Add-on for Google Docs Spreadsheets that loads items from the API into a sheet.", | |
"main": "src/index.js", | |
"scripts": { | |
"test": "./node_modules/mocha/bin/mocha $(find src/* -path *test* -name \\*.js -type f)", | |
"build": "rm -fr ./build && mkdir ./build && ./node_modules/browserify/bin/cmd.js ./src/index.js -o ./build/Code.gs && cp ./html/*.html ./build", | |
"lint": "./node_modules/eslint/bin/eslint.js src/" | |
}, | |
"repository": { | |
"type": "git", | |
"url": "https://github.com/sprintly/sprintly-spreadsheet.git" | |
}, | |
"author": "Joe Stump <joe@stu.mp>", | |
"license": "NA", | |
"bugs": { | |
"url": "https://github.com/sprintly/sprintly-spreadsheet/issues" | |
}, | |
"homepage": "https://github.com/sprintly/sprintly-spreadsheet", | |
"dependencies": { | |
"gas-manager": "^0.4.3", | |
"jquery": "^2.1.3", | |
"lodash": "^3.4.0" | |
}, | |
"devDependencies": { | |
"browserify": "^9.0.3", | |
"chai": "^2.1.1", | |
"eslint": "^0.16.2", | |
"mocha": "^2.2.1" | |
} | |
} |
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
#!/bin/bash | |
npm run lint && npm run test |
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
language: node_js | |
node_js: | |
- "0.11" | |
before_install: | |
- sudo apt-get update -qq | |
- sudo apt-get install -y python-virtualenv python-pip | |
- virtualenv . | |
- . ./bin/activate | |
- pip install -r ./requirements.txt | |
script: | |
- "/bin/bash ./ci/test.sh" | |
- "/bin/bash ./ci/deploy.sh" | |
env: | |
global: | |
- CLIENT_SECRETS="client_secret_XXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.apps.googleusercontent.com.json" | |
- OAUTH_CREDENTIALS="credentials_production.json" | |
- GAS_FILE_ID="YYYYYYYYY_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment