@ciderjs/gasbombe 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.cjs CHANGED
@@ -11,7 +11,7 @@ require('consola');
11
11
  require('ejs');
12
12
  require('glob');
13
13
 
14
- const version = "0.3.1";
14
+ const version = "0.3.2";
15
15
 
16
16
  async function main() {
17
17
  const program = new commander.Command();
@@ -26,7 +26,7 @@ async function main() {
26
26
  ""
27
27
  ).option(
28
28
  "-t, --template [templateType]",
29
- 'Project template label ("vanilla-ts" | "vanilla-js" | "react-tsx")',
29
+ 'Project template label ("server-ts" | "server-js" | "react" | "react-ciderjs" | "vue" | "vue-ciderjs" | "html-js")',
30
30
  ""
31
31
  ).option(
32
32
  "-c, --clasp [claspSetupCommand]",
@@ -152,14 +152,27 @@ async function main() {
152
152
  if (packageManager === "" && clasp !== "create" && clasp !== "list" && skipInstall) {
153
153
  packageManager = "npm";
154
154
  }
155
- packageManager ||= await prompts.select({
156
- message: "Choice package manager what you want to use...",
157
- choices: [
158
- { name: "npm", value: "npm" },
159
- { name: "pnpm", value: "pnpm" },
160
- { name: "yarn", value: "yarn" }
161
- ]
162
- });
155
+ if (packageManager == null || packageManager === "") {
156
+ const selected = await prompts.select({
157
+ message: "Choice package manager what you want to use...",
158
+ choices: [
159
+ { name: "npm", value: "npm" },
160
+ { name: "pnpm", value: "pnpm" },
161
+ { name: "yarn", value: "yarn" },
162
+ {
163
+ name: "skip",
164
+ value: null,
165
+ description: "Skip installation for now"
166
+ }
167
+ ]
168
+ });
169
+ if (selected === null) {
170
+ skipInstall = true;
171
+ packageManager = "npm";
172
+ } else {
173
+ packageManager = selected;
174
+ }
175
+ }
163
176
  const packageManagers = ["npm", "pnpm", "yarn"];
164
177
  if (!packageManagers.includes(packageManager)) {
165
178
  throw Error("Invalid package manager");
package/dist/cli.mjs CHANGED
@@ -9,7 +9,7 @@ import 'consola';
9
9
  import 'ejs';
10
10
  import 'glob';
11
11
 
12
- const version = "0.3.1";
12
+ const version = "0.3.2";
13
13
 
14
14
  async function main() {
15
15
  const program = new Command();
@@ -24,7 +24,7 @@ async function main() {
24
24
  ""
25
25
  ).option(
26
26
  "-t, --template [templateType]",
27
- 'Project template label ("vanilla-ts" | "vanilla-js" | "react-tsx")',
27
+ 'Project template label ("server-ts" | "server-js" | "react" | "react-ciderjs" | "vue" | "vue-ciderjs" | "html-js")',
28
28
  ""
29
29
  ).option(
30
30
  "-c, --clasp [claspSetupCommand]",
@@ -150,14 +150,27 @@ async function main() {
150
150
  if (packageManager === "" && clasp !== "create" && clasp !== "list" && skipInstall) {
151
151
  packageManager = "npm";
152
152
  }
153
- packageManager ||= await select({
154
- message: "Choice package manager what you want to use...",
155
- choices: [
156
- { name: "npm", value: "npm" },
157
- { name: "pnpm", value: "pnpm" },
158
- { name: "yarn", value: "yarn" }
159
- ]
160
- });
153
+ if (packageManager == null || packageManager === "") {
154
+ const selected = await select({
155
+ message: "Choice package manager what you want to use...",
156
+ choices: [
157
+ { name: "npm", value: "npm" },
158
+ { name: "pnpm", value: "pnpm" },
159
+ { name: "yarn", value: "yarn" },
160
+ {
161
+ name: "skip",
162
+ value: null,
163
+ description: "Skip installation for now"
164
+ }
165
+ ]
166
+ });
167
+ if (selected === null) {
168
+ skipInstall = true;
169
+ packageManager = "npm";
170
+ } else {
171
+ packageManager = selected;
172
+ }
173
+ }
161
174
  const packageManagers = ["npm", "pnpm", "yarn"];
162
175
  if (!packageManagers.includes(packageManager)) {
163
176
  throw Error("Invalid package manager");
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/clasp.json",
3
+ "scriptId": "{{ input your script id of apps-script }}",
4
+ "rootDir": "dist"
5
+ }
@@ -0,0 +1 @@
1
+ GAS_DEPLOYMENT_ID=input your deployment id
@@ -0,0 +1 @@
1
+ # Starter template for Google Apps Script webapp
@@ -6,7 +6,7 @@
6
6
  "scripts": {
7
7
  "dev": "vite",
8
8
  "build:server": "rolldown -c && cpy server/*.json dist/",
9
- "build:front": "tsc -b && vite build",
9
+ "build:front": "vite build",
10
10
  "build": "rimraf dist && pnpm run build:front && pnpm run build:server",
11
11
  "check": "biome check --write",
12
12
  "test": "vitest run --coverage",
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/clasp.json",
3
+ "scriptId": "{{ input your script id of apps-script }}",
4
+ "rootDir": "dist"
5
+ }
@@ -0,0 +1,45 @@
1
+ name: Publish to GoogleAppsScript
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*' # Trigger on tags like v1.0.0, v0.1.2, etc.
7
+ workflow_dispatch: # Trigger manually
8
+
9
+ jobs:
10
+ build-and-publish:
11
+ runs-on: ubuntu-latest
12
+ permissions:
13
+ contents: read
14
+
15
+ steps:
16
+ - name: Checkout repository
17
+ uses: actions/checkout@v4
18
+
19
+ - name: Setup Node.js
20
+ uses: actions/setup-node@v4
21
+ with:
22
+ node-version: '20.x'
23
+ registry-url: 'https://registry.npmjs.org'
24
+
25
+ - name: Install pnpm
26
+ uses: pnpm/action-setup@v4
27
+ with:
28
+ version: 10
29
+
30
+ - name: Install dependencies
31
+ run: pnpm install
32
+
33
+ - name: Prebuild
34
+ run: pnpm run check && pnpm run test
35
+
36
+ - name: Build package
37
+ run: pnpm run build
38
+
39
+ - name: Restore clasp credentials
40
+ uses: ciderjs/clasp-auth@v0.1.3
41
+ with:
42
+ json: {{ secrets.CLASPRC_JSON }}
43
+
44
+ - name: Publish to AppsScript
45
+ run: pnpm run push
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ciderjs/gasbombe",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "A TypeScript Project Generator for GoogleAppsScript, available as CLI",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",