Remove APM for now

This commit is contained in:
Ben Gotow 2017-07-11 12:15:47 -07:00
parent b76476aeb2
commit aa2e2a7624
15 changed files with 3 additions and 160 deletions

View file

@ -56,4 +56,3 @@ script:
cache:
directories:
- node_modules
- apm/node_modules

View file

@ -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)

View file

@ -50,4 +50,3 @@ script:
cache:
directories:
- node_modules
- apm/node_modules

View file

@ -1,7 +1,6 @@
{
"ignore_dirs": [
"build/node_modules",
"apm/node_modules",
"node_modules"
]
}

View file

@ -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:

View file

@ -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.

View file

@ -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"
}
}

View file

@ -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`

View file

@ -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,
],

View file

@ -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.

View file

@ -15,15 +15,3 @@ This example is a good starting point for plugins that want to extend the compos
experience.
<img src="https://raw.githubusercontent.com/nylas/nylas-mail/master/internal_packages/composer-templates/screenshot.png">
#### 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`

View file

@ -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).
<img src="https://raw.githubusercontent.com/nylas/nylas-mail/master/internal_packages/github-contact-card/screenshot.png">
#### 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`

View file

@ -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`

View file

@ -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.

View file

@ -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();
}