diff --git a/.scripts/common.js b/.scripts/common.js index 1a93fb4f07..0966c72191 100644 --- a/.scripts/common.js +++ b/.scripts/common.js @@ -254,6 +254,22 @@ function updatePackageVersions(tasks, packages, version) { } }); + // angular & angular-server need to update their dist versions + if (package === 'angular' || package === 'packages/angular-server') { + const distPackage = path.join(package, 'dist'); + + updatePackageVersion(tasks, distPackage, version); + + tasks.push({ + title: `${package} update @ionic/core dependency, if present ${tc.dim(`(${version})`)}`, + task: async () => { + const pkg = readPkg(distPackage); + updateDependency(pkg, '@ionic/core', version); + writePkg(distPackage, pkg); + } + }); + } + if (package === 'packages/react-router') { tasks.push({ title: `${package} update @ionic/react dependency, if present ${tc.dim(`(${version})`)}`, diff --git a/.scripts/copy-package.js b/.scripts/copy-package.js deleted file mode 100644 index 34e2010976..0000000000 --- a/.scripts/copy-package.js +++ /dev/null @@ -1,12 +0,0 @@ - -// copy the package.json to the directory to dist to publish it - -const fs = require('fs'); -const path = require('path'); - -const package = process.argv[2]; - -const srcPath = path.join(__dirname, '..', package, 'package.json'); -let packageContent = fs.readFileSync(srcPath, 'utf-8'); - -fs.writeFileSync(path.join(__dirname, '..', package, 'dist', 'package.json'), packageContent); diff --git a/.scripts/prepare.js b/.scripts/prepare.js index fe17a73959..0d37e4bbce 100644 --- a/.scripts/prepare.js +++ b/.scripts/prepare.js @@ -113,9 +113,6 @@ async function preparePackages(packages, version, install) { // add update package.json of each project common.updatePackageVersions(tasks, packages, version); - // copy package.json to dist - common.copyPackageToDist(tasks, packages); - // generate changelog generateChangeLog(tasks);