@netlify/content-engine
Version:
37 lines • 1.01 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.programReducer = void 0;
const reporter_1 = require("../../reporter/reporter");
const initialState = {
directory: `/`,
// status: `BOOTSTRAPPING`,
open: false,
openTracingConfigFile: ``,
port: 80,
host: `localhost`,
sitePackageJson: {},
extensions: [],
reporter: reporter_1.reporter,
};
const programReducer = (state = initialState, action) => {
switch (action.type) {
case `SET_PROGRAM`:
return {
...action.payload,
};
case `SET_PROGRAM_EXTENSIONS`:
return {
...state,
extensions: action.payload,
};
case `SET_PROGRAM_STATUS`:
return {
...state,
// status: `BOOTSTRAP_FINISHED`,
};
default:
return state;
}
};
exports.programReducer = programReducer;
//# sourceMappingURL=program.js.map
;