-
Notifications
You must be signed in to change notification settings - Fork 23
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.gitcd ace-
git checkout master(or any other suitable branch) -
yarn clean-node-modulesorrm -rf node_modules && rm -rf packages/*/node_modules(this is really only needed ifyarn installwas already invoked) -
yarn clean-libsorrm -rf packages/*/lib(this is really only needed ifyarn buildwas 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.lockchanges ifrm yarn.lockwas previously called)
yarn test
Additional commands introduced in this Pull Request:
yarn test-cliyarn test-electronyarn test-electron-cli
-
yarn build: invoke this script any time the source code is modified, in order to ensure thelibsubfolders 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).
-
ncuis recommended to discover out of date NPM packages, and to subsequentlyyarn upgradeorrm -rf node_modules && rm yarn.lock && yarn install(which, in both cases, will updateyarn.lockto match frozen versions of the latest available and approved dependencies). Use-x @types/nodeto skip specific comma-separated packages. Here is a handyncu.shshell 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/nodeto skip specific packages. Usenpm-check --skip-unused --no-emojifor 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 outdatedalso helps :)
Additional method introduced in this Pull Request:
-
package.jsoncontains a non-standardinnerPackageDependenciesJSON property which lists every NPM packages used by@daisysub-packages in theacemono-repository. When temporary renamed todependencies, this allowsncuto check the entire dependency tree for updates. - The aforementioned convenient
ncu.shshell script is included in this PR / branch.
Please visit this dedicated wiki page to learn more about how language resources are created and maintained.