diff --git a/packages/angular/package.json b/packages/angular/package.json index 8b3fdfc678..099931e0fa 100644 --- a/packages/angular/package.json +++ b/packages/angular/package.json @@ -26,7 +26,6 @@ "scripts": { "build": "npm run clean && npm run build.ng && npm run build.core && npm run clean-generated", "build.core": "node scripts/build-core.js", - "build.link": "npm run build && node scripts/link-copy.js", "build.ng": "ng-packagr -p ng-package.json -c tsconfig.json", "build.watch": "npm run build.ng -- --watch", "clean": "node scripts/clean.js", diff --git a/packages/angular/scripts/README.md b/packages/angular/scripts/README.md deleted file mode 100644 index 95acfc6eb6..0000000000 --- a/packages/angular/scripts/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# Local @ionic/angular test/testapp development - -1. `npm install` at the root of `angular` -2. `npm run build.dev` to build local `@ionic/angular` and `@ionic/core` -3. `cd test/testapp` to the test app -4. `npm install` in the test app directory -5. `npm run serve` copies packages and serve the app (see package.json for more options) -6. [http://localhost:4200/](http://localhost:4200/) - - -# npm link local development - -`npm link` doesn't work as expected due to the `devDependency` on `@angular/core`. This is the work around... - - npm run build.link ../ionic-conference-app - -When the command above is ran from the `angular` directory, it will build `@ionic/angular` and copy the `dist` directory to the correct location of another local project. In the example above, the end result is that it copies the `dist` directory to `../ionic-conference-app/node_modules/@ionic/angular/dist`. The path given should be relative to the root of this mono repo. - -## package.json note - -The `package.json` file in this directory references __Ionic 3__ and is in here to get GitHub to properly show the Used By counts on the repo. __Do not remove it!__ diff --git a/packages/angular/scripts/link-copy.js b/packages/angular/scripts/link-copy.js deleted file mode 100644 index 5465e00a1a..0000000000 --- a/packages/angular/scripts/link-copy.js +++ /dev/null @@ -1,40 +0,0 @@ -const fs = require('fs-extra'); -const path = require('path'); - - -let prjDir = process.argv[2]; -if (!prjDir) { - throw new Error('local path required as last argument to "npm run build.link" command'); -} -prjDir = path.join(__dirname, '../../../', prjDir); - -copyPackage(prjDir, 'angular'); -copyPackage(prjDir, 'core'); - - -function copyPackage(prjDir, pkgName) { - const prjDest = path.join(prjDir, 'node_modules', '@ionic', pkgName); - - const pkgSrcDir = path.join(__dirname, '..', '..', pkgName); - const pkgSrcDist = path.join(pkgSrcDir, 'dist'); - const pkgJsonPath = path.join(pkgSrcDir, 'package.json'); - const pkgJson = require(pkgJsonPath); - - // make sure this local project exists - fs.emptyDirSync(prjDest); - - pkgJson.files.push('package.json'); - - pkgJson.files.forEach(f => { - const src = path.join(pkgSrcDir, f); - const dest = path.join(prjDest, f); - - console.log('copying:', src, 'to', dest); - fs.copySync(src, dest); - }); - - const prjReadme = path.join(prjDest, 'README.md'); - console.log('readme:', prjReadme); - - fs.writeFileSync(prjReadme, '@ionic/' + pkgName + ' copied from ' + pkgSrcDir + ', ' + new Date()); -}