google / aside

πŸš€ Apps Script development with formatting, linting, testing and more!
Apache License 2.0
328 stars 5 forks source link

I would like to see functionality added to allow HTML development and deployment. #17

Closed YukiFujisawa closed 1 year ago

YukiFujisawa commented 1 year ago

Feature Requests

To be able to develop HTML/CSS with VSCode and ASIDE.

Benefits

VSCode's HTML/CSS development will be supported by Github Copilot, etc.

Note

If there is a way to achieve this in the current situation, we would appreciate it if you could let us know.

paranerd commented 1 year ago

I'm not sure I fully understand your request. Could you please elaborate?

YukiFujisawa commented 1 year ago

@paranerd Thank you for your reply.

For example, I would like to develop the following "Serve HTML as a web app" with ASIDE.

https://developers.google.com/apps-script/guides/html?hl=ja#index.html

I'm happy that if I put test.html in src, it will be output to dist and I can deploy it to GAS.

γ‚Ήγ‚―γƒͺγƒΌγƒ³γ‚·γƒ§γƒƒγƒˆ 2023-07-18 7 05 55

echom commented 1 year ago

@YukiFujisawa I am currently working on a AppsScript webapp based on ASIDE. The base project generated by ASIDE needs a couple of modifications but it's generally feasible. I'll set up a feature branch soon with my ideas.

paranerd commented 1 year ago

In the meantime, if you just want to have the *.html uploaded (to deploy manually after), you could just edit your package.json scripts like this:

"scripts": {
    ...
    "build": "npm run clean && npm run bundle && npm run copy-static",
    "copy-static": "mkdirp dist/static && ncp src/static/ dist/static"
}
YukiFujisawa commented 1 year ago

@paranerd Thank you for the very useful advice! I will try the above method as soon as possible.

YukiFujisawa commented 1 year ago

@paranerd I am happy to report that I was able to deploy successfully with this fix.

diff --git a/package.json b/package.json
index 67d80eb..ebabdf0 100644
--- a/package.json
+++ b/package.json
@@ -9,7 +9,8 @@
     "clean": "rimraf build dist",
     "lint": "npm run license && eslint --fix --no-error-on-unmatched-pattern src/ test/",
     "bundle": "rollup --no-treeshake -c rollup.config.mjs",
-    "build": "npm run clean && npm run bundle && ncp appsscript.json dist/appsscript.json",
+    "build": "npm run clean && npm run bundle && ncp appsscript.json dist/appsscript.json && npm run copy-static",
+    "copy-static": "mkdirp dist/static && ncp src/static/ dist/static",
     "license": "license-check-and-add add -f license-config.json",
     "test": "jest test/ --passWithNoTests --detectOpenHandles",
paranerd commented 1 year ago

Nice, happy to hear!