Skip to content

Commit acc6411

Browse files
committed
Move neon-cli files into cli subdirectory, and restore temporarily-moved neon files back to project root.
1 parent 2d80984 commit acc6411

File tree

133 files changed

+642
-642
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+642
-642
lines changed

.gitignore

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1+
target
2+
Cargo.lock
13
**/*~
4+
**/node_modules
25
**/.DS_Store
3-
/node_modules/
4-
/dist/
6+
**/build
7+
**/index.node
8+
**/artifacts.json
9+
**/package-lock.json
10+
npm-debug.log

.travis.yml

+52-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,52 @@
1-
language: node_js
2-
node_js:
3-
- '4'
4-
- '5'
1+
language: rust
2+
dist: trusty
3+
4+
rust:
5+
- stable
6+
- beta
7+
- nightly
8+
9+
env:
10+
matrix:
11+
- TRAVIS_NODE_VERSION="8"
12+
- TRAVIS_NODE_VERSION="6"
13+
- TRAVIS_NODE_VERSION="4"
14+
global:
15+
- 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=
16+
17+
before_install:
18+
- source $HOME/.nvm/nvm.sh
19+
- nvm install ${TRAVIS_NODE_VERSION}
20+
- nvm use ${TRAVIS_NODE_VERSION}
21+
22+
addons:
23+
apt:
24+
sources:
25+
- ubuntu-toolchain-r-test
26+
packages:
27+
- g++-4.8
28+
29+
script: |
30+
cd tests/ &&
31+
npm test &&
32+
if [[ "$TRAVIS_RUST_VERSION" == nightly* ]]; then
33+
cd ../compile_tests/ &&
34+
cargo test
35+
fi
36+
37+
jobs:
38+
include:
39+
- stage: docs
40+
before_install: skip
41+
before_script:
42+
- export PATH=$HOME/.local/bin:$PATH
43+
- pip install ghp-import --user $(whoami)
44+
script: |
45+
if [[ $TRAVIS_BRANCH=master && $TRAVIS_PULL_REQUEST=false && $TRAVIS_COMMIT_MESSAGE =~ %travis:docs ]]; then
46+
echo "Generating API docs..." &&
47+
cargo doc &&
48+
echo "<meta http-equiv=refresh content=0;url=neon/index.html>" > target/doc/index.html &&
49+
echo "Deploying API docs..." &&
50+
ghp-import -n target/doc &&
51+
git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
52+
fi

neon/AUTHORS.md AUTHORS.md

File renamed without changes.
File renamed without changes.

neon/Cargo.toml Cargo.toml

File renamed without changes.

LICENSE-APACHE

+201-201
Large diffs are not rendered by default.

neon/Makefile Makefile

File renamed without changes.

README.md

+37-23
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,66 @@
1-
# The Neon Command-Line Tool
1+
# Neon
22

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

6-
Automatically create and build [Neon](https://github.com/neon-bindings/neon) modules.
5+
[![Travis Build Status](https://travis-ci.org/neon-bindings/neon.svg?branch=master)](https://travis-ci.org/neon-bindings/neon)
6+
[![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)
7+
[![](http://meritbadge.herokuapp.com/neon)](https://crates.io/crates/neon)
78

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

1011
# Getting started
1112

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

1415
```
15-
npm install -g neon-cli
16+
$ npm install -g neon-cli
17+
$ neon new my-project
1618
```
1719

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

20-
```
21-
neon new my-project
22-
```
22+
# Platform Support
2323

24-
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!
24+
### Operating Systems
2525

26-
# Requirements
26+
| Linux | macOS | Windows |
27+
| ------ | ----- | ------- |
28+
||||
2729

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

30-
# Commands
32+
| Node 4 | Node 6 | Node 7 | Node 8 |
33+
| ------ | ------ | ------ | ------ |
34+
|||||
3135

32-
## neon new
36+
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.
3337

34-
Creates a new Neon project skeleton.
38+
### Rust
3539

36-
```
37-
neon new <name> [--rust|-r <toolchain>]
38-
```
40+
Neon supports Rust stable version 1.18 and higher. We test on the latest stable, beta, and nightly versions of Rust.
41+
42+
# A Taste...
3943

40-
The `name` is the project name and the name of the subdirectory of the current working directory that will be created.
44+
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:
4145

42-
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.
46+
```rust
47+
fn make_an_array(call: Call) -> JsResult<JsArray> {
48+
let scope = call.scope; // the current scope for rooting handles
49+
let array: Handle<JsArray> = JsArray::new(scope, 3);
50+
array.set(0, JsNumber::new(scope, 9000))?;
51+
array.set(1, JsNumber::new(scope))?;
52+
array.set(2, JsNumber::new(scope, 3.14159))?;
53+
Ok(array)
54+
}
55+
```
4356

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

4559
# Get Involved
4660

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

49-
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.
63+
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.
5064

5165
# License
5266

RELEASES.md

+35-16
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
# Version 0.1.20
22

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

56
# Version 0.1.19
67

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

910
# Version 0.1.18
1011

11-
* CLI bugfix (#59).
12-
* JsArrayBuffer (neon-bindings/neon#210).
12+
* CLI bugfix (neon-bindings/neon-cli#59).
13+
* JsArrayBuffer (#210).
1314

1415
# Version 0.1.17
1516

@@ -19,24 +20,42 @@
1920

2021
* CLI bugfix (#56).
2122

22-
# Version 0.1.15
23+
# Version 0.1.15 (2017-05-21)
2324

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

26-
# Version 0.1.14
27+
# Version 0.1.14 (2017-04-02)
2728

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

30-
# Version 0.1.13
33+
# Version 0.1.13 (2017-02-17)
3134

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

34-
# Version 0.1.12
37+
# Version 0.1.12 (2017-02-16)
3538

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

39-
# Version 0.1.11
45+
# Version 0.1.11 (2016-08-08)
4046

41-
* Bump version to match Neon so they can be kept in sync from now on.
42-
* Generate a `build.rs` to make Windows work (see #42 and #44).
47+
* [Exposed `This` trait](https://github.com/neon-bindings/neon/issues/101) to allow user-level abstractions involving `FunctionCall`
48+
49+
# Version 0.1.10 (2016-05-11)
50+
51+
* 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)
52+
* [Test harness and CI integration](https://github.com/neon-bindings/neon/issues/80)!! :tada: :tada: :tada:
53+
* API to [call JS functions from Rust](https://github.com/neon-bindings/neon/issues/60)
54+
* API to [new JS functions from Rust](https://github.com/neon-bindings/neon/issues/61)
55+
* Added [generalized `as_slice` and `as_mut_slice` methods](https://github.com/neon-bindings/neon/issues/64) to `CSlice` API.
56+
* Fixed a [soundness issue](https://github.com/neon-bindings/neon/issues/64) with Locks.
57+
58+
## Incompatible Changes
59+
60+
* The `JsTypeError` type is gone, and replaced by the more general `JsError` type.
61+
* `neon::js::error::JsTypeError::throw(msg)` is now `neon::js::error::JsError::throw(neon::js::error::kind::TypeError, msg)`

neon/appveyor.yml appveyor.yml

File renamed without changes.

neon/bin/test bin/test

File renamed without changes.

neon/build.rs build.rs

File renamed without changes.

cli/.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
**/*~
2+
**/.DS_Store
3+
/node_modules/
4+
/dist/

.npmignore cli/.npmignore

File renamed without changes.

cli/.travis.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
language: node_js
2+
node_js:
3+
- '4'
4+
- '5'

0 commit comments

Comments
 (0)