montagejs / minit

Tool: Helps you build Montage applications by generating template applications and components for you.
Other
8 stars 22 forks source link

Running minit in a directory under the package has weirdness #34

Closed Stuk closed 11 years ago

Stuk commented 11 years ago

If I run minit create:component --name hello --destination ./ui/ in a directory underneath a package.json then a duplicate directory structure to the location of my package.json is created in the current directory.

tmp$ pwd
/tmp
tmp$ mkdir test
tmp$ cd test/
test$ npm init
# ...
test$ mkdir -p a/b
test$ ls
a/            package.json
test$ cd a/b/
b$ minit create:component --name hello --destination ./ui

/Users/stuart/Documents/montagejs/minit/node_modules/q/q.js:1327
                throw error;
                      ^
Error: ENOENT, rename '/var/folders/3j/c5plsfss7c965m4lmqvb08_c0000gn/T/build/component/hello.reel'
From previous event:
    at exports.move (/Users/stuart/Documents/montagejs/minit/node_modules/q-io/fs.js:114:18)
b$ ls
tmp/ # <<<<<<<<<<<<<<<< ?!!
b$ cd tmp/test/ui/
ui$ pwd
/tmp/test/a/b/private/tmp/test/ui
ui$ ls

If I do this in a non-tmp directory then the component gets created next to the package.json

Stuk commented 11 years ago

This is my bad, I broke this in Q-IO