Skip to content

Commit

Permalink
Solved bug with relative paths
Browse files Browse the repository at this point in the history
  • Loading branch information
jaumesegarra committed Apr 3, 2019
1 parent dc238d4 commit 6b59bd6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Steps:
- Put this in your "scripts" section of the package.json:

```json
"g": "node ./node_modules/xtuff/index.js g"
"g": "xtuff g"
```
- Create your custom stuff inside the new `_templates_` folder that you should be have.
- Run (for example) `npm run g component helloComponent`
Expand Down
2 changes: 1 addition & 1 deletion generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ module.exports = (generatorName, stuffPath) => {
if (fs.existsSync(generatorTemplateFolder)) {

const stuffName = getStuffName(stuffPath);
if(stuffPath[0] !== '/') stuffPath = path.join(process.cwd(), stuffPath);
if(stuffPath[0] !== '/') stuffPath = path.join(process.env.INIT_CWD, stuffPath);

createTempFolder().then(cacheFolderPath => {
copyResourcesToTempFolder(stuffName, generatorTemplateFolder, cacheFolderPath).then(() => {
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": "xtuff",
"version": "1.0.3",
"version": "1.0.5",
"description": "A dev command to create stuffs easy! (components, services, etc...)",
"keywords": "command, generator, component, service, react, stuff, files",
"repository": "https://github.com/jaumesegarra/xtuff",
Expand Down

0 comments on commit 6b59bd6

Please sign in to comment.