Mailspring/build
Evan Morikawa 74e21bce16 feat(tasks): add Create, Update, Destroy tasks plus spec & lint fixes
Summary:
1. **Generic CUD Tasks**: There is now a generic `CreateModelTask`,
`UpdateModelTask`, and `DestroyModelTask`. These can either be used as-is
or trivially overridden to easily update simple objects. Hopefully all of
the boilerplate rollback, error handling, and undo logic won't have to be
re-duplicated on every task. There are also tests for these tasks. We use
them to perform mutating actions on `Metadata` objects.

1. **Failing on Promise Rejects**: Turns out that if a Promise rejected
due to an error or `Promise.reject` we were ignoring it and letting tests
pass. Now, tests will Fail if any unhandled promise rejects. This
uncovered a variety of errors throughout the test suite that had to be
fixed. The most significant one was during the `theme-manager` tests when
all packages (and their stores with async DB requests) was loaded. Long
after the `theme-manager` specs finished, those DB requests were
(somtimes) silently failing.

1. **Globally stub `DatabaseStore._query`**: All tests shouldn't actually
make queries on the database. Furthremore, the `inTransaction` block
doesn't resolve at all unless `_query` is stubbed. Instead of manually
remembering to do this in every test that touches the DB, it's now mocked
in `spec_helper`. This broke a handful of tests that needed to be manually
fixed.

1. **ESLint Fixes**: Some minor fixes to the linter config to prevent
yelling about minor ES6 things and ensuring we have the correct parser.

Test Plan: new tests

Reviewers: bengotow, juan, drew

Differential Revision: https://phab.nylas.com/D2419

Remove cloudState and N1-Send-Later
2016-01-15 15:16:21 -05:00
..
config feat(tasks): add Create, Update, Destroy tasks plus spec & lint fixes 2016-01-15 15:16:21 -05:00
resources build(linux): Ensure that target files are not group writable 2016-01-13 16:09:53 -08:00
tasks set the ContentType when uploading packages to S3. 2016-01-13 11:12:39 -08:00
Gruntfile.coffee Add 'default' tasks 2016-01-06 15:55:14 -08:00
package.json fix(task): spec task uses Promise 2015-11-26 13:03:44 -08:00
README.md Adding node version information to build/README.md 2015-10-05 23:43:33 -07:00
run-build-and-send-screenshot.scpt fix(build-flow): Slow down the script - jenkins is slow. 2015-08-18 18:19:17 -07:00

N1 Build Environment

Node version 0.10.x (Due to the version of electron currently used.)

N1 Building and Tasks

This folder contains tasks to create production builds of N1

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.

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