n8n/packages/editor-ui/src/main.ts

191 lines
3.9 KiB
TypeScript
Raw Normal View History

2019-06-23 03:35:23 -07:00
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';
2019-09-11 01:59:50 -07:00
import 'prismjs';
import 'prismjs/themes/prism.css';
import 'vue-prism-editor/dist/VuePrismEditor.css';
2019-09-07 00:01:27 -07:00
2019-06-23 03:35:23 -07:00
import * as ElementUI from 'element-ui';
// @ts-ignore
import locale from 'element-ui/lib/locale/lang/en';
import './n8n-theme.scss';
import App from '@/App.vue';
import router from './router';
import { library } from '@fortawesome/fontawesome-svg-core';
import {
faAngleDoubleLeft,
faAngleDown,
faAngleRight,
faAngleUp,
faArrowRight,
2019-06-23 03:35:23 -07:00
faAt,
2019-09-22 12:59:45 -07:00
faBook,
2019-06-23 03:35:23 -07:00
faBug,
faCalendar,
faCheck,
faCode,
faCodeBranch,
2019-06-23 03:35:23 -07:00
faCog,
faCogs,
faClone,
faCloud,
2019-12-31 17:03:46 -08:00
faCloudDownloadAlt,
2019-06-23 03:35:23 -07:00
faCopy,
2019-12-28 19:28:15 -08:00
faCut,
2019-06-23 03:35:23 -07:00
faDotCircle,
faEdit,
2019-06-23 03:35:23 -07:00
faEnvelope,
faEye,
2019-06-23 03:35:23 -07:00
faExclamationTriangle,
faExternalLinkAlt,
faExchangeAlt,
2019-06-23 03:35:23 -07:00
faFile,
2019-09-04 03:18:21 -07:00
faFileCode,
2019-06-23 03:35:23 -07:00
faFileDownload,
faFileExport,
faFileImport,
faFilePdf,
2019-06-23 03:35:23 -07:00
faFolderOpen,
faHdd,
faHourglass,
faImage,
faInbox,
faInfo,
faInfoCircle,
faKey,
faMapSigns,
2019-06-23 03:35:23 -07:00
faNetworkWired,
faPause,
faPen,
faPlay,
faPlayCircle,
faPlus,
2019-09-22 12:59:45 -07:00
faQuestion,
2019-06-23 03:35:23 -07:00
faQuestionCircle,
faRedo,
faRss,
faSave,
faSearchMinus,
faSearchPlus,
2020-08-04 00:01:37 -07:00
faServer,
faSignInAlt,
2019-06-23 03:35:23 -07:00
faSlidersH,
faSpinner,
faStop,
faSun,
faSync,
faSyncAlt,
2019-06-23 03:35:23 -07:00
faTable,
faTasks,
faTerminal,
faThLarge,
2019-06-23 03:35:23 -07:00
faTimes,
faTrash,
faUndo,
2019-09-22 12:59:45 -07:00
faUsers,
2019-06-23 03:35:23 -07:00
} from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
import { store } from './store';
Vue.use(ElementUI, { locale });
library.add(faAngleDoubleLeft);
library.add(faAngleDown);
library.add(faAngleRight);
library.add(faAngleUp);
library.add(faArrowRight);
2019-06-23 03:35:23 -07:00
library.add(faAt);
2019-09-22 12:59:45 -07:00
library.add(faBook);
2019-06-23 03:35:23 -07:00
library.add(faBug);
library.add(faCalendar);
library.add(faCheck);
library.add(faCode);
library.add(faCodeBranch);
2019-06-23 03:35:23 -07:00
library.add(faCog);
library.add(faCogs);
library.add(faClone);
library.add(faCloud);
2019-12-31 17:03:46 -08:00
library.add(faCloudDownloadAlt);
2019-06-23 03:35:23 -07:00
library.add(faCopy);
2019-12-28 19:28:15 -08:00
library.add(faCut);
2019-06-23 03:35:23 -07:00
library.add(faDotCircle);
library.add(faEdit);
2019-06-23 03:35:23 -07:00
library.add(faEnvelope);
library.add(faEye);
2019-06-23 03:35:23 -07:00
library.add(faExclamationTriangle);
library.add(faExternalLinkAlt);
library.add(faExchangeAlt);
2019-06-23 03:35:23 -07:00
library.add(faFile);
2019-09-04 03:18:21 -07:00
library.add(faFileCode);
2019-06-23 03:35:23 -07:00
library.add(faFileDownload);
library.add(faFileExport);
library.add(faFileImport);
library.add(faFilePdf);
2019-06-23 03:35:23 -07:00
library.add(faFolderOpen);
library.add(faHdd);
library.add(faHourglass);
library.add(faImage);
library.add(faInbox);
library.add(faInfo);
library.add(faInfoCircle);
library.add(faKey);
library.add(faMapSigns);
2019-06-23 03:35:23 -07:00
library.add(faNetworkWired);
library.add(faPause);
library.add(faPen);
library.add(faPlay);
library.add(faPlayCircle);
library.add(faPlus);
2019-09-22 12:59:45 -07:00
library.add(faQuestion);
2019-06-23 03:35:23 -07:00
library.add(faQuestionCircle);
library.add(faRedo);
library.add(faRss);
library.add(faSave);
library.add(faSearchMinus);
library.add(faSearchPlus);
2020-08-04 00:01:37 -07:00
library.add(faServer);
library.add(faSignInAlt);
2019-06-23 03:35:23 -07:00
library.add(faSlidersH);
library.add(faSpinner);
library.add(faStop);
library.add(faSun);
library.add(faSync);
library.add(faSyncAlt);
2019-06-23 03:35:23 -07:00
library.add(faTable);
library.add(faTasks);
library.add(faTerminal);
library.add(faThLarge);
2019-06-23 03:35:23 -07:00
library.add(faTimes);
library.add(faTrash);
library.add(faUndo);
2019-09-22 12:59:45 -07:00
library.add(faUsers);
2019-06-23 03:35:23 -07:00
Vue.component('font-awesome-icon', FontAwesomeIcon);
Vue.config.productionTip = false;
new Vue({
router,
store,
render: h => h(App),
}).$mount('#app');
if (process.env.NODE_ENV !== 'production') {
// Make sure that we get all error messages properly displayed
// as long as we are not in production mode
window.onerror = (message, source, lineno, colno, error) => {
if (message.toString().includes('ResizeObserver')) {
// That error can apparently be ignored and can probably
// not do anything about it anyway
return;
}
console.error('error caught in main.ts'); // eslint-disable-line no-console
2019-09-22 13:03:58 -07:00
console.error(message); // eslint-disable-line no-console
console.error(error); // eslint-disable-line no-console
2019-06-23 03:35:23 -07:00
};
}