Add instructions for make configure

And also move the Node.js SDK-specific parts into the sdk/nodejs/ directory.
This commit is contained in:
joeduffy 2017-09-11 15:17:11 -07:00
parent ac786ed2c9
commit 4c781da93b
5 changed files with 19 additions and 4 deletions

View file

@ -23,6 +23,7 @@ install:
- git clone git@github.com:pulumi/pulumi ${GOPATH}/src/github.com/pulumi/pulumi
# Now restore dependencies, build prerequisites, and generally make this thing ready to go.
- make configure
- cd nodejs/sdk/ && make configure
before_script:
- export PATH=$TRAVIS_BUILD_DIR/sdk/nodejs/bin:$PATH
- export LUMIROOT=~/.lumi

View file

@ -35,9 +35,7 @@ banner_all:
.PHONY: configure
configure:
dep ensure -v
cd sdk/nodejs && yarn install
cd sdk/nodejs/runtime/native && ./ensure_node_v8.sh
cd sdk/nodejs/runtime/native && ../../node_modules/.bin/node-gyp configure
cd sdk/nodejs/ && make configure
.PHONY: install
install:

View file

@ -41,7 +41,11 @@ To build Lumi, ensure `$GOPATH` is set, and clone into a standard Go workspace:
$ git clone git@github.com:pulumi/pulumi-fabric $GOPATH/src/github.com/pulumi/pulumi-fabric
$ cd $GOPATH/src/github.com/pulumi/pulumi-fabric
Before building, you will need to ensure dependencies have been restored to your enlistment:
The first time you build, you must `make configure` to install dependencies and perform other machine setup:
$ make configure
In the future, you can synch dependencies simply by running `dep ensure` explicitly:
$ dep ensure

View file

@ -9,6 +9,12 @@ banner:
@echo "\033[1;37mPulumi Node.js SDK\033[0m"
@echo "\033[1;37m==================\033[0m"
.PHONY: configure
configure:
yarn install
cd runtime/native && ./ensure_node_v8.sh
cd runtime/native && ../../node_modules/.bin/node-gyp configure
.PHONY: lint
lint:
@echo "\033[0;32mLINT:\033[0m"

View file

@ -18,6 +18,12 @@ Yarn is faster and therefore preferred. Please follow the directions on Yarn's
### Building and Testing
The first time you build, you must `make configure` to install and prepare native plugins for V8:
$ make configure
Make sure to run this after installing the right version of Node.js above, otherwise it may bind to the wrong version.
To build the SDK, simply run `make` from the root directory (`sdk/nodejs/`). This will build the code, run tests, and
then "install" the package (by `yarn link`ing the resulting `bin/` directory).