generated from openedx/frontend-template-application
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f311cc0
commit 1315ea0
Showing
30 changed files
with
7,632 additions
and
13,953 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
20 | ||
18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,15 @@ | ||
intl_imports = ./node_modules/.bin/intl-imports.js | ||
transifex_utils = ./node_modules/.bin/transifex-utils.js | ||
i18n = ./src/i18n | ||
transifex_input = $(i18n)/transifex_input.json | ||
|
||
# This directory must match .babelrc . | ||
transifex_temp = ./temp/babel-plugin-formatjs | ||
|
||
precommit: | ||
npm run lint | ||
npm audit | ||
|
||
requirements: | ||
npm ci | ||
|
||
i18n.extract: | ||
# Pulling display strings from .jsx files into .json files... | ||
rm -rf $(transifex_temp) | ||
npm run-script i18n_extract | ||
|
||
i18n.concat: | ||
# Gathering JSON messages into one file... | ||
$(transifex_utils) $(transifex_temp) $(transifex_input) | ||
|
||
extract_translations: | requirements i18n.extract i18n.concat | ||
|
||
# Despite the name, we actually need this target to detect changes in the incoming translated message files as well. | ||
detect_changed_source_translations: | ||
# Checking for changed translations... | ||
git diff --exit-code $(i18n) | ||
|
||
# Pulls translations using atlas. | ||
pull_translations: | ||
mkdir src/i18n/messages | ||
cd src/i18n/messages \ | ||
&& atlas pull $(ATLAS_OPTIONS) \ | ||
translations/frontend-platform/src/i18n/messages:frontend-platform \ | ||
translations/paragon/src/i18n/messages:paragon \ | ||
translations/frontend-component-footer/src/i18n/messages:frontend-component-footer \ | ||
translations/frontend-component-header/src/i18n/messages:frontend-component-header \ | ||
translations/frontend-template-application/src/i18n/messages:frontend-template-application | ||
|
||
$(intl_imports) frontend-platform paragon frontend-component-header frontend-component-footer frontend-template-application | ||
|
||
build: | ||
rm -rf ./dist | ||
./node_modules/.bin/fedx-scripts babel src --out-dir dist --source-maps --ignore **/*.test.jsx,**/*.test.js,**/setupTest.js --copy-files | ||
@# --copy-files will bring in everything else that wasn't processed by babel. Remove what we don't want. | ||
@find dist -name '*.test.js*' -delete | ||
cp ./package.json ./dist/package.json | ||
cp ./LICENSE ./dist/LICENSE | ||
cp ./README.md ./dist/README.md |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.