Skip to content

Commit

Permalink
fix: modifies init to use absolute paths (#98)
Browse files Browse the repository at this point in the history
* fix: modifies init to use absolute paths

* version number

* fix: readme for init

* fix: readme for clone
  • Loading branch information
elliotBraem authored May 15, 2024
1 parent 849ae0b commit 897eb6d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ To begin, either:
* Use the init command for an empty workspace:

```cmd
npx bos-workspace init [configAccount]
npx bos-workspace init
```

* Clone widgets from an existing [account](https://near.social/mob.near/widget/Everyone):

```cmd
npx bos-workspace clone [accountId] [dest]
npx bos-workspace dev [dest | accountId]
```

* Or install `bos-workspace` within an existing project:
Expand Down
8 changes: 4 additions & 4 deletions lib/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ export async function initProject(pwd: string, template: string) {
const dir = res.dir || path.join(pwd, slug);
const templateDir = path.join(__dirname, '..', '..', 'templates')
try {
await mvdir(path.join(templateDir, codebase), dir, { copy: true });
await mvdir(path.join(dir, "_gitignore"), path.join(dir, ".gitignore"));
await mvdir(path.resolve(templateDir, codebase), path.resolve(dir), { copy: true });
await mvdir(path.resolve(dir, "_gitignore"), path.resolve(dir, ".gitignore"));

await mvdir(path.join(dir, "_github"), path.join(dir, ".github"));
await mvdir(path.resolve(dir, "_github"), path.resolve(dir, ".github"));

const prefixPath = (p) => path.join(dir, p);
const prefixPath = (p) => path.resolve(dir, p);

// await mvdir(
// path.join(dir, "/%ACCOUNT_ID%"),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bos-workspace",
"version": "1.0.0-alpha.18",
"version": "1.0.0-alpha.19",
"description": "",
"bin": {
"bos-workspace": "./bin/bw.js",
Expand Down

0 comments on commit 897eb6d

Please sign in to comment.