Repository for Open Translators to Things. Grouped by translators written for specific schemas. The schema names are uniquely namespaced. The translator name is a unique string identifying a Thing.
This README will help get you started developing in this repo.
Get your dev environment set up (PC or Mac):
Next, clone this repo to your local machine to get started. Navigate to the directory where you want to clone the repo to locally, then run:
git clone https://github.com/openT2T/translators.git
Follow our getting started guide at http://www.opentranslatorstothings.org. Note that we have some required naming rules for translator node packages:
Here is some background reading for those who are curious:
Install gulp globally.
npm install -g gulp
Install dependencies.
npm install verifiers
Run integration tests.
gulp ci-checks
Notes:
gulp --cwd .\org.opent2t.sample.windowshade.superpopular\ ci-checks
Made any changes we should consider? Send us a pull request! Check out this article on how to get started.
A translator package includes one thing translator along with all the schemas
it references. Because those are not organized in the way npm publish
expects, the process of publishing a translator package uses a script from
the CLI repo.
Update the version
property in the package.json file in the translator
directory. (Of cource any other metadata may be updated also, but a version
bump is required when publishing to npm, since you may not re-publish over an
existing version.)
Clone the CLI repo (or sync it as needed), and install its dependencies:
cd ..
git clone https://github.com/opent2t-cli
npm install
cd ../translators
node ../opent2t-cli/pack-translator.js com.wink.thermostat
Edit the package.json to include directories for referenced schemas in the
files
collection at the end. Lines will include at least "oic.core"
and
"oic.baseresource"
; possibly others if the OCF schema .json file has $ref
references to others. (Eventually the pack-translator.js script should add
these lines automatically.)
Ensure you're logged in to NPM under the opent2t account:
npm login
Username: opent2t
Password: *********
npm publish
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.