From 471074abec6bfe36dc32aa5c0b0a47ff55dc577a Mon Sep 17 00:00:00 2001 From: Jeff Wilcox Date: Sat, 25 Apr 2020 13:11:25 -0700 Subject: [PATCH] Publishing package --- .build/package.js | 11 ++++++++++- .gitignore | 1 + package.json | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.build/package.js b/.build/package.js index 2d4ac87..19406f8 100644 --- a/.build/package.js +++ b/.build/package.js @@ -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}`); diff --git a/.gitignore b/.gitignore index c6597e1..34c299b 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ templates/ # Internal-only info PRIVATENOTES.txt +publishing-package.json \ No newline at end of file diff --git a/package.json b/package.json index d7b34cf..0d86f56 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@microsoft/repos-templates", + "name": "__companyinternalpackagename__", "private": true, "author": "Microsoft", "version": "2.0.__Build_BuildId__",