1.0.5 • Published 9 years ago
guardian-mobile-apps-article-templates v1.0.5
Article Templates for Mobile Apps
Article templates used within the Guardian’s next-generation iOS, Android and Windows applications. This repo also contains documentation that describes the components and layouts used across these templates.
Requirements
- A Mac or Linux computer.
- brew as a package manager.
- NVM.
- NodeJS. Install using nvm:
nvm install v6.9.2. Remember to addnvm use v6.9.2to your preferred shell startup file. - Yarn. Yarn is a package manager. Install using
brew install yarn. - It is recommended you restart your shell to ensure changes added the startup file are applied.
Developing
- checkout the project in a separate directory, outside the iOS and the Android app.
- copy config.sample.js to config.js and fill in the details
base.androidis the 'ArticleTemplate' path within the Android app, eg:/Users/sandropaganotti/Projects/android-news-app/android-news-app/src/main/assets/templates/base.iosis the 'ArticleTemplate' path within the iOS app, eg:/Users/sandropaganotti/Projects/ios-live/mobile-apps-article-templates/ArticleTemplates/base.htmlis the path where this repository has been checked out, eg:/Users/sandropaganotti/Projects/mobile-apps-article-templates/
- run
yarnto install dependencies. - run
yarn setupto locally ignore build files so they are not checked into master
IOS and Android devs
If you are developing against a branch which is not release, please follow the steps below:
- Pull down the branch which you are developing against
- Please follow the requirements and developing steps
- run
yarn syncwhich will build the project, and move the build into the individual Android and IOS projects
Yarn scripts
Yarn will provide the following services:
yarn testruns the JS unit tests from the test/spec/unit/ directoryyarn validateruns sasslint checks on SCSS and jshint checks on JSyarn buildbuilds JS/CSS assets, used on CI environment for building assetsyarn developbuilds JS/CSS assets and watches for changes to JS/CSS. If changes then rebuilds and copies assets to iOS/Android to the iOS and Android projects as specified in config.js