Parameter | Default | Description |
---|---|---|
GAS_PARENT_ID | Parent document Id | |
GAS_APP_TITLE | PROJECT_NAME | Script project title |
Last active
September 2, 2020 07:29
-
-
Save wmakeev/3a77ddd2e78971cf038283d729ee2fe3 to your computer and use it in GitHub Desktop.
[GAS typescript template] #gas #typescript #clasp #template
This file contains hidden or 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 hidden or 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
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' | |
} | |
}) |
This file contains hidden or 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
{ | |
"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" | |
] | |
} |
This file contains hidden or 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
[submodule "gas-moysklad"] | |
path = libs/Moysklad | |
url = [email protected]:wmakeev/gas-moysklad.git |
This file contains hidden or 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
%$.getFile().asText({ trimLf: true })% # TODO trimLf? | |
# external libs modules | |
/libs |
Create project and attach to parent document
clasp create --parentId "%GAS_PARENT_ID%" --title "%GAS_APP_TITLE%" --rootDir ./dist
This file contains hidden or 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
// code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment