Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option for target path #17

Open
ghost opened this issue Aug 4, 2016 · 3 comments
Open

Option for target path #17

ghost opened this issue Aug 4, 2016 · 3 comments

Comments

@ghost
Copy link

ghost commented Aug 4, 2016

My project grew pretty big and so I decided to move all .json files into a /configs folder, so that the root directory of the project is not so overcrowded. I managed to get this to work for everything, except for typings. I then tried this gulp plugin to be able to load the typings.json from /configs/typings.json. This works quite good so far, except for the typings folder being created inside /configs and not on the root (/typings). I then tried to pipe the stream once again with gulp.dest('.') as param but this does not work. I get an error message stating "something went wrong: Check if path is correct: /<absolute-path-to-my-project>/configs/typings.json". Well, the path is correct. And by the way, a copy of /configs/typings.json gets created in /typings.json.

So here's a wrap-up:

gulp.src("./configs/typings.json")
    .pipe(typings())

In /gulpfile.ts works, but creates the typings folder in /configs and not in /. Adding dest like this:

gulp.src("./configs/typings.json")
    .pipe(typings())
    .pipe(gulp.dest('.'))

Throws an error: "something went wrong: Check if path is correct: /<absolute-path-to-my-project>/configs/typings.json", the typings file does exist and is valid. This creates a copy of /configs/typings.json in /typings.json.

So heres my question/feature-request:

Is it possible (to add a feature) to pipe the typings stuff to a destination folder of my choice?

Edit: Okay I now see that dest just can't work, but it would be nice to add some options to operate the plugin somehow like this:

gulp.src('path/to/typings.json')
    .pipe(typings({dest: 'path/to/dest'})
@philkunz
Copy link
Collaborator

philkunz commented Aug 5, 2016

I'll see if there is some time next week to look into this. As a quick solution you can always move things in place yourself. Take a look at shelljs or fs-extra for that matter.

@ghost
Copy link
Author

ghost commented Aug 5, 2016

Thank you very much, I'll try that aswell for now :)

@christo8989
Copy link

I'm trying to do the same thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants