Browse Source

adding Git LFS

pull/4461/head
indirectlylit 3 years ago
parent
commit
03b78419f5
  1. 5
      .gitattributes
  2. 2
      .gitignore
  3. 7
      build_tools/i18n/fonts.py
  4. 5
      docs/start/getting_started.rst

5
.gitattributes

@ -0,0 +1,5 @@
# use Git LFS to track large binary files
*.otf filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.ttc filter=lfs diff=lfs merge=lfs -text
*.woff filter=lfs diff=lfs merge=lfs -text

2
.gitignore

@ -77,7 +77,7 @@ kolibri/**/build/*
kolibri/**/static/*
js-dist
# allow static assets to be checked in
# Allow static assets to be checked in. For large binary files, use Git LFS
!kolibri/**/static/assets/
!kolibri/**/static/assets/*
!kolibri/**/static/assets/**/*

7
build_tools/i18n/fonts.py

@ -8,6 +8,7 @@ import base64
import io
import json
import logging
import mimetypes
import os
import re
import sys
@ -88,6 +89,12 @@ def _woff_font_path(name, is_bold):
def _load_font(path):
guess = mimetypes.guess_type(path)
if guess[0] not in ["font/ttc", "font/ttf", "font/otf", "font/woff"]:
logging.error("Not a font file: {}".format(path))
logging.error("Guessed mimetype: '{}'".format(guess[0]))
logging.error("If this is a text file: do you have Git LFS installed?")
sys.exit(1)
return subset.load_font(path, FONT_TOOLS_OPTIONS, dontLoadGlyphNames=True)

5
docs/start/getting_started.rst

@ -18,7 +18,7 @@ Most of the steps below require entering commands into your Terminal (Linux, Mac
Git & GitHub
~~~~~~~~~~~~
#. Install and set-up `Git <https://help.github.com/articles/set-up-git/>`__ on your computer. Try this `tutorial <http://learngitbranching.js.org/>`__ if you need more practice with Git!
#. Install and set up `Git <https://help.github.com/articles/set-up-git/>`__ on your computer. Try this `tutorial <http://learngitbranching.js.org/>`__ if you need more practice with Git!
#. `Sign up and configure your GitHub account <https://github.com/join>`__ if you don't have one already.
#. `Fork the main Kolibri repository <https://github.com/learningequality/kolibri>`__. This will make it easier to `submit pull requests <https://help.github.com/articles/using-pull-requests/>`__. Read more details `about forking <https://help.github.com/articles/fork-a-repo/>`__ from GitHub.
@ -30,6 +30,7 @@ Install environment dependencies
#. Install `pip <https://pypi.python.org/pypi/pip>`__ package installer.
#. Install `Node.js <https://nodejs.org/en/>`__ (version 6 is required).
#. Install `Yarn <https://yarnpkg.com/>`__ according the `instructions specific for your OS <https://yarnpkg.com/en/docs/install/>`__.
#. Install and set up the `Git LFS extension <https://git-lfs.github.com/>`__. Remember to initialize with ``git lfs install`` after installing.
.. note::
Installing Node.js version 6.x:
@ -39,7 +40,7 @@ Install environment dependencies
.. code-block:: bash
# Add apt sources from nodesource.com
# Add apt sources from nodesource.com
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
# Verify the latest version 6 of nodejs
apt-cache showpkg nodejs-legacy

Loading…
Cancel
Save