Javascript

ace.js

If you want to use all the components, you can just include and use dist/js/ace.js or the minified version in your app.

Source and custom build

Ace's javascript files are placed inside js/src .
To add/remove components you should edit js/src/index.umd.js

So for example if you don't want the Custom file input, you can remove the relevant line from js/src/index.umd.js and build a new dist/js/ace.js by running the following commands:

npm run js # builds dist/js/ace.js
npm run js-min # minifies ace.js

To see more commands like that, please view package.json file.

demo.js file

There is also the app/browser/demo.js file which you do not need and is only used to handle some stuff in Ace's demo.
For example to handle settings box such as changing sidebar theme, switching to RTL, etc as well as responding to sidebar or widget(card) events in demo ...

Demo pages' JS files

Most of Ace's demo pages use one or more plugins such as charts, date/time picking, etc and the relevant code to initialize those plugins for that page is inside:
views/pages/PAGENAME/@page-script.js

For example for dasbhoard you can find it here:
views/pages/dashboard/@page-script.js

You can check these files to see an example of how a plugin is used but you don't need to and should not include these files in your app.

Plugin JS files

The list of plugins used in each demo page can be seen here:
views/pages/PAGENAME/@vendor-scripts.hbs

For example for dashboard you can see that
views/pages/dashboard/@vendor-scripts.hbs
contains:

hbs
{{{include-js files="dist/Chart.js@chart.js"}}}
{{{include-js files="sortablejs"}}}

which means dist/Chart.js file from Chart.js and the main Javascript file from SortableJS plugins are used in Dashboard page.

Note that include-js and include-css are custom Handlebars helpers used to specify and include requirements of each demo page during development of Ace.
You don't need to and should not use them.

Node.js demo app

Ace's demo can be viewed both by opening index.html or running the app using the following command:

node index.js

👉 The index.js file along with the app and build folders are just for running and generating Ace's demo app and you don't need them