Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// default configs values
var defaults = Object.freeze({
logLevel: 'warn',
publishableApiKey: getPublishableApiKeyFromUrl(),
secretApiKey: null,
servicesUrl: 'https://spaces.archilogic.com/api/v2',
storageDomain: 'storage.3d.io',
storageDomainNoCdn: 'storage-nocdn.3d.io'
})
// constants
var LOG_STRING_TO_ENUM = {
error: log.ERROR,
warn: log.WARN,
info: log.INFO,
debug: log.DEBUG
}
// main
var configs = function configs (args) {
if (!args) {
// no arguments: return copy of configs object
return JSON.parse(JSON.stringify(this))
}
// apply log level if among arguments
if (args.logLevel) {
import { Component } from "vue-property-decorator";
import * as Logger from "js-logger";
import Vuetify from "vuetify";
import "vuetify/dist/vuetify.css";
import Config from "./config.json";
import * as Store from "./store";
import { store } from "./store";
import router from "./router";
import "./style.scss";
import template from "./main.vue";
let logLevel = (Config.debug ? Logger.DEBUG : Logger.ERROR);
Logger.useDefaults();
Logger.setLevel(logLevel);
Vue.config.errorHandler = function (err, vm, info) {
Logger.error("Vue error: ", err);
};
Vue.use(Vuetify);
@Component({
mixins: [template],
store,
components: {
},
router
})
import { mapGetters, mapActions } from "vuex";
import Config from "./config.json";
import * as Store from "./store";
import { store } from "./store";
import router from "./router";
import Navbar from "./components/navbar";
import Foot from "./components/foot";
import "./style.scss";
import template from "./main.vue";
let logLevel = (Config.debug ? Logger.DEBUG : Logger.ERROR);
Logger.useDefaults();
Logger.setLevel(logLevel);
Vue.config.errorHandler = function (err, vm, info) {
Logger.error("Vue error: ", err);
};
@Component({
mixins: [template],
store,
components: {
Navbar,
Foot
},
router
})
let Config = require("./config.json");
import store from "./store";
import Navbar from "./components/navbar";
import Foot from "./components/foot";
import {router} from "./routes";
import "./style.scss";
let template = require("./main.vue");
Vue.use(VueRouter);
let logLevel = (Config.debug ? Logger.DEBUG : Logger.ERROR);
Logger.useDefaults();
Logger.setLevel(logLevel);
@Component({
mixins: [template],
store,
components: {
Navbar,
Foot
},
router: router
})
class App extends Vue {
mounted () {
Logger.log("mounted");
}