Merge branch 'master' of github.com:nylas/N1
40
CONTRIBUTING.md
Normal file
|
@ -0,0 +1,40 @@
|
|||
# Contributing to N1 Core
|
||||
|
||||
Thank you for contributing!!
|
||||
|
||||
N1 core is the foundation our community uses to build email extensions with the
|
||||
modern web.
|
||||
|
||||
You currently need an early invitation code to get setup on N1. Sign up
|
||||
[here](https://invite.nylas.com) to request one. Drop us a line saying you'd
|
||||
like to contribute to N1 core and we'll get you set up immediately.
|
||||
|
||||
# Getting Started
|
||||
|
||||
Once you have a token:
|
||||
|
||||
git clone https://github.com/nylas/N1.git
|
||||
cd N1
|
||||
script/bootstrap
|
||||
|
||||
# Running N1 Core
|
||||
|
||||
./N1.sh --dev
|
||||
|
||||
Once the app boots, you'll be prompted to enter your early invitation code and
|
||||
email credentials.
|
||||
|
||||
Our early invitation codes are designed control access to our production mail sync
|
||||
engine while we roll out N1. However, the sync engine is [open
|
||||
source](https://github.com/nylas/sync-engine) and you can set it up yourself to
|
||||
begin using N1 immediately. Follow instructions on the [sync
|
||||
engine](https://github.com/nylas/sync-engine) repository.
|
||||
|
||||
# Testing N1 Core
|
||||
|
||||
./N1.sh --test
|
||||
|
||||
This will run the full suite of automated unit tests. We use [Jasmine 1.3](http://jasmine.github.io/1.3/introduction.html).
|
||||
|
||||
It runs all tests inside of the `/spec` folder and all tests inside of
|
||||
`/internal_packages/**/spec`
|
|
@ -47,43 +47,46 @@ if [ $REDIRECT_STDERR ]; then
|
|||
exec 2> /dev/null
|
||||
fi
|
||||
|
||||
N1_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd );
|
||||
export N1_PATH
|
||||
|
||||
if [ $OS == 'Mac' ]; then
|
||||
if [ -z "$EDGEHILL_PATH" ]; then
|
||||
echo "Set the EDGEHILL_PATH environment variable to the absolute location of the main edgehill folder."
|
||||
if [ -z "$N1_PATH" ]; then
|
||||
echo "Set the N1_PATH environment variable to the absolute location of the main edgehill folder."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ELECTRON_PATH=${ELECTRON_PATH:-$EDGEHILL_PATH/electron} # Set ELECTRON_PATH unless it is already set
|
||||
ELECTRON_PATH=${ELECTRON_PATH:-$N1_PATH/electron} # Set ELECTRON_PATH unless it is already set
|
||||
|
||||
# Exit if Atom can't be found
|
||||
if [ -z "$ELECTRON_PATH" ]; then
|
||||
echo "Cannot locate electron. Be sure you have run script/grunt download-electron first from $EDGEHILL_PATH"
|
||||
echo "Cannot locate electron. Be sure you have run script/grunt download-electron first from $N1_PATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We find the electron executable inside of the electron directory.
|
||||
$ELECTRON_PATH/Electron.app/Contents/MacOS/Electron --executed-from="$(pwd)" --pid=$$ "$@" $EDGEHILL_PATH
|
||||
$ELECTRON_PATH/Electron.app/Contents/MacOS/Electron --executed-from="$(pwd)" --pid=$$ "$@" $N1_PATH
|
||||
|
||||
elif [ $OS == 'Linux' ]; then
|
||||
DOT_INBOX_DIR="$HOME/.nylas"
|
||||
|
||||
mkdir -p "$DOT_INBOX_DIR"
|
||||
|
||||
if [ -z "$EDGEHILL_PATH" ]; then
|
||||
echo "Set the EDGEHILL_PATH environment variable to the absolute location of the main edgehill folder."
|
||||
if [ -z "$N1_PATH" ]; then
|
||||
echo "Set the N1_PATH environment variable to the absolute location of the main edgehill folder."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ELECTRON_PATH=${ELECTRON_PATH:-$EDGEHILL_PATH/electron} # Set ELECTRON_PATH unless it is already set
|
||||
ELECTRON_PATH=${ELECTRON_PATH:-$N1_PATH/electron} # Set ELECTRON_PATH unless it is already set
|
||||
|
||||
# Exit if Atom can't be found
|
||||
if [ -z "$ELECTRON_PATH" ]; then
|
||||
echo "Cannot locate electron. Be sure you have run script/grunt download-electron first from $EDGEHILL_PATH"
|
||||
echo "Cannot locate electron. Be sure you have run script/grunt download-electron first from $N1_PATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We find the electron executable inside of the electron directory.
|
||||
$ELECTRON_PATH/electron --executed-from="$(pwd)" --pid=$$ "$@" $EDGEHILL_PATH
|
||||
$ELECTRON_PATH/electron --executed-from="$(pwd)" --pid=$$ "$@" $N1_PATH
|
||||
|
||||
fi
|
||||
|
21
README.md
|
@ -1 +1,20 @@
|
|||
N1 is a hackable platform for your personal data, built on [Electron](https://github.com/atom/electron) and the [Nylas Platform APIs](https://nylas.com/sync_engine).
|
||||
![N1 Logo](https://edgehill.s3.amazonaws.com/static/N1.png)
|
||||
|
||||
**An extensible, open-source mail client built on the modern web.**
|
||||
|
||||
N1 is a foundation to build new email experiences. It's built on
|
||||
[Electron](https://github.com/atom/electron), [React](https://facebook.github.io/react/), and [Flux](https://facebook.github.io/flux/).
|
||||
|
||||
We are currently in an invite-only beta. Sign up [here](https://invite.nylas.com)
|
||||
to get early access. Star this repository to get even earlier access.
|
||||
|
||||
# Getting Started Building Extensions
|
||||
|
||||
Everything in N1 is an extension. Building your own is easy.
|
||||
|
||||
1. Sign up [here](https://invite.nylas.com) to request an early invitation code
|
||||
1. Use your token to download N1
|
||||
1. Follow the getting started guides here to write your first extension in 5 minutes
|
||||
|
||||
If you would like to run the N1 source and contribute, check out our [contributing
|
||||
guide](https://github.com/nylas/N1/blob/master/CONTRIBUTING.md)
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
This folder is where [apm](https://github.com/atom/apm) is installed to so that
|
||||
it is bundled with Atom.
|
||||
N1 uses [apm](https://github.com/atom/apm) to build packages instead of `npm`.
|
||||
This is because packages need to be compiled against Chrome's headers to work
|
||||
properly with Electron.
|
||||
|
|
|
@ -1,10 +1,24 @@
|
|||
# Atom Build
|
||||
# N1 Building and Tasks
|
||||
|
||||
This folder contains the grunt configuration and tasks to build Atom.
|
||||
This folder contains tasks to create production builds of N1
|
||||
|
||||
It was moved from the root of the repository so that any native modules used
|
||||
would be compiled against node's v8 headers since anything stored in
|
||||
`node_modules` at the root of the repo is compiled against atom's v8 headers.
|
||||
Tasks should not be executed from this folder, but rather from `/scripts`. The
|
||||
`/scripts` folder has convenient methods that fix paths and do environment
|
||||
checks.
|
||||
|
||||
New build dependencies should be added to the `package.json` file located in
|
||||
this folder.
|
||||
Note that most of the task definitions are stored in `/build/tasks`
|
||||
|
||||
## Some useful tasks
|
||||
|
||||
NOTE: Run all of these from the N1 root folder.
|
||||
|
||||
**Linting:**
|
||||
|
||||
`script/grunt lint`
|
||||
|
||||
**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`
|
||||
|
|
|
@ -14,7 +14,7 @@ mkdir -p %{buildroot}/usr/local/share/Nylas
|
|||
cp -r /tmp/nylas-build/Nylas/* %{buildroot}/usr/local/share/Nylas
|
||||
mkdir -p %{buildroot}/usr/local/bin/
|
||||
ln -sf /usr/local/share/nylas/resources/app/apm/node_modules/.bin/apm %{buildroot}/usr/local/bin/apm
|
||||
cp atom.sh %{buildroot}/usr/local/bin/nylas
|
||||
cp N1.sh %{buildroot}/usr/local/bin/nylas
|
||||
chmod 755 nylas
|
||||
mkdir -p %{buildroot}/usr/local/share/applications/
|
||||
mv nylas.desktop %{buildroot}/usr/local/share/applications/
|
||||
|
|
|
@ -16,7 +16,7 @@ FOR %%a IN (%*) DO (
|
|||
)
|
||||
|
||||
IF "%EXPECT_OUTPUT%"=="YES" (
|
||||
"%~dp0\..\..\atom.exe" %*
|
||||
"%~dp0\..\..\nylas.exe" %*
|
||||
) ELSE (
|
||||
"%~dp0\..\app\apm\bin\node.exe" "%~dp0\atom.js" %*
|
||||
)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
var path = require('path');
|
||||
var spawn = require('child_process').spawn;
|
||||
|
||||
var atomCommandPath = path.resolve(__dirname, '..', '..', 'atom.exe');
|
||||
var atomCommandPath = path.resolve(__dirname, '..', '..', 'nylas.exe');
|
||||
var arguments = process.argv.slice(2);
|
||||
arguments.unshift('--executed-from', process.cwd());
|
||||
var options = {detached: true, stdio: 'ignore'};
|
||||
|
|
|
@ -16,7 +16,7 @@ while getopts ":fhtvw-:" opt; do
|
|||
done
|
||||
|
||||
if [ $EXPECT_OUTPUT ]; then
|
||||
"$0/../../../atom.exe" "$@"
|
||||
"$0/../../../nylas.exe" "$@"
|
||||
else
|
||||
"$0/../../app/apm/bin/node.exe" "$0/../atom.js" "$@"
|
||||
fi
|
||||
|
|
|
@ -37,7 +37,7 @@ module.exports = (grunt) ->
|
|||
mkdir appDir
|
||||
|
||||
if process.platform isnt 'win32'
|
||||
cp 'atom.sh', path.resolve(appDir, '..', 'new-app', 'atom.sh')
|
||||
cp 'N1.sh', path.resolve(appDir, '..', 'new-app', 'N1.sh')
|
||||
|
||||
cp 'package.json', path.join(appDir, 'package.json')
|
||||
cp path.join('build', 'resources', 'nylas.png'), path.join(appDir, 'nylas.png')
|
||||
|
@ -174,7 +174,7 @@ module.exports = (grunt) ->
|
|||
|
||||
if process.platform is 'win32'
|
||||
cp path.join('build', 'resources', 'win', 'atom.cmd'), path.join(shellAppDir, 'resources', 'cli', 'atom.cmd')
|
||||
cp path.join('build', 'resources', 'win', 'atom.sh'), path.join(shellAppDir, 'resources', 'cli', 'atom.sh')
|
||||
cp path.join('build', 'resources', 'win', 'N1.sh'), path.join(shellAppDir, 'resources', 'cli', 'N1.sh')
|
||||
cp path.join('build', 'resources', 'win', 'atom.js'), path.join(shellAppDir, 'resources', 'cli', 'atom.js')
|
||||
cp path.join('build', 'resources', 'win', 'apm.sh'), path.join(shellAppDir, 'resources', 'cli', 'apm.sh')
|
||||
|
||||
|
|
|
@ -43,10 +43,10 @@ module.exports = (grunt) ->
|
|||
{cp, mkdir, rm} = require('./task-helpers')(grunt)
|
||||
|
||||
relativePathForGuide = (filename) ->
|
||||
'/guides/'+filename[0..-4]+'.html'
|
||||
filename[0..-4]+'.html'
|
||||
|
||||
relativePathForClass = (classname) ->
|
||||
'/docs/'+classname+'.html'
|
||||
classname+'.html'
|
||||
|
||||
outputPathFor = (relativePath) ->
|
||||
docsOutputDir = grunt.config.get('docsOutputDir')
|
||||
|
@ -98,7 +98,7 @@ module.exports = (grunt) ->
|
|||
# Parse guide Markdown
|
||||
|
||||
guides = []
|
||||
guidesPath = path.resolve(__dirname, '..', '..', 'docs', 'guides')
|
||||
guidesPath = path.resolve(__dirname, '..', '..', 'docs')
|
||||
fs.traverseTreeSync guidesPath, (file) ->
|
||||
if path.extname(file) is '.md'
|
||||
{html, meta} = marked(grunt.file.read(file))
|
||||
|
@ -220,29 +220,10 @@ module.exports = (grunt) ->
|
|||
val = val.replace(text, "<a href='#{url}'>#{label}</a>")
|
||||
val
|
||||
|
||||
# Copy non-documentation assets
|
||||
|
||||
docsPath = path.resolve(__dirname, '..', '..', 'docs')
|
||||
assets = []
|
||||
grunt.file.recurse docsPath, (abspath, root, subdir = "", filename) ->
|
||||
if path.extname(filename) in ['.png', '.jpg', '.ico', '.css']
|
||||
return if abspath.indexOf('/output/') isnt -1
|
||||
return if abspath.indexOf('/templates/') isnt -1
|
||||
destpath = path.join(docsOutputDir, subdir, filename)
|
||||
assets.push({abspath, destpath})
|
||||
|
||||
for asset in assets
|
||||
cp(asset.abspath, asset.destpath)
|
||||
|
||||
pages = []
|
||||
grunt.file.recurse docsPath, (abspath, root, subdir = "", filename) ->
|
||||
if path.extname(filename) in ['.html']
|
||||
return if abspath.indexOf('/output/') isnt -1
|
||||
return if abspath.indexOf('/templates/') isnt -1
|
||||
html = fs.readFileSync(abspath)
|
||||
destpath = path.join(docsOutputDir, subdir, filename)
|
||||
pages.push({html, destpath})
|
||||
# Render sidebar json
|
||||
|
||||
grunt.file.write(outputPathFor('sidebar.json'), JSON.stringify(sidebar, null, 2))
|
||||
|
||||
# Render Class Pages
|
||||
|
||||
classTemplatePath = path.join(templatesPath, 'class.html')
|
||||
|
@ -270,12 +251,5 @@ module.exports = (grunt) ->
|
|||
result = guideTemplate({name, meta, html, sidebar})
|
||||
grunt.file.write(outputPathFor(relativePathForGuide(filename)), result)
|
||||
|
||||
# Render main pages
|
||||
|
||||
pageTemplatePath = path.join(templatesPath, 'page.html')
|
||||
pageTemplate = Handlebars.compile(grunt.file.read(pageTemplatePath))
|
||||
for {html, destpath} in pages
|
||||
grunt.file.write(destpath, pageTemplate({html}))
|
||||
|
||||
# Remove temp cjsx output
|
||||
rm(outputPathFor("temp-cjsx"))
|
||||
|
|
|
@ -36,9 +36,9 @@ module.exports = (grunt) ->
|
|||
iconName = path.join(shareDir, 'resources', 'app', 'resources', 'nylas.png')
|
||||
|
||||
mkdir binDir
|
||||
# Note that `atom.sh` can't be renamed `nylas.sh` because `apm`
|
||||
# is currently hard-coded to call `atom.sh`
|
||||
cp 'atom.sh', path.join(binDir, 'nylas')
|
||||
# Note that `N1.sh` can't be renamed `nylas.sh` because `apm`
|
||||
# is currently hard-coded to call `N1.sh`
|
||||
cp 'N1.sh', path.join(binDir, 'nylas')
|
||||
rm shareDir
|
||||
mkdir path.dirname(shareDir)
|
||||
cp shellAppDir, shareDir
|
||||
|
|
|
@ -137,7 +137,7 @@ module.exports = (grunt) ->
|
|||
done = @async()
|
||||
testSucceeded = false
|
||||
testOutput = ""
|
||||
testProc = proc.spawn("./atom.sh", ["--test"])
|
||||
testProc = proc.spawn("./N1.sh", ["--test"])
|
||||
|
||||
testProc.stdout.on 'data', (data) ->
|
||||
str = data.toString()
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
module.exports = function(grunt) {
|
||||
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
connect: {
|
||||
example: {
|
||||
port: 1337,
|
||||
base: 'output'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks('grunt-connect');
|
||||
grunt.registerTask('default', 'connect:example');
|
||||
|
||||
};
|
6
docs/README.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
# N1 Documentation
|
||||
|
||||
For the full documentation (which includes these guides), go to:
|
||||
https://nylas.github.io/N1/docs/
|
||||
|
||||
To see annotated package examples, go to: https://nylas.github.io/N1/examples/
|
|
@ -1,132 +0,0 @@
|
|||
/*
|
||||
* Gridism
|
||||
* A simple, responsive, and handy CSS grid by @cobyism
|
||||
* https://github.com/cobyism/gridism
|
||||
*/
|
||||
|
||||
/* Preserve some sanity */
|
||||
.grid,
|
||||
.unit {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* Set up some rules to govern the grid */
|
||||
.grid {
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
.grid .unit {
|
||||
float: left;
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
/* This ensures the outer gutters are equal to the (doubled) inner gutters. */
|
||||
.grid .unit:first-child { padding-left: 20px; }
|
||||
.grid .unit:last-child { padding-right: 20px; }
|
||||
|
||||
/* Nested grids already have padding though, so let’s nuke it */
|
||||
.unit .unit:first-child { padding-left: 0; }
|
||||
.unit .unit:last-child { padding-right: 0; }
|
||||
.unit .grid:first-child > .unit { padding-top: 0; }
|
||||
.unit .grid:last-child > .unit { padding-bottom: 0; }
|
||||
|
||||
/* Let people nuke the gutters/padding completely in a couple of ways */
|
||||
.no-gutters .unit,
|
||||
.unit.no-gutters {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
/* Wrapping at a maximum width is optional */
|
||||
.wrap .grid,
|
||||
.grid.wrap {
|
||||
max-width: 978px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* Width classes also have shorthand versions numbered as fractions
|
||||
* For example: for a grid unit 1/3 (one third) of the parent width,
|
||||
* simply apply class="w-1-3" to the element. */
|
||||
.grid .whole, .grid .w-1-1 { width: 100%; }
|
||||
.grid .half, .grid .w-1-2 { width: 50%; }
|
||||
.grid .one-third, .grid .w-1-3 { width: 33.3332%; }
|
||||
.grid .two-thirds, .grid .w-2-3 { width: 66.6665%; }
|
||||
.grid .one-quarter,
|
||||
.grid .one-fourth, .grid .w-1-4 { width: 25%; }
|
||||
.grid .three-quarters,
|
||||
.grid .three-fourths, .grid .w-3-4 { width: 75%; }
|
||||
.grid .one-fifth, .grid .w-1-5 { width: 20%; }
|
||||
.grid .two-fifths, .grid .w-2-5 { width: 40%; }
|
||||
.grid .three-fifths, .grid .w-3-5 { width: 60%; }
|
||||
.grid .four-fifths, .grid .w-4-5 { width: 80%; }
|
||||
.grid .golden-small, .grid .w-g-s { width: 38.2716%; } /* Golden section: smaller piece */
|
||||
.grid .golden-large, .grid .w-g-l { width: 61.7283%; } /* Golden section: larger piece */
|
||||
|
||||
/* Clearfix after every .grid */
|
||||
.grid {
|
||||
*zoom: 1;
|
||||
}
|
||||
.grid:before, .grid:after {
|
||||
display: table;
|
||||
content: "";
|
||||
line-height: 0;
|
||||
}
|
||||
.grid:after {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* Utility classes */
|
||||
.align-center { text-align: center; }
|
||||
.align-left { text-align: left; }
|
||||
.align-right { text-align: right; }
|
||||
.pull-left { float: left; }
|
||||
.pull-right { float: right; }
|
||||
|
||||
/* A property for a better rendering of images in units: in
|
||||
this way bigger pictures are just resized if the unit
|
||||
becomes smaller */
|
||||
.unit img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* Hide elements using this class by default */
|
||||
.only-on-mobiles {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Responsive Stuff */
|
||||
@media screen and (max-width: 568px) {
|
||||
/* Stack anything that isn’t full-width on smaller screens
|
||||
and doesn't provide the no-stacking-on-mobiles class */
|
||||
.grid:not(.no-stacking-on-mobiles) > .unit {
|
||||
width: 100% !important;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
.unit .grid .unit {
|
||||
padding-left: 0px;
|
||||
padding-right: 0px;
|
||||
}
|
||||
|
||||
/* Sometimes, you just want to be different on small screens */
|
||||
.center-on-mobiles {
|
||||
text-align: center !important;
|
||||
}
|
||||
.hide-on-mobiles {
|
||||
display: none !important;
|
||||
}
|
||||
.only-on-mobiles {
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Expand the wrap a bit further on larger screens */
|
||||
@media screen and (min-width: 1180px) {
|
||||
.wider .grid,
|
||||
.grid.wider {
|
||||
max-width: 1180px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
|
@ -1,355 +0,0 @@
|
|||
|
||||
@font-face {
|
||||
font-family: 'FaktPro';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('FaktPro-Blond'), url('fonts/FaktPro-Blond.ttf'), local('Helvetica Neue'), local('Helvetica');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'FaktPro';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
src: local('FaktPro-Medium'), url('fonts/FaktPro-Medium.ttf'), local('Helvetica Neue'), local('Helvetica');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'FaktPro';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
src: local('FaktPro-SemiBold'), url('fonts/FaktPro-SemiBold.ttf'), local('Helvetica Neue'), local('Helvetica');
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
p,
|
||||
blockquote {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
strong {
|
||||
color: #404040;
|
||||
}
|
||||
body {
|
||||
font-family: 'FaktPro';
|
||||
font-weight: normal;
|
||||
font-size: 16px;
|
||||
line-height: 1.5em;
|
||||
color: #737373;
|
||||
background-color: white;
|
||||
margin: 0;
|
||||
}
|
||||
table {
|
||||
margin: 10px 0 15px 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
td,th {
|
||||
vertical-align: top;
|
||||
border: 1px solid #ddd;
|
||||
padding: 10px;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
th {
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0069d6;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover {
|
||||
color: #0050a3;
|
||||
text-decoration: none;
|
||||
}
|
||||
a img {
|
||||
border: none;
|
||||
}
|
||||
p {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
color: #404040;
|
||||
line-height: 36px;
|
||||
}
|
||||
h1 {
|
||||
font-size: 40px;
|
||||
margin-top:30px;
|
||||
}
|
||||
h2 {
|
||||
font-size: 30px;
|
||||
margin-top:30px;
|
||||
}
|
||||
h3 {
|
||||
font-size: 24px;
|
||||
margin-top:30px;
|
||||
}
|
||||
h4 {
|
||||
font-size: 18px;
|
||||
margin-top:20px;
|
||||
}
|
||||
h5 {
|
||||
font-size: 16px;
|
||||
}
|
||||
h6 {
|
||||
font-size: 14px;
|
||||
}
|
||||
hr {
|
||||
margin: 0 0 19px;
|
||||
border: 0;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
h1:first-child,
|
||||
h2:first-child,
|
||||
h3:first-child,
|
||||
h4:first-child,
|
||||
h5:first-child,
|
||||
h6:first-child {
|
||||
margin-top:0;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
padding: 13px 13px 21px 15px;
|
||||
margin-bottom: 18px;
|
||||
font-family:georgia,serif;
|
||||
font-style: italic;
|
||||
border-left: 5px solid #C7DDDB;
|
||||
background-color: #EAF7F6;
|
||||
}
|
||||
blockquote p {
|
||||
font-size: 15px;
|
||||
font-weight: normal;
|
||||
margin-bottom: 0;
|
||||
font-style: italic;
|
||||
}
|
||||
blockquote code {
|
||||
background-color:white;
|
||||
}
|
||||
img {
|
||||
max-width:100%;
|
||||
}
|
||||
code, pre {
|
||||
font-family: Monaco, Andale Mono, Courier New, monospace;
|
||||
}
|
||||
code {
|
||||
color: rgba(0, 0, 0, 0.75);
|
||||
background-color: #EAF7F6;
|
||||
padding: 1px 3px;
|
||||
font-size: 14px;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
pre {
|
||||
margin: 0 0 18px;
|
||||
line-height: 18px;
|
||||
font-size: 14px;
|
||||
border: 1px solid #d9d9d9;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
pre code {
|
||||
font-size: 13px;
|
||||
background-color: white;
|
||||
padding: 0;
|
||||
display: block;
|
||||
padding: 14px;
|
||||
}
|
||||
sup {
|
||||
font-size: 0.83em;
|
||||
vertical-align: super;
|
||||
line-height: 0;
|
||||
}
|
||||
* {
|
||||
-webkit-print-color-adjust: exact;
|
||||
}
|
||||
|
||||
.link {
|
||||
width:18px;
|
||||
height:18px;
|
||||
display:inline-block;
|
||||
vertical-align:sub;
|
||||
opacity:0.4;
|
||||
background:url(../images/link.png) top left;
|
||||
background-size:cover;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1020px) {
|
||||
.container {
|
||||
width: 960px;
|
||||
margin:auto;
|
||||
}
|
||||
}
|
||||
@media print {
|
||||
body,code,pre code,h1,h2,h3,h4,h5,h6 {
|
||||
color: black;
|
||||
}
|
||||
table, pre {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
}
|
||||
|
||||
#header {
|
||||
padding-top:40px;
|
||||
padding-bottom:20px;
|
||||
background-color:#eee;
|
||||
margin-bottom:40px;
|
||||
}
|
||||
#footer {
|
||||
margin-top:50px;
|
||||
padding-top:30px;
|
||||
padding-bottom:30px;
|
||||
background-color:#eee;
|
||||
clear:both;
|
||||
}
|
||||
|
||||
#header .logo,
|
||||
#footer .logo {
|
||||
float:left;
|
||||
width:50px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
#header .title,
|
||||
#footer .title {
|
||||
line-height: 22px;
|
||||
font-size:20px;
|
||||
font-weight:600;
|
||||
padding-top:6px;
|
||||
}
|
||||
#header .small,
|
||||
#footer .small {
|
||||
font-weight:300;
|
||||
font-size:0.9em;
|
||||
}
|
||||
|
||||
#main {
|
||||
margin-left:290px;
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
float:left;
|
||||
position:static;
|
||||
width:250px;
|
||||
}
|
||||
|
||||
#sidebar .heading {
|
||||
color:#404040;
|
||||
line-height:28px;
|
||||
font-size:16px;
|
||||
font-weight:bold;
|
||||
}
|
||||
#sidebar ul .heading {
|
||||
line-height:22px;
|
||||
font-size:14px;
|
||||
padding-top:6px;
|
||||
}
|
||||
|
||||
#sidebar ul {
|
||||
margin-top:0;
|
||||
padding-left:15px;
|
||||
}
|
||||
#sidebar ul li {
|
||||
list-style-type:none;
|
||||
}
|
||||
#sidebar ul li a {
|
||||
color:#404040;
|
||||
font-size:14px;
|
||||
line-height:1.8em;
|
||||
}
|
||||
|
||||
.page-title {
|
||||
font-weight:200;
|
||||
font-size:40px;
|
||||
color:#404040;
|
||||
padding-bottom:40px;
|
||||
padding-top:30px;
|
||||
}
|
||||
.page-title .extends {
|
||||
font-style: italic;
|
||||
font-size:0.7em;
|
||||
color:#ccc;
|
||||
}
|
||||
|
||||
/* It's not possible to make H3+ in Markdown parsed out of source code, because
|
||||
Coffeescript uses the ### as the comment block character. Allow the use of #
|
||||
and ##, but convert these h1 and h2 elements to smaller headings. */
|
||||
.markdown-from-sourecode h1,
|
||||
.markdown-from-sourecode h2 {
|
||||
font-size: 24px;
|
||||
margin-top:30px;
|
||||
}
|
||||
|
||||
.article img {
|
||||
margin-top:18px;
|
||||
margin-bottom:18px;
|
||||
}
|
||||
|
||||
.article .center-logo {
|
||||
width:270px;
|
||||
height:270px;
|
||||
margin:auto;
|
||||
margin-top:20px;
|
||||
display:block;
|
||||
border:0;
|
||||
}
|
||||
|
||||
.function-name {
|
||||
border-bottom:1px solid #ccc;
|
||||
padding-top:10px;
|
||||
}
|
||||
.function-name .arg {
|
||||
color: #999;
|
||||
}
|
||||
.function-name .arg:after {
|
||||
content: ", ";
|
||||
color: #999;
|
||||
}
|
||||
.function-name .arg:last-child:after {
|
||||
content: "";
|
||||
}
|
||||
.function-description h1,
|
||||
.function-description h2,
|
||||
.function-description h3,
|
||||
.function-description h4,
|
||||
.function-description h5 {
|
||||
font-size: 16px;
|
||||
line-height:1.5em;
|
||||
margin:0;
|
||||
}
|
||||
|
||||
table th {
|
||||
background-color: #EAF7F6;
|
||||
text-align:left;
|
||||
}
|
||||
table td {
|
||||
position:relative;
|
||||
}
|
||||
table.arguments {
|
||||
width:100%;
|
||||
}
|
||||
table.arguments p {
|
||||
margin-bottom:0;
|
||||
}
|
||||
table.arguments .optional {
|
||||
background-color: #EAF7F6;
|
||||
position:absolute;
|
||||
top:0px;
|
||||
right:0px;
|
||||
padding-right: 4px;
|
||||
padding-left: 4px;
|
||||
font-weight: 500;
|
||||
font-size: 11px;
|
||||
line-height:16px;
|
||||
}
|
||||
|
||||
table.no-border td {
|
||||
border:0;
|
||||
}
|
|
@ -1,93 +0,0 @@
|
|||
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
|
||||
|
||||
/* Tomorrow Comment */
|
||||
.hljs-comment {
|
||||
color: #8e908c;
|
||||
}
|
||||
|
||||
/* Tomorrow Red */
|
||||
.hljs-variable,
|
||||
.hljs-attribute,
|
||||
.hljs-tag,
|
||||
.hljs-regexp,
|
||||
.ruby .hljs-constant,
|
||||
.xml .hljs-tag .hljs-title,
|
||||
.xml .hljs-pi,
|
||||
.xml .hljs-doctype,
|
||||
.html .hljs-doctype,
|
||||
.css .hljs-id,
|
||||
.css .hljs-class,
|
||||
.css .hljs-pseudo {
|
||||
color: #c82829;
|
||||
}
|
||||
|
||||
/* Tomorrow Orange */
|
||||
.hljs-number,
|
||||
.hljs-preprocessor,
|
||||
.hljs-pragma,
|
||||
.hljs-built_in,
|
||||
.hljs-literal,
|
||||
.hljs-params,
|
||||
.hljs-constant {
|
||||
color: #f5871f;
|
||||
}
|
||||
|
||||
/* Tomorrow Yellow */
|
||||
.ruby .hljs-class .hljs-title,
|
||||
.css .hljs-rule .hljs-attribute {
|
||||
color: #eab700;
|
||||
}
|
||||
|
||||
/* Tomorrow Green */
|
||||
.hljs-string,
|
||||
.hljs-value,
|
||||
.hljs-inheritance,
|
||||
.hljs-header,
|
||||
.hljs-name,
|
||||
.ruby .hljs-symbol,
|
||||
.xml .hljs-cdata {
|
||||
color: #718c00;
|
||||
}
|
||||
|
||||
/* Tomorrow Aqua */
|
||||
.hljs-title,
|
||||
.css .hljs-hexcolor {
|
||||
color: #3e999f;
|
||||
}
|
||||
|
||||
/* Tomorrow Blue */
|
||||
.hljs-function,
|
||||
.python .hljs-decorator,
|
||||
.python .hljs-title,
|
||||
.ruby .hljs-function .hljs-title,
|
||||
.ruby .hljs-title .hljs-keyword,
|
||||
.perl .hljs-sub,
|
||||
.javascript .hljs-title,
|
||||
.coffeescript .hljs-title {
|
||||
color: #4271ae;
|
||||
}
|
||||
|
||||
/* Tomorrow Purple */
|
||||
.hljs-keyword,
|
||||
.javascript .hljs-function {
|
||||
color: #8959a8;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
background: white;
|
||||
color: #4d4d4c;
|
||||
padding: 0.5em;
|
||||
-webkit-text-size-adjust: none;
|
||||
}
|
||||
|
||||
.coffeescript .javascript,
|
||||
.javascript .xml,
|
||||
.tex .hljs-formula,
|
||||
.xml .javascript,
|
||||
.xml .vbscript,
|
||||
.xml .css,
|
||||
.xml .hljs-cdata {
|
||||
opacity: 0.5;
|
||||
}
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 264 KiB After Width: | Height: | Size: 264 KiB |
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 200 KiB After Width: | Height: | Size: 200 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 168 KiB After Width: | Height: | Size: 168 KiB |
Before Width: | Height: | Size: 608 B After Width: | Height: | Size: 608 B |
Before Width: | Height: | Size: 200 KiB |
Before Width: | Height: | Size: 200 KiB After Width: | Height: | Size: 200 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 77 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 545 KiB After Width: | Height: | Size: 545 KiB |
|
@ -1,68 +0,0 @@
|
|||
---
|
||||
Title: Welcome
|
||||
TitleHidden: true
|
||||
Section: Getting Started
|
||||
Order: 1
|
||||
---
|
||||
|
||||
<img src="images/edgehill.png" class="center-logo"/>
|
||||
<h2 style="text-align:center;">Nylas Package API</h2>
|
||||
<p style="text-align:center; margin:auto; margin-bottom:60px;">
|
||||
The Nylas Package API allows you to create powerful extensions to N1. The client is built on top of Atom Shell and runs on Mac OS X, Windows, and Linux. It exposes rich APIs for working with the mail, contacts, and calendar and a robust local cache layer. Your packages can leverage NodeJS and other web technologies to create innovative new experiences.
|
||||
</p>
|
||||
|
||||
<table class="no-border">
|
||||
<tr><td style="width:50%;">
|
||||
|
||||
<h4>Installing N1</h4>
|
||||
<p>
|
||||
N1 is available for Mac, Windows, and Linux. Download the latest build for your platform below:
|
||||
</p>
|
||||
<ul>
|
||||
<li><a href="https://edgehill.nylas.com/download?platform=darwin">Mac OS X</a></li>
|
||||
<li><a href="https://edgehill.nylas.com/download?platform=linux">Linux</a></li>
|
||||
<li><a href="https://edgehill.nylas.com/download?platform=win32">Windows</a></li>
|
||||
</ul>
|
||||
|
||||
</td><td style="width:50%;">
|
||||
|
||||
<h4>Package Architecture</h4>
|
||||
<p>
|
||||
Packages lie at the heart of N1. Each part of the core experience is a separate package that uses the Nilas Package API to add functionality to the client. Learn more about packages and create your first package.
|
||||
</p>
|
||||
<ul>
|
||||
<li><a href="./PackageOverview.html">Package Overview</a></li>
|
||||
</ul>
|
||||
|
||||
</td></tr>
|
||||
<tr><td style="width:50%; vertical-align:top;">
|
||||
|
||||
<h4>Dive Deeper</h4>
|
||||
|
||||
<ul>
|
||||
<li><a href="./Architecture.html">Application Architecture</a></li>
|
||||
<li><a href="./React.html">React & Component Injection</a></li>
|
||||
<li><a href="./InterfaceConcepts.html">Core Interface Concepts</a></li>
|
||||
<li><a href="./Database.html">Accessing the Database</a></li>
|
||||
<li><a href="./DraftStoreExtensions.html">Draft Store Extensions</a></li>
|
||||
</ul>
|
||||
|
||||
</td><td style="width:50%; vertical-align:top;">
|
||||
|
||||
<h4>Debugging Packages</h4>
|
||||
<p>
|
||||
N1 is built on top of Electron, which runs the latest version of Chromium. Learn how to access debug tools in Electron and use our Developer Tools Extensions:
|
||||
</p>
|
||||
<ul>
|
||||
<li><a href="./Debugging.html">Debugging in Nylas</a></li>
|
||||
</ul>
|
||||
|
||||
</td></tr>
|
||||
<tr colspan="2"><td>
|
||||
<h4>Questions?</h4>
|
||||
<p>
|
||||
Need help? Check out the [FAQ](./FAQ.html) or post a question in the [N1 Facebook Group](facebook.com/groups/nylas.mail)
|
||||
</p>
|
||||
|
||||
</td></tr>
|
||||
</table>
|
22
docs/templates/_footer.html
vendored
|
@ -1,22 +0,0 @@
|
|||
</div>
|
||||
|
||||
<div id="footer">
|
||||
<div class="container">
|
||||
<img src="images/edgehill.png" class="logo" />
|
||||
<div class="small">N1 Developer Preview<br><em>© 2014-2015 Nylas, Inc.</em></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-60022049-2', 'auto');
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
21
docs/templates/_header.html
vendored
|
@ -1,21 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>N1 — {{name}}</title>
|
||||
<meta property="og:title" content="An extensible mail client built on the modern web | N1">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:image" content="https://nylas.github.io/N1/images/meta_share.png">
|
||||
<link rel="shortcut icon" href="/N1/images/favicon.ico">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<link rel="stylesheet" type="text/css" href="/N1/css/main.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="/N1/css/tomorrow.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<div class="container">
|
||||
<img src="/images/edgehill.png" class="logo" />
|
||||
<div class="title">N1<div class="small">Developer Preview</div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
1
docs/templates/_sidebar.html
vendored
|
@ -1,3 +1,4 @@
|
|||
aside
|
||||
{{#each sidebar.sections}}
|
||||
{{>_sidebarSection}}
|
||||
{{/each}}
|
||||
|
|
74
docs/templates/class.html
vendored
|
@ -1,57 +1,45 @@
|
|||
{{>_header}}
|
||||
---
|
||||
layout: docs
|
||||
title: {{name}}
|
||||
---
|
||||
|
||||
<div class="page-title">
|
||||
{{name}}
|
||||
{{#if documentation.superClass}}
|
||||
<span class="extends">extends {{documentation.superClass}}</span>
|
||||
{{/if}}
|
||||
<h2>Summary</h2>
|
||||
|
||||
<div class="markdown-from-sourecode">
|
||||
<p>{{{documentation.description}}}</p>
|
||||
</div>
|
||||
|
||||
<div id="sidebar">
|
||||
{{>_sidebar}}
|
||||
</div>
|
||||
|
||||
<div id="main">
|
||||
<h2>Summary</h2>
|
||||
|
||||
<div class="markdown-from-sourecode">
|
||||
<p>{{{documentation.description}}}</p>
|
||||
</div>
|
||||
|
||||
<ul>
|
||||
{{#each documentation.sections}}
|
||||
<li><a href="#{{name}}">{{name}}</a></li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
<ul>
|
||||
{{#each documentation.sections}}
|
||||
<li><a href="#{{name}}">{{name}}</a></li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
|
||||
|
||||
{{#if documentation.classProperties.length}}
|
||||
<h3>Class Properties</h3>
|
||||
{{#if documentation.classProperties.length}}
|
||||
<h3>Class Properties</h3>
|
||||
|
||||
{{#each documentation.classProperties}}
|
||||
{{>_property}}
|
||||
{{/each}}
|
||||
{{#each documentation.classProperties}}
|
||||
{{>_property}}
|
||||
{{/each}}
|
||||
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#if documentation.classMethods.length}}
|
||||
<h3>Class Methods</h3>
|
||||
{{#if documentation.classMethods.length}}
|
||||
<h3>Class Methods</h3>
|
||||
|
||||
{{#each documentation.classMethods}}
|
||||
{{>_function}}
|
||||
{{/each}}
|
||||
{{#each documentation.classMethods}}
|
||||
{{>_function}}
|
||||
{{/each}}
|
||||
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{#if documentation.instanceMethods.length}}
|
||||
<h3>Instance Methods</h3>
|
||||
{{#if documentation.instanceMethods.length}}
|
||||
<h3>Instance Methods</h3>
|
||||
|
||||
{{#each documentation.instanceMethods}}
|
||||
{{>_function}}
|
||||
{{/each}}
|
||||
{{#each documentation.instanceMethods}}
|
||||
{{>_function}}
|
||||
{{/each}}
|
||||
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
{{>_footer}}
|
||||
{{/if}}
|
||||
|
|
18
docs/templates/guide.html
vendored
|
@ -1,15 +1,5 @@
|
|||
{{>_header}}
|
||||
|
||||
{{#if meta.TitleHidden}}
|
||||
{{else}}
|
||||
<div class="page-title">{{meta.title}}</div>
|
||||
{{/if}}
|
||||
|
||||
<div id="sidebar">
|
||||
{{>_sidebar}}
|
||||
</div>
|
||||
<div id="main" class="article">
|
||||
---
|
||||
layout: docs
|
||||
title: {{meta.title}}
|
||||
---
|
||||
{{{html}}}
|
||||
</div>
|
||||
|
||||
{{>_footer}}
|
||||
|
|
15
docs/templates/page.html
vendored
|
@ -1,15 +0,0 @@
|
|||
{{>_header}}
|
||||
|
||||
{{#if meta.TitleHidden}}
|
||||
{{else}}
|
||||
<div class="page-title">{{meta.title}}</div>
|
||||
{{/if}}
|
||||
|
||||
<div id="sidebar">
|
||||
{{>_sidebar}}
|
||||
</div>
|
||||
<div id="main" class="article">
|
||||
{{{html}}}
|
||||
</div>
|
||||
|
||||
{{>_footer}}
|
|
@ -1,2 +1,4 @@
|
|||
# Config, Saved State, & defaults
|
||||
These are the default Nylas configs
|
||||
# Default Config
|
||||
|
||||
These are the default Nylas configs. This folder on setup is copied to
|
||||
`~/.nylas` on unix machines.
|
||||
|
|
|
@ -3,11 +3,8 @@
|
|||
Here you will find well-annotated samples to showcase how to build
|
||||
packages in N1.
|
||||
|
||||
**See more on https://nylas.github.io/N1/examples/**
|
||||
|
||||
## Getting Started
|
||||
|
||||
1. Each package is in its own folder. To try out a package, copy the folder
|
||||
into `$HOME/.nylas/packages`, run `apm install`, and restart N1.
|
||||
2. The entry point of each package is the `activate` method of
|
||||
`lib/main.cjsx`. Most packages do nothing but register themselves with
|
||||
the `ComponentRegistry`
|
||||
3. Read the annotated source code of the package files.
|
||||
To get started, follow the getting started guides here: https://nylas.github.io/N1/docs/
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
export EDGEHILL_ACCESS_TOKEN=$BUILD_ATOM_LINUX_ACCESS_TOKEN
|
||||
|
||||
if [ -d /usr/local/share/nodenv ]; then
|
||||
export NODENV_ROOT=/usr/local/share/nodenv
|
||||
export PATH=/usr/local/share/nodenv/bin:/usr/local/share/nodenv/shims:$PATH
|
||||
export NODENV_VERSION="v0.10.21"
|
||||
fi
|
||||
|
||||
script/cibuild
|
|
@ -1,12 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
docker build -t atom-rpm .
|
||||
docker run \
|
||||
--rm \
|
||||
--env JANKY_SHA1="$JANKY_SHA1" \
|
||||
--env JANKY_BRANCH="$JANKY_BRANCH" \
|
||||
--env EDGEHILL_ACCESS_TOKEN="$BUILD_ATOM_RPM_ACCESS_TOKEN" \
|
||||
atom-rpm /atom/script/rpmbuild
|
||||
docker rmi atom-rpm
|
|
@ -13,8 +13,8 @@ rpmdev-setuptree
|
|||
|
||||
cp -r $BUILD_DIRECTORY/Nylas/* $RPM_BUILD_ROOT/BUILD
|
||||
cp $SPEC_FILE $RPM_BUILD_ROOT/SPECS
|
||||
cp ./atom.sh $RPM_BUILD_ROOT/BUILD
|
||||
cp $RPM_BUILD_ROOT/BUILD/atom.sh $RPM_BUILD_ROOT/BUILD/nylas
|
||||
cp ./N1.sh $RPM_BUILD_ROOT/BUILD
|
||||
cp $RPM_BUILD_ROOT/BUILD/N1.sh $RPM_BUILD_ROOT/BUILD/nylas
|
||||
cp $DESKTOP_FILE $RPM_BUILD_ROOT/BUILD
|
||||
|
||||
rpmbuild -ba $SPEC_FILE
|
||||
|
|
|
@ -52,7 +52,7 @@ start = ->
|
|||
Application.open(args)
|
||||
console.log("App load time: #{Date.now() - global.shellStartTime}ms") unless args.test
|
||||
|
||||
global.devResourcePath = process.env.EDGEHILL_PATH ? process.cwd()
|
||||
global.devResourcePath = process.env.N1_PATH ? process.cwd()
|
||||
# Normalize to make sure drive letter case is consistent on Windows
|
||||
global.devResourcePath = path.normalize(global.devResourcePath) if global.devResourcePath
|
||||
|
||||
|
@ -90,8 +90,8 @@ parseCommandLine = ->
|
|||
opened or a new window if it hasn't.
|
||||
|
||||
Environment Variables:
|
||||
EDGEHILL_PATH The path from which Atom loads source code in dev mode.
|
||||
Defaults to `cwd`.
|
||||
N1_PATH The path from which Atom loads source code in dev mode.
|
||||
Defaults to `cwd`.
|
||||
"""
|
||||
options.alias('d', 'dev').boolean('d').describe('d', 'Run in development mode.')
|
||||
options.alias('f', 'foreground').boolean('f').describe('f', 'Keep the browser process in the foreground.')
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
});
|
||||
};
|
||||
|
||||
global.devResourcePath = (ref = process.env.EDGEHILL_PATH) != null ? ref : process.cwd();
|
||||
global.devResourcePath = (ref = process.env.N1_PATH) != null ? ref : process.cwd();
|
||||
|
||||
if (global.devResourcePath) {
|
||||
global.devResourcePath = path.normalize(global.devResourcePath);
|
||||
|
@ -103,7 +103,7 @@
|
|||
var args, devMode, executedFrom, logFile, newWindow, options, packageDirectoryPath, packageManifest, packageManifestPath, pathsToOpen, pidToKillWhenClosed, resourcePath, safeMode, specDirectory, specFilePattern, specsOnCommandLine, test, version;
|
||||
version = app.getVersion();
|
||||
options = optimist(process.argv.slice(1));
|
||||
options.usage("Atom Editor v" + version + "\n\nUsage: atom [options] [path ...]\n\nOne or more paths to files or folders to open may be specified.\n\nFile paths will open in the current window.\n\nFolder paths will open in an existing window if that folder has already been\nopened or a new window if it hasn't.\n\nEnvironment Variables:\nEDGEHILL_PATH The path from which Atom loads source code in dev mode.\n Defaults to `cwd`.");
|
||||
options.usage("Atom Editor v" + version + "\n\nUsage: atom [options] [path ...]\n\nOne or more paths to files or folders to open may be specified.\n\nFile paths will open in the current window.\n\nFolder paths will open in an existing window if that folder has already been\nopened or a new window if it hasn't.\n\nEnvironment Variables:\nN1_PATH The path from which Atom loads source code in dev mode.\n Defaults to `cwd`.");
|
||||
options.alias('d', 'dev').boolean('d').describe('d', 'Run in development mode.');
|
||||
options.alias('f', 'foreground').boolean('f').describe('f', 'Keep the browser process in the foreground.');
|
||||
options.alias('h', 'help').boolean('h').describe('h', 'Print this usage message.');
|
||||
|
|
|
@ -91,7 +91,7 @@ addCommandsToPath = (callback) ->
|
|||
atomCommand = "@echo off\r\n\"%~dp0\\#{relativeAtomPath}\" %*"
|
||||
|
||||
atomShCommandPath = path.join(binFolder, 'atom')
|
||||
relativeAtomShPath = path.relative(binFolder, path.join(appFolder, 'resources', 'cli', 'atom.sh'))
|
||||
relativeAtomShPath = path.relative(binFolder, path.join(appFolder, 'resources', 'cli', 'N1.sh'))
|
||||
atomShCommand = "#!/bin/sh\r\n\"$0/../#{relativeAtomShPath.replace(/\\/g, '/')}\" \"$@\""
|
||||
|
||||
apmCommandPath = path.join(binFolder, 'apm.cmd')
|
||||
|
|
|
@ -50,7 +50,7 @@ module.exports =
|
|||
detailedMessage: "The shell commands `atom` and `apm` are installed."
|
||||
|
||||
installAtomCommand: (resourcePath, askForPrivilege, callback) ->
|
||||
commandPath = path.join(resourcePath, 'atom.sh')
|
||||
commandPath = path.join(resourcePath, 'N1.sh')
|
||||
@createSymlink commandPath, askForPrivilege, callback
|
||||
|
||||
installApmCommand: (resourcePath, askForPrivilege, callback) ->
|
||||
|
|