ducksoupdev / gulp-site-generator

A static site generator using Gulp
183 stars 29 forks source link

issues regarding js files #30

Closed suni007 closed 7 years ago

suni007 commented 7 years ago

Hi duck, gsg is super cool and thank you, I have some issues regarding js. I have added some js files to my site, which add some animations and functionality to my site. while adding js files they should be follow an order, to get right functionality but in the site generator the concat js task mix all the js files in alphabetic order and js related functionality is not working. I tried using gulp-useref but I didn't found a solution. can you please help for this issue.

ducksoupdev commented 7 years ago

Hi and thanks! The site.json file has a concatJs option (https://github.com/ducksoupdev/gulp-site-generator/blob/master/site.json#L7) that you can set with the list of JS files that you want to load in a specific order.

For example, if you have file1.js and file2.js that need to load before all your other JS files, you can set the following:

...
"concatJs": [
    "./src/js/file1.js",
    "./src/js/file2.js",
    "./src/js/*.js"
  ],
...
suni007 commented 7 years ago

Thank you for your prompt response to my question.