Skip to content

Commit

Permalink
Merge pull request knockout#2513 from Profiscience/tooling
Browse files Browse the repository at this point in the history
Don't require globally installed grunt or typescript
  • Loading branch information
mbest authored Oct 17, 2020
2 parents b3866e0 + 3e8b3dd commit d52edae
Show file tree
Hide file tree
Showing 4 changed files with 383 additions and 11 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: node_js
node_js:
- "node"
before_install:
- npm install -g typescript

script:
- npm run grunt
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,25 @@ If you prefer to build the library yourself:

2. **Acquire build dependencies.**

Make sure you have [Node.js](http://nodejs.org/) installed on your workstation. This is only needed to _build_ Knockout from sources. Knockout itself has no dependency on Node.js once it is built (it works with any server technology or none). Now run:
Make sure you have [Node.js](http://nodejs.org/) and [Java](https://www.java.com/en/) installed on your workstation. These are only needed to _build_ Knockout from sources. Knockout itself has no dependency on Node.js or Java once it is built (it works with any server technology or none). Now run:

```sh
npm install -g grunt-cli
npm install
```

The first `npm` command sets up the popular [Grunt](http://gruntjs.com/) build tool. You might need to run this command with `sudo` if you're on Linux or Mac OS X, or in an Administrator command prompt on Windows. The second `npm` command fetches the remaining build dependencies.

3. **Run the build tool**

```sh
grunt
npm run grunt
```
Now you'll find the built files in `build/output/`.

To run a single task, use `--`

```sh
npm run grunt -- build:debug
```

## Running the tests

If you have [phantomjs](http://phantomjs.org/download.html) installed, then the `grunt` script will automatically run the specification suite and report its results.
Expand Down
Loading

0 comments on commit d52edae

Please sign in to comment.