create-puck-app 0.12.0-canary.ac59e51 → 0.12.0-canary.b0d1620

Sign up to get free protection for your applications and to get access to all the features.
package/index.js CHANGED
@@ -103,7 +103,7 @@ program
103
103
  return;
104
104
  }
105
105
 
106
- await fs.mkdirSync(appName);
106
+ fs.mkdirSync(appName);
107
107
 
108
108
  const packageManager = !!options.useNpm
109
109
  ? "npm"
@@ -130,7 +130,7 @@ program
130
130
  let data;
131
131
 
132
132
  if (path.extname(filePath) === ".hbs") {
133
- const templateString = await fs.readFileSync(filePath, "utf-8");
133
+ const templateString = fs.readFileSync(filePath, "utf-8");
134
134
 
135
135
  const template = Handlebars.compile(templateString);
136
136
  data = template({
@@ -139,14 +139,14 @@ program
139
139
  puckVersion: `^${packageJson.version}`,
140
140
  });
141
141
  } else {
142
- data = await fs.readFileSync(filePath, "utf-8");
142
+ data = fs.readFileSync(filePath, "utf-8");
143
143
  }
144
144
 
145
145
  const dir = path.dirname(targetPath);
146
146
 
147
- await fs.mkdirSync(dir, { recursive: true });
147
+ fs.mkdirSync(dir, { recursive: true });
148
148
 
149
- await fs.writeFileSync(targetPath, data);
149
+ fs.writeFileSync(targetPath, data);
150
150
  }
151
151
 
152
152
  if (packageManager === "yarn") {
@@ -159,22 +159,24 @@ program
159
159
 
160
160
  try {
161
161
  inGitRepo =
162
- execSync("git status", {
163
- cwd: appPath,
164
- })
162
+ execSync("git status", { cwd: appPath })
165
163
  .toString()
166
164
  .indexOf("fatal:") !== 0;
167
165
  } catch {}
168
166
 
169
167
  // Only commit if this is a new repo
170
168
  if (!inGitRepo) {
171
- execSync("git init", { cwd: appPath, stdio: "inherit" });
169
+ try {
170
+ execSync("git init", { cwd: appPath, stdio: "inherit" });
172
171
 
173
- execSync("git add .", { cwd: appPath, stdio: "inherit" });
174
- execSync("git commit -m 'build(puck): generate app'", {
175
- cwd: appPath,
176
- stdio: "inherit",
177
- });
172
+ execSync("git add .", { cwd: appPath, stdio: "inherit" });
173
+ execSync('git commit -m "build(puck): generate app"', {
174
+ cwd: appPath,
175
+ stdio: "inherit",
176
+ });
177
+ } catch (error) {
178
+ console.log("Failed to commit git changes");
179
+ }
178
180
  }
179
181
  })
180
182
  .parse(process.argv);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-puck-app",
3
- "version": "0.12.0-canary.ac59e51",
3
+ "version": "0.12.0-canary.b0d1620",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,8 +1,8 @@
1
1
  # # Ignore everything
2
- # *.*
2
+ *.*
3
3
 
4
4
  # # Explicitly ignore gitignore without extension
5
- # gitignore
5
+ gitignore
6
6
 
7
7
  # # Except for handlebars files
8
- # !*.hbs
8
+ !*.hbs
@@ -1,4 +1,4 @@
1
- import "@measured/puck/dist/index.css";
1
+ import "@measured/puck/puck.css";
2
2
  import "./styles.css";
3
3
 
4
4
  export default function RootLayout({
@@ -1 +1 @@
1
- {"/":{"content":[{"type":"HeadingBlock","props":{"title":"Edit this page by adding /edit to the end of the URL","id":"HeadingBlock-1694032984497"}}],"root":{"title":""}}}
1
+ {"/":{"content":[{"type":"HeadingBlock","props":{"title":"Edit this page by adding /edit to the end of the URL","id":"HeadingBlock-1694032984497"}}],"root":{"props": {"title":""}}}}