From 5cc641ecad4944921d2e82458ef0522d39430a3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Fri, 5 May 2017 14:14:56 -0700 Subject: [ios, macos] Moved DDS guide examples to Swift unit test Moved example code from DDS guide to a unit test written in Swift. The code is inserted into the guide at codegen time. --- .../guides/Using Style Functions at Runtime.md.ejs | 75 +------- platform/darwin/scripts/generate-style-code.js | 35 ++++ platform/darwin/scripts/update-examples.js | 2 +- .../darwin/test/MGLDocumentationGuideTests.swift | 214 +++++++++++++++++++++ .../guides/Using Style Functions at Runtime.md | 71 ++++--- platform/ios/ios.xcodeproj/project.pbxproj | 6 +- .../guides/Using Style Functions at Runtime.md | 71 ++++--- platform/macos/macos.xcodeproj/project.pbxproj | 4 + 8 files changed, 344 insertions(+), 134 deletions(-) create mode 100644 platform/darwin/test/MGLDocumentationGuideTests.swift (limited to 'platform') diff --git a/platform/darwin/docs/guides/Using Style Functions at Runtime.md.ejs b/platform/darwin/docs/guides/Using Style Functions at Runtime.md.ejs index 7745ab07a1..e41ac1c832 100644 --- a/platform/darwin/docs/guides/Using Style Functions at Runtime.md.ejs +++ b/platform/darwin/docs/guides/Using Style Functions at Runtime.md.ejs @@ -1,9 +1,9 @@ - <% const os = locals.os; const iOS = os === 'iOS'; const macOS = os === 'macOS'; const cocoaPrefix = iOS ? 'UI' : 'NS'; + const guide = 'UsingStyleFunctionsAtRuntime'; -%>