This commit is contained in:
Jeff Wilcox 2020-04-25 13:11:25 -07:00
Родитель 719cf1eb9f
Коммит 471074abec
3 изменённых файлов: 12 добавлений и 2 удалений

Просмотреть файл

@ -5,7 +5,7 @@
// This is basically a cheap Makefile. In JavaScript. Because...
const { readdir, stat, mkdir, copyFile, unlink, rmdir } = require('fs').promises;
const { readdir, stat, mkdir, copyFile, unlink, rmdir, writeFile } = require('fs').promises;
const path = require('path');
const templateSpecificExclusions = require('../projections/common-excludes.json');
@ -19,6 +19,9 @@ function logWithFooter(msg) {
console.log('='.repeat(msg.length));
}
const appPackage = require('../package.json');
const publishingPackage = path.resolve('__dirname', '..' ,'publishing-package.json');
async function build() {
if (await exists(templatesPath)) {
console.log(`Cleaning up existing templates from ${templatesPath}`);
@ -28,6 +31,12 @@ async function build() {
}
await mkdir(templatesPath);
// Create a packaging version
appPackage.private = false;
console.log(`Writing ${publishingPackage}`);
await writeFile(publishingPackage, JSON.stringify(appPackage, null, 2));
console.log();
const sharedFiles = await allFiles(sharedPath);
logWithFooter(`Shared common files from ${sharedPath}`);

1
.gitignore поставляемый
Просмотреть файл

@ -6,3 +6,4 @@ templates/
# Internal-only info
PRIVATENOTES.txt
publishing-package.json

Просмотреть файл

@ -1,5 +1,5 @@
{
"name": "@microsoft/repos-templates",
"name": "__companyinternalpackagename__",
"private": true,
"author": "Microsoft",
"version": "2.0.__Build_BuildId__",