mirror of
https://github.com/zhigang1992/firebase-tools.git
synced 2026-05-10 21:33:00 +08:00
18 lines
448 B
JavaScript
18 lines
448 B
JavaScript
'use strict';
|
|
|
|
var fs = require('fs');
|
|
|
|
var fetchWebSetup = require('../fetchWebSetup');
|
|
|
|
var INIT_TEMPLATE = fs.readFileSync(__dirname + '/../../templates/hosting/init.js', 'utf8');
|
|
|
|
module.exports = function(options) {
|
|
return fetchWebSetup(options).then(function(config) {
|
|
var configJson = JSON.stringify(config, null, 2);
|
|
return {
|
|
js: INIT_TEMPLATE.replace('{/*--CONFIG--*/}', configJson),
|
|
json: configJson
|
|
};
|
|
});
|
|
};
|