From ecac278f63065289ad89ff31514c0703ff141569 Mon Sep 17 00:00:00 2001 From: Cherie Williams Date: Thu, 9 Jun 2016 14:19:54 -0700 Subject: [PATCH] Make SDK 3.13 notice a header & add error sample --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7d9949f..a986082 100755 --- a/README.md +++ b/README.md @@ -5,7 +5,17 @@ Clay will by default automatically handle the 'showConfiguration' and 'webviewcl **Clay is still in early development and may be missing some features. We would love your feedback! Pease submit any ideas or features via GitHub Issues.** -> NOTE: Prior to SDK 3.13, require paths were handled in a non-standard way. When requiring modules, the name of the module was sufficient (ie. `require('clay')`). However, with the release of SDK 3.13, the require paths changed so that you now have to require the module by using its path relative to the file it's being required in. This means requiring the Clay module now is done in app.js by using `require('./clay')`. +# SDK 3.13 Changes +Prior to SDK 3.13, `require` paths were handled in a non-standard way. When requiring modules, the name of the module was sufficient (ie. `require('clay')`). However, with the release of SDK 3.13, the require paths changed so that you now have to require the module by using its path relative to the file it's being required in. This means requiring the Clay module now is done in app.js by using `require('./clay')`. An incorrect path would result in an error similar to this: + ``` + [14:16:03] javascript> JavaScript Error: + Error: Cannot find module 'clay' + at Object.loader.require (loader.js:66:11) + at _require.require (loader.js:54:48) + at Object.loader (src/js/app.js:1:1) + at _require (loader.js:57:10) + at Object.loader.require (loader.js:69:10) + ``` # Getting Started (SDK)