Hi for anyone using the grunt method of building a story (http://chrisklimas.com/grunt-entwine-quickstart/),
Is there a way to specify the order that javascript source files should be included in?
If I have libraries that I need to load, how do I specify that they should be loaded first?
One way I can think of is to modify the Gruntfile's entwine configuration to list the files I need first:
Is there a way to specify the order that javascript source files should be included in?
If I have libraries that I need to load, how do I specify that they should be loaded first?
One way I can think of is to modify the Gruntfile's entwine configuration to list the files I need first:
files: { ['dist/web/' + filename(projectSettings.name) + '.html']: [ 'twine-stories/*.html', 'src/**/*.{css,html,js,twee,tw,txt}' ].concat(projectSettings.extraPaths) },Would become
files: { ['dist/web/' + filename(projectSettings.name) + '.html']: [ 'twine-stories/*.html', ...orderedSourceFiles, 'src/**/*.{css,html,js,twee,tw,txt}' ].concat(projectSettings.extraPaths) }, // where outside you would have a list of ordered source files var orderedSourceFiles = ["src/library1.js", "src/library2.js"];