Files
dolt/samples/js
cmasone-attic dd92a06559 JS: Make Database a mutable API that vends immutable Datasets (#2636)
Noms SDK users frequently shoot themselves in the foot because they're
holding onto an "old" Database object. That is, they have a Database
tucked away in some internal state, they call Commit() on it, and
don't replace the object in their internal state with the new Database
returned from Commit.

This PR fixes #2589 by changing the Database and Dataset JS API to be
in line with the proposal there.
2016-09-28 16:50:57 -07:00
..
2016-07-08 13:47:00 -07:00
2016-09-22 15:22:20 -07:00
2016-08-22 15:22:34 -07:00

JS Samples

This directory has a package.json and a node_modules directory. This is so that we do not have to do the slow npm install in every sample. Instead each sample have no dependencies and the dependencies are added to the shared parent directory. If we instead had complete standalone samples in every subdirectory it would would mean that we have to have n copies of all the node modules we depend on. This takes a long time to install and it takes up a lot of disk space.

Running a sample

First run npm install in this directory, then in the subdirectory.

cd js
npm install
cd ..
cd samples/js
npm install
cd fs
npm install

Then to run the sample:

node .

You only need to do the npm install calls once. After that you can use npm run build or npm run start for dev mode.