A node/angular web application that interfaces with the Intake24 backend to allow users to manage food databases for multiple languages.
All JavaScript is built into public/intake24-admin.js
from src/js/intake24-admin.js
.
All CSS is built into public/style.css
from src/styl/style.styl
.
To build scripts and styles for production run grunt --config={your_config.json}
.
Example config:
{
"apiBaseUrl": "http://localhost:9000/",
"stylusFrom": "src/styl/style.styl",
"stylusWatch": "src/styl/*",
"stylusTo": "public/style.css",
"browserifyFrom": "src/js/intake24-admin.js",
"browserifyTo": "src/js/temp/intake24-admin.browserified.js",
"buildJsTo": "public/intake24-admin.js",
"uglifyJs": false,
"includeCssMaps": true,
"includeJsMaps": true,
"watchStylus": true,
"watchJs": true,
"watchDebounceDelay": 5000
}
i18n is implemented using 'i18n-abide' by Mozilla ('https://github.com/mozilla/i18n-abide')
# Scrape strings into a POT file
/Users/edjenkins/MAMP/intake-node/node_modules/i18n-abide/node_modules/.bin/jsxgettext --keyword=_ -L pug --output-dir=/Users/edjenkins/MAMP/intake-node/locale/templates/LC_MESSAGES --from-code=utf-8 --output=messages.pot `find /Users/edjenkins/MAMP/intake-node -name '*.pug' | grep -v node_modules | grep -v .git`
# Create PO files
msginit --input=locale/templates/LC_MESSAGES/messages.pot --output-file=locale/ar/LC_MESSAGES/messages.po -l ar
# Compile JSON files
./node_modules/i18n-abide/bin/compile-json locale public/i18n