Skip to content

Commit

Permalink
Move neon-cli files into cli subdirectory, and restore temporaril…
Browse files Browse the repository at this point in the history
…y-moved `neon` files back to project root.
  • Loading branch information
dherman committed Sep 18, 2017
1 parent 2d80984 commit acc6411
Show file tree
Hide file tree
Showing 133 changed files with 642 additions and 642 deletions.
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
target
Cargo.lock
**/*~
**/node_modules
**/.DS_Store
/node_modules/
/dist/
**/build
**/index.node
**/artifacts.json
**/package-lock.json
npm-debug.log
56 changes: 52 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,52 @@
language: node_js
node_js:
- '4'
- '5'
language: rust
dist: trusty

rust:
- stable
- beta
- nightly

env:
matrix:
- TRAVIS_NODE_VERSION="8"
- TRAVIS_NODE_VERSION="6"
- TRAVIS_NODE_VERSION="4"
global:
- secure: mO6uooJGRkDISBZbTq0zvjOfjQ6BeclkxVZN3XWaXrZ/4KjPi7/fRzkm9c8brPe7LWnD4bQ9Bhp7/I6+SVRlvw+uGXNhBiiIyl95jp9s9mOEN+8V7TyShIHEYjbVJf/EGiv5Rz7ni9cNG6iBHcxy5ehycodPtVdAn/VKw31Og/JNWFTu6OzaDZL6gsFIk7VEnHUHgGtl4/iPPdPgAN18oxWbf0CjaknFxXaQiwJXuevd+fuZU16HygBn2Kmj7gqbAKyG8T6wJ1LAQpTkIduXAcgW/PJnj+Stzu48GRVoWoqMQ9Ksk2oSX70fxksC3U3SH4tIQW1+68fXZz4Y0I6b7LkwxovRxkcE4rgoU15xxJuMjxXlQ/csupwhpnBdHhh+Fmjsr0n5KFFLCI7m04ZqAn7+xx9g2NhyuPmO7/ETW24XV9fRy7IywcqR8UgLmftI36r0nV5iO500t4o13DJ0hBTIUgX6KVenbr7v68WO+M/XSRU81RPGjQKsAFM60EpCtn36uCLAZbKyxQi1kYk6UFJLfb/bfrvSS6dzUQ7fEcNRekLMn8Fo4CKAmYCJ70tvhyx/EN0HrIpCfIYedMTLYf11ZQ/bKWcHE4GzU77cRgNwBYLsY6tFjchFukyK14F6jWgpqF81g0yzG0pRJRxZqrtwEI63Db/eLidGctmcEyQ=

before_install:
- source $HOME/.nvm/nvm.sh
- nvm install ${TRAVIS_NODE_VERSION}
- nvm use ${TRAVIS_NODE_VERSION}

addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8

script: |
cd tests/ &&
npm test &&
if [[ "$TRAVIS_RUST_VERSION" == nightly* ]]; then
cd ../compile_tests/ &&
cargo test
fi
jobs:
include:
- stage: docs
before_install: skip
before_script:
- export PATH=$HOME/.local/bin:$PATH
- pip install ghp-import --user $(whoami)
script: |
if [[ $TRAVIS_BRANCH=master && $TRAVIS_PULL_REQUEST=false && $TRAVIS_COMMIT_MESSAGE =~ %travis:docs ]]; then
echo "Generating API docs..." &&
cargo doc &&
echo "<meta http-equiv=refresh content=0;url=neon/index.html>" > target/doc/index.html &&
echo "Deploying API docs..." &&
ghp-import -n target/doc &&
git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
fi
File renamed without changes.
File renamed without changes.
File renamed without changes.
402 changes: 201 additions & 201 deletions LICENSE-APACHE

Large diffs are not rendered by default.

File renamed without changes.
60 changes: 37 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,66 @@
# The Neon Command-Line Tool
# Neon

[![Build Status](https://travis-ci.org/neon-bindings/neon-cli.svg?branch=master)](https://travis-ci.org/neon-bindings/neon-cli)
[![npm](https://img.shields.io/npm/v/neon-cli.svg)](https://www.npmjs.com/package/neon-cli)
<img align="right" src="neon.jpg" alt="neon"/>

Automatically create and build [Neon](https://github.com/neon-bindings/neon) modules.
[![Travis Build Status](https://travis-ci.org/neon-bindings/neon.svg?branch=master)](https://travis-ci.org/neon-bindings/neon)
[![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/github/neon-bindings/neon?branch=master&svg=true)](https://ci.appveyor.com/project/dherman/neon)
[![](http://meritbadge.herokuapp.com/neon)](https://crates.io/crates/neon)

![Screencast](screencast.gif)
Rust bindings for writing safe and fast native Node.js modules.

# Getting started

Install `neon-cli` as a global package:
Once you have the [platform dependencies](https://guides.neon-bindings.com/getting-started/) installed, getting started is as simple as:

```
npm install -g neon-cli
$ npm install -g neon-cli
$ neon new my-project
```

To create a new Neon project, use `neon new`:
See the [Getting Started guide](https://guides.neon-bindings.com/getting-started/) for details.

```
neon new my-project
```
# Platform Support

This will ask you a few questions and then generate a project skeleton for you. Follow the instructions from there to build and run your project!
### Operating Systems

# Requirements
| Linux | macOS | Windows |
| ------ | ----- | ------- |
||||

See the [Neon README](https://github.com/neon-bindings/neon/#requirements).
### Node.js

# Commands
| Node 4 | Node 6 | Node 7 | Node 8 |
| ------ | ------ | ------ | ------ |
|||||

## neon new
Support for [LTS versions of Node](https://github.com/nodejs/LTS#lts-schedule) and current are expected. If you're using a different version of Node and believe it should be supported, let us know.

Creates a new Neon project skeleton.
### Rust

```
neon new <name> [--rust|-r <toolchain>]
```
Neon supports Rust stable version 1.18 and higher. We test on the latest stable, beta, and nightly versions of Rust.

# A Taste...

The `name` is the project name and the name of the subdirectory of the current working directory that will be created.
A Neon function takes a `Call` object and produces a Rust `Result` that's either a JS value or the `Throw` constant (meaning a JS exception was thrown). The `Call` object provides access to a memory management scope, which safely manages the rooting of handles to heap objects:

The optional `--rust` parameter allows specifying a custom toolchain (`stable` or `nightly`) to use for building the project with multirust instead of the system default Rust installation.
```rust
fn make_an_array(call: Call) -> JsResult<JsArray> {
let scope = call.scope; // the current scope for rooting handles
let array: Handle<JsArray> = JsArray::new(scope, 3);
array.set(0, JsNumber::new(scope, 9000))?;
array.set(1, JsNumber::new(scope))?;
array.set(2, JsNumber::new(scope, 3.14159))?;
Ok(array)
}
```

To learn more, check out the [Neon guides](https://guides.neon-bindings.com).

# Get Involved

The Neon community is just getting started and there's tons of fun to be had. Come play! :)

The [Rust Bindings community Slack](https://rust-bindings.slack.com/) is open to all; use [the Slackin app](https://rust-bindings-slackin.herokuapp.com/) to receive an invitation.
The [Rust Bindings community Slack](https://rust-bindings.slack.com) is open to all; use [the Slackin app](https://rust-bindings-slackin.herokuapp.com) to receive an invitation.

# License

Expand Down
51 changes: 35 additions & 16 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# Version 0.1.20

* Task API (neon-bindings/neon#214).
* Background task API (#214).
* Fixes to Windows builds (#221, #227), thanks to @hone's tenacious troubleshooting.

# Version 0.1.19

* TypeScript upgrade fixes (#62, #65).
* CLI bugfix (neon-bindings/neon-cli#62, neon-bindings/neon-cli#65).

# Version 0.1.18

* CLI bugfix (#59).
* JsArrayBuffer (neon-bindings/neon#210).
* CLI bugfix (neon-bindings/neon-cli#59).
* JsArrayBuffer (#210).

# Version 0.1.17

Expand All @@ -19,24 +20,42 @@

* CLI bugfix (#56).

# Version 0.1.15
# Version 0.1.15 (2017-05-21)

* Better support for Electron via the artifacts file (#52).
* Better Electron support in CLI's build process.

# Version 0.1.14
# Version 0.1.14 (2017-04-02)

* Clean up the CLI and allow `neon build` to optionally take module names (#48).
* Ensure failing tests break the build (#191)
* Catch Rust panics and convert them to JS exceptions (#192)
* Implement `Error` for `Throw` (#201)

# Version 0.1.13
# Version 0.1.13 (2017-02-17)

* Bump to match neon 0.1.13.
* More robust build scripts for neon-runtime, fixing Homebrew node installations (see #189)

# Version 0.1.12
# Version 0.1.12 (2017-02-16)

* Depend on `neon-build` as a build dependency (see #46).
* Windows support!
* [Optimized rooting protocol](https://github.com/neon-bindings/neon/commit/cef41584d9978eda2d59866a077cfe7c7d3fa46e)
* [Eliminate rustc warnings](https://github.com/neon-bindings/neon/pull/107)
* Lots of internal API docs
* Windows support! :tada:
* [Renamed `neon-sys` to `neon-runtime`](https://github.com/neon-bindings/neon/issues/169)

# Version 0.1.11
# Version 0.1.11 (2016-08-08)

* Bump version to match Neon so they can be kept in sync from now on.
* Generate a `build.rs` to make Windows work (see #42 and #44).
* [Exposed `This` trait](https://github.com/neon-bindings/neon/issues/101) to allow user-level abstractions involving `FunctionCall`

# Version 0.1.10 (2016-05-11)

* Added `JsError` API with support for throwing [all](https://github.com/neon-bindings/neon/issues/65) [standard](https://github.com/neon-bindings/neon/issues/66) [error](https://github.com/neon-bindings/neon/issues/67) [types](https://github.com/neon-bindings/neon/issues/74)
* [Test harness and CI integration](https://github.com/neon-bindings/neon/issues/80)!! :tada: :tada: :tada:
* API to [call JS functions from Rust](https://github.com/neon-bindings/neon/issues/60)
* API to [new JS functions from Rust](https://github.com/neon-bindings/neon/issues/61)
* Added [generalized `as_slice` and `as_mut_slice` methods](https://github.com/neon-bindings/neon/issues/64) to `CSlice` API.
* Fixed a [soundness issue](https://github.com/neon-bindings/neon/issues/64) with Locks.

## Incompatible Changes

* The `JsTypeError` type is gone, and replaced by the more general `JsError` type.
* `neon::js::error::JsTypeError::throw(msg)` is now `neon::js::error::JsError::throw(neon::js::error::kind::TypeError, msg)`
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions cli/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/*~
**/.DS_Store
/node_modules/
/dist/
File renamed without changes.
4 changes: 4 additions & 0 deletions cli/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
language: node_js
node_js:
- '4'
- '5'
Loading

0 comments on commit acc6411

Please sign in to comment.