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

Clasp create add-on templates #76

Closed
grant opened this issue Mar 23, 2018 · 6 comments
Closed

Clasp create add-on templates #76

grant opened this issue Mar 23, 2018 · 6 comments

Comments

@grant
Copy link
Contributor

grant commented Mar 23, 2018

Create Apps Script projects with templates

Clasp should make it easy to use our Apps Script templates.
What if you could select a template when creating a clasp project?

Expected Behavior

clasp create lists template options in which you can choose from different templates, i.e.

image

Actual Behavior

clasp create creates an empty Apps Script project. Not super useful.

Thoughts @erickoledadevrel?

@erickoledadevrel
Copy link
Contributor

It's an improvement, but I don't think that the templates provided in the UI are the most useful to the command-line audience. I'd rather see work towards developing templates specifically for the professional that are likely to use clasp. Perhaps a Yeoman generator?

@grant
Copy link
Contributor Author

grant commented Mar 27, 2018

What properties of a template do you think would be useful? I don't fully understand your comment. Do you want a new set of templates for professional developers? What's an example?


I don't think yeoman (or similarly bower/grunt) is a great choice for Apps Script templates. Developers use yeoman anymore, it was popular 3-4 years ago but is not active anymore.

Besides Yeoman, more modern setup CLIs (webpack-cli, create-react-app) are also not appropriate for Apps Script.

@erickoledadevrel
Copy link
Contributor

The templates in the UI are focussed around use cases (docs add-ons, sheets add-on, etc). I'm more interested in templates around tool chains. For example, I'd love a template project that already has a way to bundle JavaScript libraries from NPM into the HTML files that Apps Script supports.

@grant
Copy link
Contributor Author

grant commented Mar 27, 2018

Noted. We'll have to create a list of toolchains that we'd like to inter-op with. As with this original issue, it seems like you'd be more interested in a generic solution than a specialize set of templates.

In the npm ecosystem, given toolchains change every year, it's generally good practice to make lightweight, generic package that can hook into anything. Maybe just better inter-op with npm would be a good first step.

@JeanRemiDelteil
Copy link
Contributor

@grant We use internally this template (gas-shell) as a start-up project for all our add-on and even small script project that we want to develop locally (eg: using CLASP and an editor like Webstorm).

We basically duplicate it when starting a new script, and delete all parts that are not used.
This template project evolves to meet our new requirement from time to time, like when we switch from gapps to claps.
Maybe using clasp create could duplicate a git project ?

Just to give some context, we have some add-ons in the Google Doc ecosystem that are using this shell (YAMM, Form-Publisher, Geocode, FilesCabinet (and all other add-on for Awesome-Table)

@grant
Copy link
Contributor Author

grant commented Apr 12, 2018

Thanks for the discussion @erickoledadevrel @JeanRemiDelteil. There are a lot of ideas here.

Seems like simply using git would be more flexible than anything additional in clasp. Closing this one.

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

No branches or pull requests

3 participants