clasp icon indicating copy to clipboard operation
clasp copied to clipboard

Clasp not pushing html files

Open Haris-Jamil opened this issue 7 years ago • 6 comments

Please search existing issues before creating a new one.

DON'T DELETE THIS! FILL THESE SECTIONS OUT!

Expected Behavior

Should push both html and js files

Actual Behavior

Only pushing .js files to app scipt project

Steps to Reproduce the Problem

I have no idea how this issue came up, it was working fine and suddenly it starts pushing js files only.

Specifications

  • Node version (node -v): 10.15.0
  • Version (clasp -v): 2.2.0
  • OS (Mac/Linux/Windows): Windows 7

Haris-Jamil avatar Jul 04 '19 11:07 Haris-Jamil

This seems like an issue with the latest release 2.2.0, I just checked with 2.1.0 and it works fine

BilalAlam173 avatar Jul 04 '19 13:07 BilalAlam173

I went through the commits in 2.2.0 and found some changes that I believe are responsible for this behavior : image

So I suppose this behavior is an intentional change which they never mentioned in changelogs, However the readMe has been updated image

you need to provide .claspIgnore else clasp will only take js and ts by default

BilalAlam173 avatar Jul 04 '19 13:07 BilalAlam173

@Haris-Jamil @BilalAlam173 I take the blame on this one. PR issued. Now it is for @grant to review.

PopGoesTheWza avatar Jul 04 '19 16:07 PopGoesTheWza

This issue only impacts [email protected]

Until a new version is available, the workaround is to create an .claspignore file, alongside your .claps.json file, with the following content:

**/**
!appsscript.json
!*.js
!*.ts
!*.html

PopGoesTheWza avatar Jul 04 '19 17:07 PopGoesTheWza

I guess it's more common to keep all of your js/ts/html files in a directory, so the .claspignore should accomodate it:

**/**
!**/appsscript.json
!**/*.js
!**/*.ts
!**/*.html

Otherwise clasp push --watch sees changes but fails to push. I had to build clasp to debug this, because logging lacks. These empty if-returns are to blame: https://github.com/google/clasp/blob/master/src/commands/push.ts#L40:L50

zamber avatar Jul 08 '19 14:07 zamber

Sorry about the breaking publish of clasp. Try 2.2.1.

Note: This issue was automatically closed by #661.

grant avatar Jul 08 '19 16:07 grant