-
Notifications
You must be signed in to change notification settings - Fork 18
Temporary Package Workflow
While a package is not published on npm or bower this is a workflow you can follow to include the package as a dependency. It requires to build a distribution of the package and include it with your dependent package.
- Clone package
- Build a distribution of the package
- Change packaging of dependent package
- Copy distributable into dependent package
- Integrate into package typings
For the examples, we will assume you are going to depend on dojo/core. First clone the package, outside of the path of the dependent package:
$ git clone https://github.com/dojo/core.gitNext you will need to build a distribution:
$ cd core
$ npm install
$ grunt distYou will now have the distributable package in /dist.
You will need to make sure that the distributable of the distributable package does not interfere with your depedent package.
You need to change your .gitignore to add the following lines:
!/_modules/**/*.js
!/_modules/**/*.js.map
As well as you should exclude the code from your test coverage. In order to do this, modify the tests/intern.ts from:
export const excludeInstrumentation = /(?:node_modules|bower_components|tests)[\/\\]/;to:
export const excludeInstrumentation = /(?:node_modules|bower_components|tests|_modules)[\/\\]/;You will then need to copy the distributable:
$ cd ../{dependent-package-wd}
$ mkdir _modules
$ cp -r ../core/dist _modules/dojo-coreYou should then include the typings from the distributable into your package by editing your typings/tsd.d.ts:
///<reference path="../_modules/dojo-core/typings/dojo-core/dojo-core-2.0.0-pre.d.ts"/>