Skip to content

Commit

Permalink
Merge pull request #2 from google/master
Browse files Browse the repository at this point in the history
sync
  • Loading branch information
PopGoesTheWza authored Jan 7, 2019
2 parents dac645f + 8385aa4 commit b14fc79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ This quickstart guide describes how to create a TypeScript project from scratch.
- `clasp -v`
1. Install TypeScript definitions for Apps Script in your project's folder.
- `npm i -S @types/google-apps-script`
- `npm i -S @types/node # may be useful for types like console.log`
1. Create a file called `jsconfig.json` to prevent non AS features:
```json
{
Expand Down
3 changes: 2 additions & 1 deletion src/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export async function getProjectFiles(rootDir: string = path.join('.', '/'), cal
.map((name, i) => {
// Replace OS specific path separator to common '/' char for console output
name = name.replace(/\\/g, '/');
const normalizedName = path.normalize(name);

let type = getAPIFileType(name);

Expand Down Expand Up @@ -119,7 +120,7 @@ export async function getProjectFiles(rootDir: string = path.join('.', '/'), cal
let isValidJSONIfJSON = true;
if (type === 'JSON') {
if (rootDir) {
isValidJSONIfJSON = name === path.join(rootDir, 'appsscript.json');
isValidJSONIfJSON = normalizedName === path.join(rootDir, 'appsscript.json');
} else {
isValidJSONIfJSON = name === 'appsscript.json';
}
Expand Down

0 comments on commit b14fc79

Please sign in to comment.