Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to run gulp task in website while button click

gulpfile.js
JavaScript
gulp.task("check", function (done) {
    fs.writeFileSync('./my-file.txt', 'This is my text','utf8')
});


index.html
HTML
<pre><!DOCTYPE html>
<html>
  <head>
    <script src="https://cdn.syncfusion.com/ej2/dist/ej2.min.js"></script>
    <script src="./gulpfile.js"></script>
  </head>
<body>

<div id="demo">
<input type="button" value="gup task" onclick="window.open('./build.bat')"/>
</div>

</body>
</html>


What I have tried:

i have tried like bwlo but no use

node.js - Call a Gulp / Node task from a click in the browser? - Stack Overflow[^]
Posted

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900