🥊 Technical Knockout – The Monorepo for Knockout.js (4.0+)
TKO houses the monorepo of Knockout.
To install use one of the usual package managers e.g.
yarn add @tko/build.reference
npm install @tko/build.reference
Over CDN
The Knockout build has some backwards compatibility that is not in the reference build. See the build differences, here: https://tko.io/3to4
It's available as @tko/build.knockout
, and over CDN:
Command | Effect |
---|---|
$ git clone [email protected]:knockout/tko |
Clone the repository. |
$ npm install -g yarn otherwise |
Ensure yarn is globally available |
$ yarn |
Install local node packages and link tko modules |
$ yarn test |
Run all tests. See below. |
$ yarn watch |
Run all tests and watch for changes. See below. |
$ yarn build |
Build tko[.module][.es6][.min].js files, where .es6 version has not been transpiled |
$ lerna publish |
Bump versions and publish to npm registry |
Checkout package.json => scripts
for more commands that can be executed with yarn {command}
.
In each individual packages/*/
directory, you can also run (presuming rollup
and karma
are installed globally):
Command | Effect |
---|---|
$ karma COMMAND ../../karma.conf.js [--once] |
Test the local package, where COMMAND is e.g. start or run |
$ rollup -c ../../rollup.config.js |
Build the package into the local dist/ |
yarn test
and yarn watch
The yarn test
and yarn watch
commands can be used in the root directory, where it will run across all tests, or alternatively in any packages/*/
directory to run tests
specific to that package.
Optional arguments to yarn test
include:
--sauce
— use Sauce Labs to test a variety of platforms; requires an account at Sauce Labs and SAUCE_USERNAME
and SAUCE_ACCESS_KEY
to be set in the environment.--noStartConnect
— Do not start a new Sauce Connect proxy instance for every
test; requires that Sauce Connect be already running.visual.html
Note that running karma
or rollup
will create a visual.html
file that shows the proportional size of imports into each package.
TKO aims to become a base for future versions of Knockout. The objectives include:
There's an issue for that.
MIT license - http://www.opensource.org/licenses/mit-license.php.