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

how to use it in gulp ??? #77

Open
insetCoad opened this issue Jul 31, 2016 · 3 comments
Open

how to use it in gulp ??? #77

insetCoad opened this issue Jul 31, 2016 · 3 comments
Labels

Comments

@insetCoad
Copy link

hay guys do u have any gulp plugin or working on that or something . or their is some way to use it with gulp ??

@mendrik
Copy link

mendrik commented Aug 31, 2016

gulp.task('definitions', function(done) {
    var exec = require('child_process').exec;
    var cmd = 'node ./node_modules/dts-generator/bin/dts-generator --name myproject --baseDir src/typescript --project ./ --out typings/myproject/myproject.d.ts';
    exec(cmd, function(error, stdout, stderr){
        console.log(stdout);
        console.log(stderr);
        done();
    });
});```

provided you have dts-generator as a local dependency. if you have installed it globally just use dts-generator instead of node ./...

@dmitry-kurmanov
Copy link

Or we can require it dts_gen = require('dts-generator').default; and use

dts_gen({
        name: 'lib_name',
        baseDir: 'src/',
        project: './',
        out: 'lib/dts/lib_name.d.ts'
    }); 

@ulivz
Copy link

ulivz commented Mar 12, 2020

Can we open a new api for usages that do not write to disk?

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

No branches or pull requests

5 participants