Skip to content

Instantly share code, notes, and snippets.

@wmakeev
Last active September 2, 2020 07:29
Show Gist options
  • Save wmakeev/3a77ddd2e78971cf038283d729ee2fe3 to your computer and use it in GitHub Desktop.
Save wmakeev/3a77ddd2e78971cf038283d729ee2fe3 to your computer and use it in GitHub Desktop.
[GAS typescript template] #gas #typescript #clasp #template
module.exports = $ => $.extendDeep($.getFile().asJson(), {
private: true,
scripts: {
build: 'tsc',
deploy: 'rm -rf ./dist/build && npm run build && clasp push'
},
devDependencies: {
'@types/google-apps-script': '^1.0.14',
'@types/node': '^14.0.5',
'@types/tape': '^4.13.0',
'prettier': '^2.0.5',
'tape': '^5.0.1',
'typescript': '^3.9.3'
}
})
{
"compilerOptions": {
"rootDir": "./src",
"outDir": "./dist/build",
"lib": [
"ESNext"
],
"module": "none",
"target": "ES2019",
"types": [
"google-apps-script"
],
"strict": true,
"strictFunctionTypes": true,
"downlevelIteration": true,
"experimentalDecorators": true,
"noEmitOnError": true,
"noErrorTruncation": true,
"noFallthroughCasesInSwitch": true,
"noImplicitThis": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"newLine": "lf",
"pretty": true
},
"include": [
"src"
]
}
[submodule "gas-moysklad"]
path = libs/Moysklad
url = [email protected]:wmakeev/gas-moysklad.git
%$.getFile().asText({ trimLf: true })% # TODO trimLf?
# external libs modules
/libs

Create

Create project and attach to parent document

clasp create --parentId "%GAS_PARENT_ID%" --title "%GAS_APP_TITLE%" --rootDir ./dist

Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment