From aa2e2a7624aac87ff692538f484dd0a38031da7b Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Tue, 11 Jul 2017 12:15:47 -0700 Subject: [PATCH] Remove APM for now --- .travis.yml | 1 - README.md | 21 ---------------- packages/client-app/.travis.yml | 1 - packages/client-app/.watchmanconfig | 1 - packages/client-app/README.md | 22 ---------------- packages/client-app/apm/README.md | 2 -- packages/client-app/apm/package.json | 11 -------- packages/client-app/build/README.md | 3 --- .../client-app/build/tasks/package-task.js | 25 ++----------------- .../composer-markdown/README.md | 15 ----------- .../composer-templates/README.md | 12 --------- .../github-contact-card/README.md | 12 --------- .../message-view-on-github/README.md | 12 --------- .../phishing-detection/README.md | 12 --------- scripts/postinstall.es6 | 13 +--------- 15 files changed, 3 insertions(+), 160 deletions(-) delete mode 100644 packages/client-app/apm/README.md delete mode 100644 packages/client-app/apm/package.json diff --git a/.travis.yml b/.travis.yml index cf1d9a97d..1a9fa9260 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,4 +56,3 @@ script: cache: directories: - node_modules - - apm/node_modules diff --git a/README.md b/README.md index 824b5d13f..cbe28f581 100644 --- a/README.md +++ b/README.md @@ -136,27 +136,6 @@ Great starting points for creating your own plugins! - [Personal Level Indicators](https://github.com/nylas/nylas-mail/tree/master/internal_packages/personal-level-indicators) - [Phishing Detection](https://github.com/nylas/nylas-mail/tree/master/internal_packages/phishing-detection) -#### Community Plugins - -Note these are not tested or officially supported by Nylas, but we still think they are really cool! If you find bugs with them, please open GitHub issues on their individual project pages, not the Nylas Mail (N1) repo page. Thanks! - -- [Jiffy](http://noahbuscher.github.io/N1-Jiffy/)—Insert animated GIFs -- [Weather](https://github.com/jackiehluo/n1-weather) -- [Todoist](https://github.com/alexfruehwirth/N1TodoistIntegration) -- [Unsubscribe](https://github.com/colinking/n1-unsubscribe) -- [Squirt Speed Reader](https://github.com/HarleyKwyn/squirt-reader-N1-plugin/) -- [Website Launcher](https://github.com/adriangrantdotorg/nylas-n1-background-webpage)—Opens a URL in separate window -- In Development: [Cypher](https://github.com/mbilker/cypher) (PGP Encryption) -- [Avatars](https://github.com/unity/n1-avatars) -- [Events Calendar (WIP)](https://github.com/nerdenough/n1-events-calendar) -- [Mail in Chat (WIP)](https://github.com/yjchen/mail_in_chat) -- [Evernote](https://github.com/grobgl/n1-evernote) -- [Wunderlist](https://github.com/miguelrs/n1-wunderlist) -- [Participants Display](https://github.com/kbruccoleri/nylas-participants-display) -- [GitHub](https://github.com/ForbesLindesay/N1-GitHub) - -When you install packages, they're moved to ~/.nylas-mail/packages, and Nylas Mail runs apm install on the command line to fetch dependencies listed in the package's package.json - ## Configuration You can configure Nylas Mail in a few ways—for instance, pointing it to your self-hosted instance of the sync engine or changing the interface zoom level. [Learn more about how.](https://github.com/nylas/nylas-mail/blob/master/CONFIGURATION.md) diff --git a/packages/client-app/.travis.yml b/packages/client-app/.travis.yml index de54a8001..4deea48ae 100644 --- a/packages/client-app/.travis.yml +++ b/packages/client-app/.travis.yml @@ -50,4 +50,3 @@ script: cache: directories: - node_modules - - apm/node_modules diff --git a/packages/client-app/.watchmanconfig b/packages/client-app/.watchmanconfig index 177e4c662..696036e9f 100644 --- a/packages/client-app/.watchmanconfig +++ b/packages/client-app/.watchmanconfig @@ -1,7 +1,6 @@ { "ignore_dirs": [ "build/node_modules", - "apm/node_modules", "node_modules" ] } diff --git a/packages/client-app/README.md b/packages/client-app/README.md index 0192fe7f7..db769571a 100644 --- a/packages/client-app/README.md +++ b/packages/client-app/README.md @@ -89,28 +89,6 @@ Great starting points for creating your own plugins! - [Personal Level Indicators](https://github.com/nylas/nylas-mail/tree/master/internal_packages/personal-level-indicators) - [Phishing Detection](https://github.com/nylas/nylas-mail/tree/master/internal_packages/phishing-detection) -#### Community Plugins - -Note these are not tested or officially supported by Nylas, but we still think they are really cool! If you find bugs with them, please open GitHub issues on their individual project pages, not the Nylas Mail (N1) repo page. Thanks! - -- [Jiffy](http://noahbuscher.github.io/N1-Jiffy/)—Insert animated GIFs -- [Weather](https://github.com/jackiehluo/n1-weather) -- [Todoist](https://github.com/alexfruehwirth/N1TodoistIntegration) -- [Unsubscribe](https://github.com/colinking/n1-unsubscribe) -- [Squirt Speed Reader](https://github.com/HarleyKwyn/squirt-reader-N1-plugin/) -- [Website Launcher](https://github.com/adriangrantdotorg/nylas-n1-background-webpage)—Opens a URL in separate window -- In Development: [Cypher](https://github.com/mbilker/cypher) (PGP Encryption) -- [Avatars](https://github.com/unity/n1-avatars) -- [Events Calendar (WIP)](https://github.com/nerdenough/n1-events-calendar) -- [Mail in Chat (WIP)](https://github.com/yjchen/mail_in_chat) -- [Evernote](https://github.com/grobgl/n1-evernote) -- [Wunderlist](https://github.com/miguelrs/n1-wunderlist) -- [Participants Display](https://github.com/kbruccoleri/nylas-participants-display) -- [GitHub](https://github.com/ForbesLindesay/N1-GitHub) - -When you install packages, they're moved to ~/.nylas-mail/packages, and Nylas Mail runs apm install on the command line to fetch dependencies listed in the package's package.json - - ## Building the docs Plugin SDK docs are available at [https://nylas.github.io/nylas-mail/](https://nylas.github.io/nylas-mail/). Here's how you build them: diff --git a/packages/client-app/apm/README.md b/packages/client-app/apm/README.md deleted file mode 100644 index 1b22ac5fd..000000000 --- a/packages/client-app/apm/README.md +++ /dev/null @@ -1,2 +0,0 @@ -Nylas Mail ships a copy of [apm](https://github.com/atom/apm) to build packages -when users choose to install them. This won't be true much longer. diff --git a/packages/client-app/apm/package.json b/packages/client-app/apm/package.json deleted file mode 100644 index f6c13d700..000000000 --- a/packages/client-app/apm/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "n1-bundled-apm", - "description": "N1's bundled apm", - "repository": { - "type": "git", - "url": "https://github.com/nylas/nylas-mail" - }, - "dependencies": { - "atom-package-manager": "1.1.1" - } -} diff --git a/packages/client-app/build/README.md b/packages/client-app/build/README.md index 0623125f4..e8d75432a 100644 --- a/packages/client-app/build/README.md +++ b/packages/client-app/build/README.md @@ -22,6 +22,3 @@ NOTE: Run all of these from the N1 root folder. **Building:** `script/grunt build` - -The build folder has its own package.json and is isolated so we can use `npm` -to compile against v8's headers instead of `apm` diff --git a/packages/client-app/build/tasks/package-task.js b/packages/client-app/build/tasks/package-task.js index 8709541c3..192729bfe 100644 --- a/packages/client-app/build/tasks/package-task.js +++ b/packages/client-app/build/tasks/package-task.js @@ -15,28 +15,6 @@ module.exports = (grunt) => { const babelPath = path.join(grunt.config('rootDir'), '.babelrc') const babelOptions = JSON.parse(fs.readFileSync(babelPath)) - function runCopyAPM(buildPath, electronVersion, platform, arch, callback) { - // Move APM up out of the /app folder which will be inside the ASAR - const apmTargetDir = path.resolve(buildPath, '..', 'apm'); - fs.moveSync(path.join(buildPath, 'apm'), apmTargetDir) - - // Move /apm/node_modules/atom-package-manager up a level. We're - // essentially pulling the atom-package-manager module up outside of - // the node_modules folder, which is necessary because npmV3 installs - // nested dependencies in the same dir. - const apmPackageDir = path.join(apmTargetDir, 'node_modules', 'atom-package-manager') - for (const name of fs.readdirSync(apmPackageDir)) { - fs.renameSync(path.join(apmPackageDir, name), path.join(apmTargetDir, name)); - } - - const apmSymlink = path.join(apmTargetDir, 'node_modules', '.bin', 'apm'); - if (fs.existsSync(apmSymlink)) { - fs.unlinkSync(apmSymlink); - } - fs.rmdirSync(apmPackageDir); - callback(); - } - function runCopyPlatformSpecificResources(buildPath, electronVersion, platform, arch, callback) { // these files (like nylas-mailto-default.reg) go alongside the ASAR, // not inside it, so we need to move out of the `app` directory. @@ -169,6 +147,8 @@ module.exports = (grunt) => { 'derefSymlinks': false, 'asar': { 'unpack': "{" + [ + 'MailSync', + 'MailSync.exe', '*.node', '**/vendor/**', 'examples/**', @@ -250,7 +230,6 @@ module.exports = (grunt) => { 'app-bundle-id': "com.nylas.nylas-mail", 'afterCopy': [ runCopyPlatformSpecificResources, - runCopyAPM, runCopySymlinkedPackages, runTranspilers, ], diff --git a/packages/client-app/internal_packages/composer-markdown/README.md b/packages/client-app/internal_packages/composer-markdown/README.md index 55468c6d5..9a0e04f36 100644 --- a/packages/client-app/internal_packages/composer-markdown/README.md +++ b/packages/client-app/internal_packages/composer-markdown/README.md @@ -6,21 +6,6 @@ A plugin for N1 that allows you to compose emails using markdown. ![Markdown Screenshot Editor](/assets/markdown_screenshot_edit.png?raw=true "Markdown Composer Editor") ![Markdown Screenshot Preview](/assets/markdown_screenshot_preview.png?raw=true "Markdown Composer Preview") -## Install this plugin: - -1. Download and run N1 - -2. Clone this repository (Make sure you have `git` installed and available in - your system path) - -3. From the menu, select `Developer > Install a Package Manually...` - From the dialog, choose the directory of this plugin to install it! - - > When you install packages, they're moved to `~/.nylas-mail/packages`, - > and N1 runs `apm install` on the command line to fetch dependencies - > listed in the package's `package.json` - - ## Usage Just write emails using markdown. diff --git a/packages/client-app/internal_packages/composer-templates/README.md b/packages/client-app/internal_packages/composer-templates/README.md index e4c07d22d..1a257ad67 100644 --- a/packages/client-app/internal_packages/composer-templates/README.md +++ b/packages/client-app/internal_packages/composer-templates/README.md @@ -15,15 +15,3 @@ This example is a good starting point for plugins that want to extend the compos experience. - -#### Install this plugin - -1. Download and run N1 - -2. From the menu, select `Developer > Install a Plugin Manually...` - The dialog will default to this examples directory. Just choose the - package to install it! - - > When you install packages, they're moved to `~/.nylas-mail/packages`, - > and N1 runs `apm install` on the command line to fetch dependencies - > listed in the package's `package.json` diff --git a/packages/client-app/internal_packages/github-contact-card/README.md b/packages/client-app/internal_packages/github-contact-card/README.md index 31e5489a2..24d8c4302 100644 --- a/packages/client-app/internal_packages/github-contact-card/README.md +++ b/packages/client-app/internal_packages/github-contact-card/README.md @@ -8,15 +8,3 @@ This example is a good starting point for plugins that want to display data from external sources in the sidebar. If you want to see some more advanced plugins, have a look through [all the internal plugins, here on Github](https://github.com/nylas/nylas-mail/tree/master/internal_packages). - -#### Install this plugin - -1. Download and run N1 - -2. From the menu, select `Developer > Install a Plugin Manually...` - The dialog will default to this examples directory. Just choose the - package to install it! - - > When you install packages, they're moved to `~/.nylas-mail/packages`, - > and N1 runs `apm install` on the command line to fetch dependencies - > listed in the package's `package.json` diff --git a/packages/client-app/internal_packages/message-view-on-github/README.md b/packages/client-app/internal_packages/message-view-on-github/README.md index 9bd21cc0a..4420a0a67 100644 --- a/packages/client-app/internal_packages/message-view-on-github/README.md +++ b/packages/client-app/internal_packages/message-view-on-github/README.md @@ -7,15 +7,3 @@ on GitHub. This example is a good starting point for plugins that want to create custom actions. - -#### Install this plugin - -1. Download and run N1 - -2. From the menu, select `Developer > Install a Plugin Manually...` - The dialog will default to this examples directory. Just choose the - package to install it! - - > When you install packages, they're moved to `~/.nylas-mail/packages`, - > and N1 runs `apm install` on the command line to fetch dependencies - > listed in the package's `package.json` diff --git a/packages/client-app/internal_packages/phishing-detection/README.md b/packages/client-app/internal_packages/phishing-detection/README.md index 1082c814a..13fff391d 100644 --- a/packages/client-app/internal_packages/phishing-detection/README.md +++ b/packages/client-app/internal_packages/phishing-detection/README.md @@ -5,18 +5,6 @@ a message's originating address is different from its return address. The warnin ![screenshot](./screenshot.png) -#### Install this plugin - -1. Download and run N1 - -2. From the menu, select `Developer > Install a Package Manually...` - The dialog will default to this examples directory. Just choose the - package to install it! - - > When you install packages, they're moved to `~/.nylas-mail/packages`, - > and N1 runs `apm install` on the command line to fetch dependencies - > listed in the package's `package.json` - #### Who is this for? This package is our slimmest example package. It's annotated for developers who have no experience with React, Flux, Electron, or N1. diff --git a/scripts/postinstall.es6 b/scripts/postinstall.es6 index b29efd02d..d42bf802d 100644 --- a/scripts/postinstall.es6 +++ b/scripts/postinstall.es6 @@ -70,9 +70,6 @@ async function lernaBootstrap(installTarget) { const npmEnvs = { system: process.env, - apm: Object.assign({}, process.env, { - NPM_CONFIG_TARGET: '0.10.40', - }), electron: Object.assign({}, process.env, { NPM_CONFIG_TARGET: '1.7.3', NPM_CONFIG_ARCH: process.arch, @@ -93,14 +90,6 @@ async function npm(cmd, options) { } async function electronRebuild() { - if (!fs.existsSync(path.join("packages", "client-app", "apm"))) { - console.log("\n---> No client app to rebuild. Moving on") - return; - } - await npm('install', { - cwd: path.join('packages', 'client-app', 'apm'), - env: 'apm', - }) await npm('rebuild', { cwd: path.join('packages', 'client-app'), env: 'electron', @@ -136,7 +125,7 @@ async function main() { // `node-mac-notifier` get's correctly installed and included in the build // See https://github.com/lerna/lerna/issues/121 console.log("\n---> Reinstalling client-app dependencies to include optional dependencies"); - await npm('install', {cwd: 'packages/client-app'}) + await npm('install', {cwd: 'packages/client-app', env: 'electron'}) } await electronRebuild(); }