This project uses a mix of technologies and languages to achieve its goals. This document describes what those technologies are and their responsibilities.
Relevant files/folders:
package.jsonpackage-lock.jsonnode_modules
We use npm to pull in several dependencies, in particular, @skyscanner/bpk-foundation-ios and @skycsanner/bpk-svgs. These two packages contain the design system's tokens and icons respectively. We also use npm to run some tasks via its script system, most notably the build task which runs gulp.
Relevant files/folders:
gulpfile.jstemplates
Gulp, a JavaScript task automator, is used to template out Objective-C files for the tokens so they can be consumed from Swift and Objective-C. By convention, files that are templated live in Backpack/*/Classes/Generated. Making manual changes to these files is not possible and any changes will be overwritten by Gulp.
An example of templated files is: Backpack/Color/Classes/Generated, which contains our BPKColor class and extensions on UIColor.
The templates themselves are in templates and are called *.{finalExtension}.njk. These are nunjucks templates.
Relevant files/folders:
GemfileDefines Ruby gems we use.Gemfile.lockBundler, lockfile.Backpack.podspecthe project's podspec, which defines the library for consumption via CocoaPods.
We use Ruby and Bundler to perform most other automation and management of the project. The three most important gems we use are:
cocoapodspublishing the project, hosting the example project.fastlaneiOS project automation, used for taking our screenshots.jazzygenerates static HTML documentation from our reference docs, which is published at https://backpack.github.io/ios.
We have a fair amount of automation in Rakefile that might be more suited for fastlane e.g. building the project, running the tests, etc.