// /gulpfile.babel.js
fs.writeFileSync('./.env.json', JSON.stringify(process.env, ["NODE_ENV"]));
// /src/js/modules/App.API/factoryes/API.factory.js
(function () {
'use strict';
window.process = {env: require('../../.env.json')};
if (process.env.NODE_ENV === "development") {
self.url = "https://api.domain.dev";
}
else {
self.url = "https://api.domain.ru";
}
})();