Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serve locally for testing #78

Closed
ghost opened this issue Mar 29, 2018 · 3 comments
Closed

Serve locally for testing #78

ghost opened this issue Mar 29, 2018 · 3 comments

Comments

@ghost
Copy link

ghost commented Mar 29, 2018

Expected Behavior

I expect there to be an option to serve the script locally for easier testing.

Actual Behavior

There is no clasp command-line option to serve the Google Apps Script locally.

Specifications

  • Node version (node -v): v9.8.0
  • Version (npm list | grep clasp):
➜  ~ npm list | grep clasp
➜  ~ which clasp
/usr/local/bin/clasp
  • OS (Mac/Linux/Windows): Mac
@grant
Copy link
Contributor

grant commented Mar 29, 2018

Are you looking to run functions locally?
That's almost impossible since Apps Script binds to Google Services like Gmail, Slides, etc.

@sqrrrl
Copy link
Member

sqrrrl commented Mar 29, 2018

Probably best tackled outside clasp. Really this is asking for a local apps script runtime. It's (mostly) feasible but a very large project to create an emulator that can be run locally.

I do find https://www.npmjs.com/package/gas-local to be useful in tests. Still have to mock out whatever services you use, but at least gives you loading and module (err, lack of) behavior similar to apps script.

@grant
Copy link
Contributor

grant commented Mar 30, 2018

Going to close this in favor of #11.

@grant grant closed this as completed Mar 30, 2018
kant added a commit to kant/clasp that referenced this issue Jun 4, 2018
Plus minor fixes (proposals)
grant pushed a commit that referenced this issue Jun 12, 2018
- [x] `npm run test` succeeds.
- [x] `npm run lint` succeeds.
- [x] Appropriate changes to README are included in PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants