config.js 992 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. var Immutable = require("immutable");
  2. /**
  3. * Any configurable paths/config
  4. * @type {{pluginName: string, indexPage: string, socketJs: string, appJs: string, connector: string}}
  5. */
  6. var defaults = {
  7. pluginName: "UI",
  8. indexPage: "/index.html",
  9. socketJs: "/js/vendor/socket.js",
  10. appJs: "/js/dist/app.js",
  11. app: "/app.js",
  12. appExtraJs: "/js/app-extra.js",
  13. connector: "/js/connector.js",
  14. pagesConfig: "/js/pages-config.js",
  15. public: {
  16. svg: "/img/icons/icons.svg",
  17. css: "/css/core.min.css"
  18. },
  19. clientJs: "/lib/client-js.js",
  20. socket: {
  21. namespace: "/browser-sync-cp"
  22. },
  23. components: {
  24. header: "/components/header.html",
  25. footer: "/components/footer.html"
  26. }
  27. };
  28. module.exports.defaults = defaults;
  29. /**
  30. * @param [userConfig]
  31. * @returns {Map}
  32. */
  33. module.exports.merge = function (userConfig) {
  34. return Immutable
  35. .fromJS(defaults)
  36. .mergeDeep(userConfig);
  37. };