-
Notifications
You must be signed in to change notification settings - Fork 22
Developer Workflow
Daniel Weck edited this page Aug 9, 2019
·
14 revisions
Note that a special branch and build system is required to integrate the Ace core components (i.e. this ace
mono-repository) into the Ace App project (ace-gui
repository). Please visit this dedicated wiki page to learn more.
-
cd MY_ACE_FOLDER
(choose your folder name / filesystem location) git clone https://github.com/daisy/ace.git
cd ace
-
git checkout master
(or any other suitable branch) -
yarn clean-node-modules
orrm -rf node_modules && rm -rf packages/*/node_modules
(this is really only needed ifyarn install
was already invoked) -
yarn clean-libs
orrm -rf packages/*/lib
(this is really only needed ifyarn build
was already invoked) -
rm yarn.lock
(advanced step: this is not normally necessary, and should only be used to upgrade NPM dependencies, use with caution!) -
yarn cache clean
(this step is optional, only necessary if the package cache is causing issues) -
yarn install
(this will automatically invokeyarn build
) -
git status && git --no-pager diff
(advanced step: this should showyarn.lock
changes ifrm yarn.lock
was previously called)
yarn test
Additional commands introduced in this Pull Request:
yarn test-cli
yarn test-electron
yarn test-electron-cli
-
yarn build
: invoke this script any time the source code is modified, in order to ensure thelib
subfolders of each Ace package are re-generated. -
yarn watch
: launch this script to automatically trigger the build step when code changes are detected. -
node packages/ace-cli/bin/ace.js -V -f -o "PATH_TO_OUTPUT_FOLDER" "PATH_TO_EPUB_FILE"
: this is just an example of how to run the locally-built Ace CLI.
Additional commands introduced in this Pull Request:
-
node node_modules/electron/cli.js ./packages/ace-axe-runner-electron/lib/cli.js -V -f -o "PATH_TO_OUTPUT_FOLDER" "PATH_TO_EPUB_FILE"
: this is just an example of how to run the locally-built Ace CLI, via the Electron-based Axe runner (which is used by the Ace App /ace-gui
) instead of the Puppeteer-based one (which is used by the Ace CLI). -
./compareAxeRunners.sh "PATH_TO_EPUB_FILE"
: this shell script invokes the Puppeteer-based Axe runner, followed by the Electron-based one. The script displays performance / timing information, and shows any differences in the generatedreport.json
(there shouldn't be any other than the date/time of the evaluation).
-
ncu
is recommended to discover out of date NPM packages, and to subsequentlyyarn upgrade
orrm -rf node_modules && rm yarn.lock && yarn install
(which, in both cases, will updateyarn.lock
to match frozen versions of the latest available and approved dependencies). Use-x @types/node
to skip specific comma-separated packages. Handyncu.sh
shell script to check each package in the mono-repository:
#!/bin/bash
for relativefilepath in packages/*; do
filename=`basename "${relativefilepath}"`
echo "${filename} (${relativefilepath})"
cd "${relativefilepath}"
ncu
cd - &> /dev/null
done
-
npm-check is a useful alternative / complement to
ncu
. Use--ignore @types/node
to skip specific packages. Usenpm-check --skip-unused --no-emoji
for cleaner shell output. -
david is a useful alternative / complement to
ncu
. The online service can be helpful too: https://david-dm.org/daisy/ace?type=dev -
yarn outdated
/npm outdated
also helps :)
Additional method introduced in this Pull Request:
-
package.json
contains a non-standardinnerPackageDependencies
JSON property which lists every NPM packages used by@daisy
sub-packages in theace
mono-repository. When temporary renamed todependencies
, this allowsncu
to check the entire dependency tree for updates.
Please visit this dedicated wiki page to learn more about how language resources are created and maintained.