@atomist/sample-sdm
Version:
Sample Atomist automation for software delivery
30 lines • 1.78 kB
JavaScript
;
/*
* Copyright © 2018 Atomist, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
const projectEditorOps_1 = require("@atomist/automation-client/operations/edit/projectEditorOps");
const updateReadmeTitle_1 = require("../../../commands/editors/updateReadmeTitle");
const updatePackageJsonIdentification_1 = require("../editors/updatePackageJsonIdentification");
const NodeProjectCreationParameters_1 = require("./NodeProjectCreationParameters");
/* tslint:disable:max-line-length */
function nodeGenerator(config, details = {}) {
return Object.assign({ createEditor: transformSeed, paramsMaker: () => new NodeProjectCreationParameters_1.NodeProjectCreationParameters(config), name: `nodeGenerator-${config.seed.repo}`, tags: ["node", "typescript", "generator"] }, details);
}
exports.nodeGenerator = nodeGenerator;
function transformSeed(params) {
return projectEditorOps_1.chainEditors(updatePackageJsonIdentification_1.updatePackageJsonIdentification(params.appName, params.target.description, params.version, params.screenName, params.target.repoRef), updateReadmeTitle_1.updateReadmeTitle(params.appName, params.target.description));
}
//# sourceMappingURL=nodeGenerator.js.map