Skip to content

Commit

Permalink
fix(sampiler): Add missing .npmignore (#875)
Browse files Browse the repository at this point in the history
Additional changes to the CONTRIBUTING guide, mainly to reflect that
the superchain image based setup as the recommended option.
  • Loading branch information
nija-at authored Oct 10, 2019
1 parent 6d3d9a9 commit b16fc6b
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 29 deletions.
62 changes: 33 additions & 29 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,12 @@ contributions. Please read it carefully and let us know if it's not up-to date
(or even better, submit a pull request with your corrections! :wink:).

## Pre-requisites
### Toolchain Requirements
### Setup Docker image
Due to the polyglot nature of `jsii`, the toolchain requirements are somewhat
more complicated than for most projects. In order to locally develop `jsii`, you
will need the following tools:
will need a number of tools.

- [Node `8.11.0`] or later
- An OpenJDK-8 distribution (e.g: [Oracle's OpenJDK8], [Amazon Corretto 8])
+ [`maven >= 3.0.5`](https://maven.apache.org)
- [.NET Core `2.0`] or later
+ *Recommended:* [`mono >= 5`](https://www.mono-project.com)
- [Python `3.6.5`] or later
+ [`pip`](https://pip.pypa.io/en/stable/installing/)
+ [`setuptools >= 38.6.0`](https://pypi.org/project/setuptools/)
+ [`wheel`](https://pypi.org/project/wheel/)
+ *Recommended:* [`twine`](https://pypi.org/project/twine/)
- [Ruby `2.4.4p296`] or later
+ [`bundler ~> 1.17.2`](https://bundler.io)

[Node `8.11.0`]: https://nodejs.org/download/release/v8.11.0/
[Oracle's OpenJDK8]: http://openjdk.java.net/install/
[Amazon Corretto 8]: https://aws.amazon.com/corretto/
[.NET Core `2.0`]: https://www.microsoft.com/net/download
[Python `3.6.5`]: https://www.python.org/downloads/release/python-365/
[Ruby `2.4.4p296`]: https://www.ruby-lang.org/en/news/2018/03/28/ruby-2-5-1-released/

### Alterative: build in Docker

We have built a Docker image with all the required tool, which we are using for
We have built a Docker image with all the required tools, which we are using for
our own CI/CD: the ["superchain" image][superchain] from.

[superchain]: https://github.com/aws/jsii/blob/master/superchain/Dockerfile
Expand All @@ -53,7 +31,33 @@ $ cd jsii # go to the root of the jsii repo
$ docker run --rm --net=host -it -v $PWD:$PWD -w $PWD ${IMAGE}
```

You can then run `npm run build` as described below.
In the shell that pops up, the `npm run` commands in the following sections must
be executed.

### Alternative: Manually install the toolchain
The following tools need to be installed to develop on JSII locally. We recommend
using the docker image from the above section, but if you wish to, you can install
in your development environment.

- [Node `8.11.0`] or later
- An OpenJDK-8 distribution (e.g: [Oracle's OpenJDK8], [Amazon Corretto 8])
+ [`maven >= 3.0.5`](https://maven.apache.org)
- [.NET Core `2.0`] or later
+ *Recommended:* [`mono >= 5`](https://www.mono-project.com)
- [Python `3.6.5`] or later
+ [`pip`](https://pip.pypa.io/en/stable/installing/)
+ [`setuptools >= 38.6.0`](https://pypi.org/project/setuptools/)
+ [`wheel`](https://pypi.org/project/wheel/)
+ *Recommended:* [`twine`](https://pypi.org/project/twine/)
- [Ruby `2.4.4p296`] or later
+ [`bundler ~> 1.17.2`](https://bundler.io)

[Node `8.11.0`]: https://nodejs.org/download/release/v8.11.0/
[Oracle's OpenJDK8]: http://openjdk.java.net/install/
[Amazon Corretto 8]: https://aws.amazon.com/corretto/
[.NET Core `2.0`]: https://www.microsoft.com/net/download
[Python `3.6.5`]: https://www.python.org/downloads/release/python-365/
[Ruby `2.4.4p296`]: https://www.ruby-lang.org/en/news/2018/03/28/ruby-2-5-1-released/

## Getting Started
### Bootstrapping
Expand All @@ -63,9 +67,9 @@ The project is managed as a [monorepo] using [lerna].
[monorepo]: https://github.com/babel/babel/blob/master/doc/design/monorepo.md
[lerna]: https://github.com/lerna/lerna

1. Check out this repository.
2. Run `npm run build` to install lerna, bootstrap the repository and perform an
initial build and test cycle.
1. Check out this respository and change directory to its root.
2. Run `npm run bootstrap && npm run build` to install lerna, bootstrap the repository
and perform an initial build and test cycle.

### Development Workflow

Expand Down
17 changes: 17 additions & 0 deletions packages/jsii-sampiler/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
*.ts
!*.d.ts
coverage
.nyc_output
*.tgz

dist
.LAST_PACKAGE
.LAST_BUILD
!*.js

# Include .jsii
!.jsii

*.snk

*.tsbuildinfo

0 comments on commit b16fc6b

Please sign in to comment.