atomsystem 0.1.43 → 0.1.45

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.
Files changed (2) hide show
  1. package/dist/index.js +17 -4
  2. package/package.json +2 -1
package/dist/index.js CHANGED
@@ -41,7 +41,9 @@ var logger = {
41
41
  };
42
42
 
43
43
  // src/commands/add.ts
44
- var templateDir = path2.join(process.cwd(), "app", "templates");
44
+ var isBuilt = path2.basename(__dirname) === "dist" || fs.existsSync(path2.join(__dirname, "index.js"));
45
+ var baseDir = isBuilt ? path2.join(__dirname, "..") : path2.join(__dirname, "..", "..");
46
+ var templateDir = path2.join(baseDir, "app", "templates");
45
47
  var components = [
46
48
  "Button",
47
49
  "Badge",
@@ -217,6 +219,15 @@ var init = new Command2().name("init").description("\uD504\uB85C\uC81D\uD2B8\uB9
217
219
  logger.error(err);
218
220
  return;
219
221
  }
222
+ const gsSpinner = ora("gsap Animation \uC124\uCE58 \uC911...").start();
223
+ try {
224
+ await execPromise("npm install gsap", { cwd: projectRoot });
225
+ gsSpinner.succeed("gsap Animation \uC124\uCE58 \uC644\uB8CC!");
226
+ } catch (err) {
227
+ gsSpinner.fail("gsap Animation \uC124\uCE58 \uC911 \uC624\uB958 \uBC1C\uC0DD");
228
+ logger.error(err);
229
+ return;
230
+ }
220
231
  try {
221
232
  const packageJson = JSON.parse(fs2.readFileSync(packageJsonPath, "utf8"));
222
233
  packageJson.type = "module";
@@ -356,9 +367,11 @@ export default config;`
356
367
  }
357
368
  }
358
369
  }
359
- const tokenFile = path3.join(__dirname, "..", "..", "tokens", "tokens.json");
360
- const buildFile = path3.join(__dirname, "..", "..", "build", "build-tokens.js");
361
- const textCssFile = path3.join(__dirname, "..", "..", "css", "text.css");
370
+ const isBuilt2 = path3.basename(__dirname) === "dist" || fs2.existsSync(path3.join(__dirname, "index.js"));
371
+ const baseDir2 = isBuilt2 ? path3.join(__dirname, "..") : path3.join(__dirname, "..", "..");
372
+ const tokenFile = path3.join(baseDir2, "tokens", "tokens.json");
373
+ const buildFile = path3.join(baseDir2, "build", "build-tokens.js");
374
+ const textCssFile = path3.join(baseDir2, "css", "text.css");
362
375
  copyFile(tokenFile, path3.join(projectRoot, "tokens", "tokens.json"));
363
376
  copyFile(buildFile, path3.join(projectRoot, "build", "build-tokens.js"));
364
377
  copyFile(textCssFile, path3.join(projectRoot, "css", "text.css"));
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "atomsystem",
3
- "version": "0.1.43",
3
+ "version": "0.1.45",
4
4
  "type": "module",
5
5
  "homepage": "https://system.atomground.com",
6
6
  "bin": {
7
7
  "atomsystem": "dist/index.js"
8
8
  },
9
9
  "files": [
10
+ "dist",
10
11
  "tokens",
11
12
  "tailwind.config.ts",
12
13
  "build",