<commit_before>// GNU LGPL v2.1+: http://www.gnu.org/licenses/lgpl.html
'use strict';

// assert Vue is present
console.assert (Vue !== undefined);

// load utilities
require ('./hotkeys.js'); // adds $.click_hotkey()
Vue.mixin (Util.vue_mixins.data_tmpl); // Allow automatic `data` construction (cloning) from `data_tmpl`

// load Vue components
const vue_components = [
  require ('./button.vue'),
  require ('./button-bar.vue'),
  require ('./color-picker.vue'),
  require ('./icon.vue'),
  require ('./fed-number.vue'),
  require ('./fed-switch.vue'),
  require ('./fed-text.vue'),
  require ('./fed-object.vue'),
  require ('./piano-roll.vue'),
  require ('./playcontrols.vue'),
  require ('./part-list.vue'),
  require ('./part-thumb.vue'),
  require ('./modaldialog.vue'),
  require ('./aboutdialog.vue'),
  require ('./preferencesdialog.vue'),
  require ('./hscrollbar.vue'),
  require ('./track-list.vue'),
  require ('./track-view.vue'),
  require ('./projectshell.vue'),
  require ('./example.vue'),
];

// register components
vue_components.forEach (c => {
  Vue.component (c.name, c);
});

// run BSE JS unit tests
function ebeast_test_bse_basics() {
  console.assert (Bse.server);
  const proj = Bse.server.create_project ('ebeast_test_bse_basics-A');
  console.assert (proj);
  console.assert (proj.get_name() == 'ebeast_test_bse_basics-A');
  console.assert (proj.get_prop ('uname') == 'ebeast_test_bse_basics-A');
  proj.set_prop ('uname', 'ebeast_test_bse_basics-B2');
  console.assert (proj.get_name() == 'ebeast_test_bse_basics-B2');
  console.assert (proj.get_prop ('uname') == 'ebeast_test_bse_basics-B2');
  let icon = proj.get_prop ('icon');<commit_msg>EBEAST: vc/bundle.js: sort component registration<commit_after>// GNU LGPL v2.1+: http://www.gnu.org/licenses/lgpl.html
'use strict';

// assert Vue is present
console.assert (Vue !== undefined);

// load utilities
require ('./hotkeys.js'); // adds $.click_hotkey()
Vue.mixin (Util.vue_mixins.data_tmpl); // Allow automatic `data` construction (cloning) from `data_tmpl`

// load Vue components
const vue_components = [
  require ('./aboutdialog.vue'),
  require ('./button-bar.vue'),
  require ('./button.vue'),
  require ('./color-picker.vue'),
  require ('./icon.vue'),
  require ('./example.vue'),
  require ('./fed-number.vue'),
  require ('./fed-object.vue'),
  require ('./fed-switch.vue'),
  require ('./fed-text.vue'),
  require ('./hscrollbar.vue'),
  require ('./modaldialog.vue'),
  require ('./part-list.vue'),
  require ('./part-thumb.vue'),
  require ('./piano-roll.vue'),
  require ('./playcontrols.vue'),
  require ('./preferencesdialog.vue'),
  require ('./projectshell.vue'),
  require ('./track-list.vue'),
  require ('./track-view.vue'),
];

// register components
vue_components.forEach (c => {
  Vue.component (c.name, c);
});

// run BSE JS unit tests
function ebeast_test_bse_basics() {
  console.assert (Bse.server);
  const proj = Bse.server.create_project ('ebeast_test_bse_basics-A');
  console.assert (proj);
  console.assert (proj.get_name() == 'ebeast_test_bse_basics-A');
  console.assert (proj.get_prop ('uname') == 'ebeast_test_bse_basics-A');
  proj.set_prop ('uname', 'ebeast_test_bse_basics-B2');
  console.assert (proj.get_name() == 'ebeast_test_bse_basics-B2');
  console.assert (proj.get_prop ('uname') == 'ebeast_test_bse_basics-B2');
  let icon = proj.get_prop ('icon');
{'fraction_non_alphanumeric': 0.20353982300884957, 'fraction_numerical': 0.0029498525073746312, 'mean_word_length': 4.099248120300752, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7616705', 'n_tokens_mistral': 1240, 'n_tokens_neox': 1267, 'n_words': 237}