Publishing package
This commit is contained in:
Родитель
719cf1eb9f
Коммит
471074abec
|
@ -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}`);
|
||||
|
|
|
@ -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__",
|
||||
|
|
Загрузка…
Ссылка в новой задаче