Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/aut 3966/redesign wysiwyg latex #7

Open
wants to merge 819 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
819 commits
Select commit Hold shift + click to select a range
a22f537
convert DigitGroupingChar to ES6 class
mikehaverstock Nov 30, 2021
089b5a7
convert Digit to ES6 class
mikehaverstock Nov 30, 2021
4d4a29b
pass bundle through typescript with es5 target
mikehaverstock Nov 30, 2021
4215e40
convert Variable to ES6 class
mikehaverstock Nov 30, 2021
2a3bb7f
convert Letter to ES6 class
mikehaverstock Nov 30, 2021
de28319
convert OperatorName to ES6 class
mikehaverstock Dec 1, 2021
dad0fd8
convert LatexCcmds.operatorname to ES6 class
mikehaverstock Dec 1, 2021
1d7d036
convert LatexCcmds.f to ES6 class
mikehaverstock Dec 1, 2021
fcec2a0
convert LatexCmds space and period to ES6 class
mikehaverstock Dec 1, 2021
b4ed1d1
convert NonSymbolaSymbol to ES6 class
mikehaverstock Dec 1, 2021
b6b122f
convert % to ES6 class
mikehaverstock Dec 1, 2021
5187aec
convert greek letters to ES6 class
mikehaverstock Dec 1, 2021
739c72c
convert LatexFragment to ES6 class
mikehaverstock Dec 1, 2021
88cb05b
convert makeTextBlock to ES6 class
mikehaverstock Dec 1, 2021
828dd26
remove TextBlock extension and makOperatorName
mikehaverstock Dec 1, 2021
cc59cc7
convert LatexCmds.notin to ES6 class
mikehaverstock Dec 1, 2021
002c58e
convert LatexCmds.mathbb to ES6 class
mikehaverstock Dec 1, 2021
1428586
simplify space and . LatexCmds
mikehaverstock Dec 1, 2021
62d9ff0
convert PlusMinus to ES6 class
mikehaverstock Dec 1, 2021
c9a6513
convert + and - to ES6 class
mikehaverstock Dec 1, 2021
e439dd4
convert To to ES6 class
mikehaverstock Dec 1, 2021
6e47835
convert Inequality to ES6 class
mikehaverstock Dec 1, 2021
407c4a1
convert Greater to ES6 class
mikehaverstock Dec 1, 2021
26f182b
convert Equality to ES6 class
mikehaverstock Dec 1, 2021
8fc43ee
convert Sim and Approx to ES6 class
mikehaverstock Dec 1, 2021
deb3b4b
convert Style to ES6 class
mikehaverstock Dec 1, 2021
9186813
convert mathrm to ES6 class
mikehaverstock Dec 1, 2021
18347c3
convert dot to ES6 class
mikehaverstock Dec 1, 2021
9c6bf37
convert textcolor to ES6 class
mikehaverstock Dec 1, 2021
57618b6
convert ans and percentof to ES6 class
mikehaverstock Dec 1, 2021
2699ad0
convert LatexCmds.class to ES6 class
mikehaverstock Dec 1, 2021
1eb8f95
convert SupSub to ES6 class
mikehaverstock Dec 1, 2021
7f1dc32
convert LatexCmds._ to ES6 class
mikehaverstock Dec 1, 2021
468ce6d
convert LatexCmds[^] to ES6 class
mikehaverstock Dec 1, 2021
999a2d3
convert SummationNotation to ES6 class
mikehaverstock Dec 1, 2021
3319312
convert LatexCommands.int to ES6 class
mikehaverstock Dec 1, 2021
d23034b
convert Frac to ES6 class
mikehaverstock Dec 1, 2021
3fe5e0b
convert LatexCmds[/] to ES6 class
mikehaverstock Dec 1, 2021
06a0da8
convert SquareRoot to ES6 class
mikehaverstock Dec 1, 2021
0db189b
convert Hat to ES6 class
mikehaverstock Dec 1, 2021
533e594
convert Nthroot to ES6 class
mikehaverstock Dec 1, 2021
fca4eeb
convert cbrt to ES6 class
mikehaverstock Dec 1, 2021
593bcb9
convert DiacriticAbov to ES6 class
mikehaverstock Dec 1, 2021
37b787b
convert Embed to ES6 class
mikehaverstock Dec 1, 2021
bcf44ed
convert LatexCmds.left and right to ES6 class
mikehaverstock Dec 1, 2021
8c57075
convert MathQuillMathField to ES6 class
mikehaverstock Dec 1, 2021
3adaf31
convert Bracket to ES6 class
mikehaverstock Dec 1, 2021
fcdd973
convert Binomial to ES6 class
mikehaverstock Dec 1, 2021
e3ded45
convert LatexCmds.choose to ES6 class
mikehaverstock Dec 1, 2021
382dd5f
convert ChNode to ES6 class
mikehaverstock Dec 1, 2021
089a8db
convert LatexCommandInput to ES6 class
mikehaverstock Dec 1, 2021
a46637d
convert Aria to ES6 class
mikehaverstock Dec 1, 2021
c9425a6
convert Parser to ES6 class
mikehaverstock Dec 1, 2021
d5c2516
convert Options to ES6 class
mikehaverstock Dec 1, 2021
2c5e6a8
convert Progenote to ES6 class
mikehaverstock Dec 2, 2021
a41e2b2
convert EditableField to ES6 class
mikehaverstock Dec 2, 2021
ebf5fb6
convert StaticMath to ES6 class
mikehaverstock Dec 2, 2021
3911c00
remove unnecessary super() calls
mikehaverstock Dec 2, 2021
2c277c3
cleanup some uses of .call(this)
mikehaverstock Dec 2, 2021
5c092ce
convert RootMathBlock to ES6 class
mikehaverstock Dec 2, 2021
cc0b19f
convert MathField to ES6 class
mikehaverstock Dec 2, 2021
8563f80
convert TextField to ES6 class
mikehaverstock Dec 2, 2021
638a733
convert InnerMathField to ES6 class
mikehaverstock Dec 2, 2021
50b83fa
use $.fn instead of PJS to extend jquery
mikehaverstock Dec 2, 2021
2add4c3
remove PJS example in docs
mikehaverstock Dec 2, 2021
a54f0c1
move Controller.onNotify() calls outside of Controller.open()
mikehaverstock Dec 2, 2021
1a874a7
convert Controller to ES6 class
mikehaverstock Dec 2, 2021
c1269bc
remove PJS from build system
mikehaverstock Dec 2, 2021
fe3e836
remove pjs from dependencies
mikehaverstock Dec 2, 2021
3781a3d
remove Controller.open from exportLatex
mikehaverstock Dec 2, 2021
990fbec
remove Controller.open from focusBlur.js
mikehaverstock Dec 2, 2021
d3510f2
remove Controller.open from keystroke.js
mikehaverstock Dec 2, 2021
66cb4df
remove Controlleer.open from latex.js
mikehaverstock Dec 2, 2021
b2f9754
remove Controller.open from mouse.js
mikehaverstock Dec 2, 2021
b64bf78
remove Controller.open from scrollHoriz
mikehaverstock Dec 2, 2021
bd508d8
remove Controller.open from textarea.js
mikehaverstock Dec 2, 2021
a4033fe
remove ControllerBase::open()
mikehaverstock Dec 2, 2021
4c6474e
remove Controller.open from scrollHoriz.js
mikehaverstock Dec 2, 2021
6f441a8
move .supsub to instance property
mikehaverstock Dec 2, 2021
0e4965f
remove Cursor::init()
mikehaverstock Dec 3, 2021
116e936
remove ::init() from StaticMath and AbstractMathQuill
mikehaverstock Dec 3, 2021
8816811
remove a bunch of .init() methods
mikehaverstock Dec 3, 2021
9482c83
remove stale comment
mikehaverstock Dec 3, 2021
2ba5fca
remove more .init() methods
mikehaverstock Dec 3, 2021
9f5aa98
add super() to MathCommand
mikehaverstock Dec 3, 2021
7e7b2c2
use super() in Cmds.integral
mikehaverstock Dec 3, 2021
86b71e9
use super() within Cmds.f
mikehaverstock Dec 3, 2021
1204e7e
use super() within OperatorName
mikehaverstock Dec 3, 2021
904013f
remove init() from MathCommand and NodeBase
mikehaverstock Dec 3, 2021
7a11f60
switch defaults from prototype properties to class fields
mikehaverstock Dec 3, 2021
7491778
add make lint to run typechecking
mikehaverstock Dec 4, 2021
66acc91
remove bind()
mikehaverstock Dec 4, 2021
00b4523
move jQuery and pray to utils.ts
mikehaverstock Dec 4, 2021
cf0b5e5
Node -> MQNode to avoid type issues
mikehaverstock Dec 4, 2021
88285f6
Symbol -> MQSymbol to avoid type issues
mikehaverstock Dec 4, 2021
fac13a4
move MQNode fields out of constructor
mikehaverstock Dec 4, 2021
058e458
cleanup in preparation for switching to .ts file
mikehaverstock Dec 4, 2021
2048922
rename Selection -> MQSelection to avoid type issues
mikehaverstock Dec 4, 2021
2019b97
add type info for NodeBase
mikehaverstock Dec 5, 2021
3840b23
fix types in keystroke.js
mikehaverstock Dec 5, 2021
e65db59
rename keystroke.js -> keystroke.ts
mikehaverstock Dec 5, 2021
362e1bb
rename tree.js -> tree.ts
mikehaverstock Dec 5, 2021
1c419ff
fix types in tree.ts
mikehaverstock Dec 5, 2021
c522114
rename cursor.js -> cursor.ts
mikehaverstock Dec 5, 2021
0da95d7
fix type errors in cursor.ts
mikehaverstock Dec 5, 2021
ebcd2e7
rename aria.js -> aria.ts
mikehaverstock Dec 5, 2021
2f5fcca
fix type errors in aria.ts
mikehaverstock Dec 5, 2021
e567a74
rename controller.js -> controller.js
mikehaverstock Dec 5, 2021
b666d46
fix type errors in controller.ts
mikehaverstock Dec 5, 2021
223f4de
rename parser.util.js -> parser.util.ts
mikehaverstock Dec 5, 2021
6a9b83b
Add typings to parser lib
jwmerrill Dec 6, 2021
2d48080
Narrow argument type of onSuccess
jwmerrill Dec 6, 2021
82a2673
Improve type of result local in times
jwmerrill Dec 6, 2021
bbb5ece
rename saneKeyboardEvents.utils.js to ts
mikehaverstock Dec 7, 2021
39935cb
fix types in saneKeyboardEvents.utils.ts
mikehaverstock Dec 7, 2021
dd199c3
rename exportText.js to ts
mikehaverstock Dec 7, 2021
27ff97b
fix types in exportText.ts
mikehaverstock Dec 7, 2021
5e2037d
rename focusBlur.js to ts
mikehaverstock Dec 7, 2021
e61b2a2
fix types in focusBlur and then all issues in keystroke.ts
mikehaverstock Dec 7, 2021
b3f7586
move latex.js to ts
mikehaverstock Dec 7, 2021
712cc23
fix type errors in latex.ts
mikehaverstock Dec 7, 2021
7e2bc6f
rename mouse.js to ts
mikehaverstock Dec 7, 2021
3a9857e
fix type errors in mouse.ts
mikehaverstock Dec 7, 2021
3266b53
rename scrollHoriz.js to ts
mikehaverstock Dec 7, 2021
245e7c8
fix type errors in scrollHoriz.ts
mikehaverstock Dec 7, 2021
4cd9fc4
rename textarea.js to ts
mikehaverstock Dec 7, 2021
f98bebf
fix type errors in textarea.ts
mikehaverstock Dec 8, 2021
cca7984
rename math.js to ts
mikehaverstock Dec 8, 2021
4e2ba6a
fix type errors in math.ts
mikehaverstock Dec 8, 2021
f72d143
add types for CursorOptions
mikehaverstock Dec 9, 2021
9f1a2d9
add types for jquery
mikehaverstock Dec 9, 2021
0431096
rename publicapi.js to ts
mikehaverstock Dec 9, 2021
9cb4430
fix types in publicapi.ts
mikehaverstock Dec 9, 2021
4bee744
expand list of math files
mikehaverstock Dec 9, 2021
512559d
rename advancedSymbols.js to advancedSymbols.ts
mikehaverstock Dec 9, 2021
296a258
fix type errors in advancedSymbols.ts
mikehaverstock Dec 9, 2021
1a6429d
fix types in advancedSymbols.ts
mikehaverstock Dec 9, 2021
0d768e2
rename commands.js to ts
mikehaverstock Dec 9, 2021
c156025
wip - fix errors commands.ts
mikehaverstock Dec 10, 2021
896df16
finish fixing type errors in commands.ts
mikehaverstock Dec 10, 2021
1a97975
rename basicSymbols.js to ts
mikehaverstock Dec 14, 2021
7dea77c
fix type errors in basicSymbols.ts
mikehaverstock Dec 14, 2021
413e9d2
OperatorName has optional fn parameter -- only to fix type errors?
mikehaverstock Dec 15, 2021
a3a80c9
rename LatexCommandInput.js to ts
mikehaverstock Dec 15, 2021
98a56ab
fix type errors in LatexCommandInput.ts
mikehaverstock Dec 15, 2021
33d3370
rename text.js to ts
mikehaverstock Dec 15, 2021
c9ac46b
fix type errors in text.ts
mikehaverstock Dec 15, 2021
6618898
fix typo caught by fuzz testing
mikehaverstock Dec 17, 2021
c6be5d6
rename Controller_exportLatex -> exportText
mikehaverstock Jan 3, 2022
a565df2
remove obviously unhelpful TODOs
mikehaverstock Jan 3, 2022
242a70d
improve remaining TODO comments
mikehaverstock Jan 3, 2022
ae2c6ae
rename temp_types.d.ts -> shared_types.d.ts
mikehaverstock Jan 3, 2022
a822249
Merge pull request #168 from desmosinc/typescript
mikehaverstock Jan 3, 2022
404f186
remove bad global Node unset
mikehaverstock Jan 8, 2022
328c71b
Merge pull request #171 from desmosinc/remove-node-unset
mikehaverstock Jan 10, 2022
23d2a1b
Scope ARIA alert element down to MQ's textarea
sclower Jan 14, 2022
9124461
Create separate ARIA instances per controller
sclower Jan 14, 2022
0c0d24b
Tweak how ARIA DOM is created and attached to textarea
sclower Jan 18, 2022
362c20e
Modify Aria alert method
sclower Jan 18, 2022
61c48bb
Fix linting
sclower Jan 18, 2022
93bd1f5
Merge pull request #172 from desmosinc/ts-scope-ara
sclower Jan 18, 2022
9c2a0cc
Fix overarrow positioning
jwmerrill Jan 19, 2022
01f661b
Remove now-unreferenced arrow styles
jwmerrill Jan 19, 2022
8d8eccb
Merge pull request #173 from desmosinc/fix-overarrow-positioning
jwmerrill Jan 19, 2022
022c3ba
Add transparentDelimiters option
sclower Jan 20, 2022
4284fb2
Fix linting
sclower Jan 20, 2022
5b08f94
Add method to process delimiter list
sclower Jan 20, 2022
9c86ca1
Add test
sclower Jan 20, 2022
aba4e1a
Respond to code review
sclower Jan 20, 2022
9f62fc7
Remove quiet delimiter check
sclower Jan 21, 2022
441f7fd
rm debug
sclower Jan 21, 2022
b2fcfc1
Make it required to pass cursor to blur (and finalizeInsert)
jwmerrill Jan 21, 2022
b60f41a
Merge remote-tracking branch 'origin/blur-always-gets-cursor' into ts…
sclower Jan 21, 2022
c440257
Add empty delimiter test by directly seting LaTeX
sclower Jan 21, 2022
05e0900
Merge pull request #174 from desmosinc/ts-optionally-hide-bracket-rec…
sclower Jan 21, 2022
5ee96db
Add some comments
Jan 24, 2022
7d5eb55
Merge pull request #177 from desmosinc/misc-comments
anandthakker Jan 24, 2022
5d73507
Add noAutoOpInSubscripts option
sclower Jan 24, 2022
d0b603f
Add tests
sclower Jan 24, 2022
fa50e5c
rm noAutoOpsInSubscripts to disableAutoOpsInSubscripts
sclower Jan 25, 2022
d67de64
disableAutoOpsInSubscripts affects auto commands
sclower Jan 25, 2022
3b04d57
Add benchmark of time to select n characters
jwmerrill Jan 26, 2022
ddd055e
Clean up benchmark
jwmerrill Jan 26, 2022
0a1e6fe
Merge pull request #180 from desmosinc/select-benchmark
jwmerrill Jan 26, 2022
5406c28
Rename option to disableAutoSubstitutionInSubscripts
sclower Jan 26, 2022
17f090c
Merge pull request #178 from desmosinc/ts-add-auto-op-subscript-expan…
sclower Jan 26, 2022
7c8edc5
Add prettier devDependency
Jan 26, 2022
52972ff
Run prettier on all .js and .ts files
Jan 26, 2022
e01de8c
Prettify and typecheck on precommit
Jan 26, 2022
ab60bda
Use ignore-revs-file to ignore prettier updates in git blame
Jan 26, 2022
d0530db
Prettify all .html files
Jan 26, 2022
03b30d4
Include .html files in precommit prettier
Jan 26, 2022
8546f1f
Prettify all .css files
Jan 26, 2022
f65f3cd
Add prettify-all make target
Jan 26, 2022
88a5937
Set singleQuote: true in prettier config
Jan 26, 2022
353fd24
prettify-all
Jan 26, 2022
2ccf689
Ignore blame for previous commit
Jan 26, 2022
26ad14c
Merge pull request #182 from desmosinc/add-prettier
anandthakker Jan 26, 2022
504833a
Add rendering performance benchmark page
Jan 26, 2022
7102983
Clean up benchmark/render.html
Jan 26, 2022
33c315f
Address review
Jan 26, 2022
2a5d308
Prettify render.html
Jan 26, 2022
1b8a6f8
Incrementalize selection (#176)
jwmerrill Jan 26, 2022
8eb1e83
Merge pull request #181 from desmosinc/add-rendering-benchmark
anandthakker Jan 26, 2022
f880944
Use npm ci instead of npm install when building
jwmerrill Jan 26, 2022
c0dd58a
Merge pull request #183 from desmosinc/make-npm-ci
jwmerrill Jan 26, 2022
3777d08
Move 1.0 circle.yml to new 2.0 location
laughinghan Aug 10, 2022
6a1b977
Upgrade CircleCI Docker image to "next-gen"
laughinghan Aug 23, 2022
87cb95c
Small fixes to SauceLabs script
laughinghan Aug 24, 2022
cbacd41
Actually upgrade CircleCI Docker image to next-gen
laughinghan Sep 1, 2022
fa22f00
[CI WIP] Run unit tests "in the background"
laughinghan Sep 1, 2022
80b303c
[CI] Install ImageMagick for stitching together screenshot pieces
laughinghan Sep 1, 2022
8e5568e
[CI] Add timings to screenshot-stitching script
laughinghan Sep 1, 2022
6bce2f9
[CI] Custom script instead of Sauce Labs JS unit test API
laughinghan Sep 1, 2022
47d0b26
[CI] Get rid of trivial server for saving results XML
laughinghan Sep 1, 2022
98325ac
[CI] Try to fix Circle test results parsing by un-nesting results file
laughinghan Sep 1, 2022
d6deba1
[CI] Unit test webdriver script exit code depends on test failure
laughinghan Sep 1, 2022
0110f65
[CI] Fix result XML parsing
laughinghan Sep 1, 2022
0e6b337
[CI] Move get_xunit() function earlier
laughinghan Sep 1, 2022
bc79baa
[CI] Fix Many-Worlds commit status API call
laughinghan Sep 1, 2022
6fae10a
[CI] Simplify unit test webdriver waiting for test completion
laughinghan Sep 1, 2022
ec41cea
[CI] Show error message in sauce_is_ready if present
laughinghan Sep 1, 2022
dadd208
[CI] Refactor screenshots/unit test webdriver YAML prep
laughinghan Sep 1, 2022
de7f70e
[CI] Disable script timeout in unit test webdriver
laughinghan Sep 1, 2022
57dabde
[CI] Fix disabling of unit test webdriver script timeout
laughinghan Sep 1, 2022
ba6b23d
[CI] Reset sauce_is_ready upon Sauce Connect failure
laughinghan Sep 1, 2022
89b85ce
[CI] Try to cache ImageMagick install
laughinghan Sep 1, 2022
9f3a198
[CI] Handle Sauce Connect 4.8.1 writing info to sauce_is_ready
laughinghan Sep 2, 2022
61eef2a
[CI] Properly bump CircleCI cache key
laughinghan Sep 2, 2022
b161c58
Merge pull request #991 from mathquill/ci.upgrade-to-circleci-2
jaltekruse Sep 6, 2022
b15ce1b
Merge branch 'master' into merge-with-upstream
jwmerrill Jan 25, 2023
f9a4edc
Bump browser-tools version
jwmerrill Sep 27, 2023
ee7073d
Merge pull request #1024 from desmosinc/fix-chrome-driver-download
jwmerrill Sep 27, 2023
5cacf81
Merge remote-tracking branch 'mathquill/master' into merge-with-upstream
jwmerrill Sep 27, 2023
8926a88
Bump package-lock.json
jwmerrill Sep 27, 2023
47710a7
Merge pull request #947 from desmosinc/merge-with-upstream
jwmerrill Sep 27, 2023
49bba38
Fix npm install race in CI
jwmerrill Sep 27, 2023
28055da
Add LICENSE to root
nedredmond Sep 29, 2023
b898267
Update README.md
nedredmond Sep 29, 2023
e9217d1
Merge pull request #1027 from desmosinc/fix-ci-race
jwmerrill Oct 2, 2023
01d4abb
Fix missing comma in unit.html
jwmerrill Oct 2, 2023
fd70d29
Fix passing xunit output to webdriver
jwmerrill Oct 2, 2023
ca30110
Merge pull request #1030 from desmosinc/fix-unit-test-merge
jwmerrill Oct 2, 2023
a337b54
Merge remote-tracking branch 'mathquill/master' into fix-selection-pe…
jwmerrill Oct 2, 2023
58e2143
Merge pull request #1025 from desmosinc/fix-selection-perf-merge
jwmerrill Oct 2, 2023
a58cd42
Merge branch 'mathquill:master' into master
nedredmond Oct 4, 2023
a38bfa0
Merge pull request #1028 from nedredmond/master
kschaefe Oct 4, 2023
9f91d49
Merge remote-tracking branch 'upstream/master' into feature/AUT-3966/…
taopkorczak Dec 17, 2024
e35d936
chore: update code from main fork; Add commands: wideparen, stackrel
taopkorczak Dec 18, 2024
5debbce
fix: change wideparen to overparen
taopkorczak Dec 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
163 changes: 47 additions & 116 deletions circle.yml → .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
#
# then translated from 1.0 to 2.0 with: https://circleci.com/docs/2.0/config-translation/

version: 2
version: 2.1
# browser-tools orb that provides installers for various browsers: https://circleci.com/developer/orbs/orb/circleci/browser-tools
orbs:
browser-tools: circleci/browser-tools@1.4.6
jobs:
build:
working_directory: ~/mathquill/mathquill
Expand All @@ -44,18 +47,12 @@ jobs:
environment:
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
# In CircleCI 1.0 we used a pre-configured image with a large number of languages and other packages.
# In CircleCI 2.0 you can now specify your own image, or use one of our pre-configured images.
# The following configuration line tells CircleCI to use the specified docker image as the runtime environment for you job.
# We have selected a pre-built image that mirrors the build environment we use on
# the 1.0 platform, but we recommend you choose an image more tailored to the needs
# of each job. For more information on choosing an image (or alternatively using a
# VM instead of a container) see https://circleci.com/docs/2.0/executor-types/
# To see the list of pre-built images that CircleCI provides for most common languages see
# https://circleci.com/docs/2.0/circleci-images/
# Docker image with browser testing tools: https://discuss.circleci.com/t/legacy-convenience-image-deprecation/41034#browser-testing-4
docker:
- image: circleci/node:lts-browsers
- image: cimg/node:lts-browsers
steps:
# install browsers: https://circleci.com/developer/orbs/orb/circleci/browser-tools
- browser-tools/install-browser-tools
# Machine Setup
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
# The following `checkout` command checks out your code to your working directory. In 1.0 we did this implicitly. In 2.0 you can choose where in the course of a job your code should be checked out.
Expand All @@ -70,11 +67,11 @@ jobs:
- restore_cache:
keys:
# This branch if available
- v1-dep-{{ .Branch }}-
- v3-dep-{{ .Branch }}-
# Default branch if not
- v1-dep-master-
- v3-dep-master-
# Any branch if there are none on the default branch - this should be unnecessary if you have your default branch configured correctly
- v1-dep-
- v3-dep-
# This is based on your 1.0 configuration file or project settings
- run:
command: |-
Expand All @@ -90,8 +87,8 @@ jobs:
if [ -x sc-*-linux/bin/sc ]; then
echo Using cached sc-*-linux/bin/sc
else
time wget https://saucelabs.com/downloads/sc-4.7.1-linux.tar.gz
time tar -xzf sc-4.7.1-linux.tar.gz
time wget https://saucelabs.com/downloads/sc-4.8.1-linux.tar.gz
time tar -xzf sc-4.8.1-linux.tar.gz
fi

time sc-*-linux/bin/sc --user $SAUCE_USERNAME --api-key $SAUCE_ACCESS_KEY \
Expand All @@ -100,8 +97,8 @@ jobs:

echo 'Sauce Connect failed, try redownloading (https://git.io/vSxsJ)'
rm -rf *
time wget https://saucelabs.com/downloads/sc-4.7.1-linux.tar.gz
time tar -xzf sc-4.7.1-linux.tar.gz
time wget https://saucelabs.com/downloads/sc-4.8.1-linux.tar.gz
time tar -xzf sc-4.8.1-linux.tar.gz

time sc-*-linux/bin/sc --user $SAUCE_USERNAME --api-key $SAUCE_ACCESS_KEY \
--readyfile ~/sauce_is_ready
Expand All @@ -111,13 +108,27 @@ jobs:
| tee /dev/stderr > ~/sauce_is_ready
exit 1
background: true
- run: |-
# Format build name $MQ_CI_BUILD_NAME
# https://circleci.com/docs/environment-variables/
build_name="CircleCI build #$CIRCLE_BUILD_NUM"
if [ $CIRCLE_PR_NUMBER ]; then
build_name="$build_name: PR #$CIRCLE_PR_NUMBER"
[ "$CIRCLE_BRANCH" ] && build_name="$build_name ($CIRCLE_BRANCH)"
else
build_name="$build_name: $CIRCLE_BRANCH"
fi
build_name="$build_name @ ${CIRCLE_SHA1:0:7}"
export MQ_CI_BUILD_NAME="$build_name"
# The following line was run implicitly in your 1.0 builds based on what CircleCI inferred about the structure of your project. In 2.0 you need to be explicit about which commands should be run. In some cases you can discard inferred commands if they are not relevant to your project.
- run: if [ -z "${NODE_ENV:-}" ]; then export NODE_ENV=test; fi
- run: export PATH="~/mathquill/mathquill/node_modules/.bin:$PATH"
- run: npm install
- run: npm install wd
- run: sudo apt-get install -y imagemagick
# Save dependency cache
- save_cache:
key: v1-dep-{{ .Branch }}-{{ epoch }}
key: v3-dep-{{ .Branch }}-{{ epoch }}
paths:
# This is a broad list of cache paths to include many possible development environments
# You can probably delete some of these entries
Expand All @@ -132,13 +143,15 @@ jobs:
# These cache paths were specified in the 1.0 config
- ~/sauce-connect
- ./node_modules
# Based on: https://xyxyx.org/posts/2019-04-09-saving-the-debian-package-cache-on-circleci.html
- /var/cache/apt/archives
# Test
# This would typically be a build job when using workflows, possibly combined with build
# This is based on your 1.0 configuration file or project settings
- run: |-
# Generate link to Many-Worlds build and add to GitHub Commit Status
curl -i -X POST https://api.github.com/repos/mathquill/mathquill/statuses/$CIRCLE_SHA1 \
-u MathQuillBot:$GITHUB_STATUS_API_KEY \
-u laughinghan:$GITHUB_STATUS_ACCESS_TOKEN \
-d '{
"context": "ci/many-worlds",
"state": "success",
Expand All @@ -149,117 +162,35 @@ jobs:
# https://david263a.wordpress.com/2015/04/18/fixing-safari-cant-connect-to-localhost-issue-when-using-sauce-labs-connect-tunnel/
# https://support.saucelabs.com/customer/portal/questions/14368823-requests-to-localhost-on-microsoft-edge-are-failing-over-sauce-connect
- run:
command: PORT=8000 make server
command: PORT=8000 NO_INSTALL=1 make server
background: true
# Wait for tunnel to be ready (`make server` is much faster, no need to wait for it)
- run: while [ ! -e ~/sauce_is_ready ]; do sleep 1; done; touch ~/sauce_was_ready; test -z "$(<~/sauce_is_ready)"
- run: |-
while [ ! -e ~/sauce_is_ready ]; do sleep 1; done
touch ~/sauce_was_ready
cat ~/sauce_is_ready
# this is how you check if a string starts with another string in Bash
# https://stackoverflow.com/a/2172367/362030
[[ "$(<~/sauce_is_ready)" != ERROR:* ]]
# This is based on your 1.0 configuration file or project settings
- run:
command: |-
# Screenshots: capture in the background while running unit tests
mkdir -p $CIRCLE_TEST_REPORTS/mocha

# CircleCI expects test results to be reported in an JUnit/xUnit-style XML file:
# https://circleci.com/docs/test-metadata/#a-namemochajsamocha-for-nodejs
# Our unit tests are in a browser, so they can't write to a file, and Sauce
# apparently truncates custom data in their test result reports, so instead we
# POST to this trivial Node server on localhost:9000 that writes the body of
# any POST request to $CIRCLE_TEST_REPORTS/junit/test-results.xml
node -e '
require("http").createServer(function(req, res) {
res.setHeader("Access-Control-Allow-Origin", "*");
req.pipe(process.stdout);
req.on("end", res.end.bind(res));
})
.listen(9000);
console.error("listening on http://0.0.0.0:9000/");
' 2>&1 >$CIRCLE_TEST_REPORTS/junit/test-results.xml | {
# ^ note: `2>&1` must precede `>$CIRCLE_TEST_REPORTS/...` because
# shell redirect is like assignment; if it came after, then both
# stdout and stderr would be written to `xunit.xml` and nothing
# would be piped into here

head -1 # wait for "listening on ..." to be logged

# https://circleci.com/docs/environment-variables/
build_name="CircleCI build #$CIRCLE_BUILD_NUM"
if [ $CIRCLE_PR_NUMBER ]; then
build_name="$build_name: PR #$CIRCLE_PR_NUMBER"
[ "$CIRCLE_BRANCH" ] && build_name="$build_name ($CIRCLE_BRANCH)"
else
build_name="$build_name: $CIRCLE_BRANCH"
fi
build_name="$build_name @ ${CIRCLE_SHA1:0:7}"
export MQ_CI_BUILD_NAME="$build_name"

time { test -d node_modules/wd || npm install wd; }
time node script/screenshots.js http://localhost:8000/test/visual.html \
&& touch ~/screenshots_are_ready || echo EXIT STATUS $? | tee /dev/stderr > ~/screenshots_are_ready:
}
time node script/screenshots.js http://localhost:8000/test/visual.html \
&& touch ~/screenshots_are_ready || echo EXIT STATUS $? | tee /dev/stderr > ~/screenshots_are_ready:
background: true
- run: |-
# Unit tests in the browser

echo '1. Launch tests'
echo

# https://circleci.com/docs/environment-variables/
build_name="CircleCI build #$CIRCLE_BUILD_NUM"
if [ $CIRCLE_PR_NUMBER ]; then
build_name="$build_name: PR #$CIRCLE_PR_NUMBER"
[ "$CIRCLE_BRANCH" ] && build_name="$build_name ($CIRCLE_BRANCH)"
else
build_name="$build_name: $CIRCLE_BRANCH"
fi
build_name="$build_name @ ${CIRCLE_SHA1:0:7}"

# "build" and "customData" parameters from:
# https://wiki.saucelabs.com/display/DOCS/Test+Configuration+Options#TestConfigurationOptions-TestAnnotation
set -o pipefail
curl -i -X POST https://saucelabs.com/rest/v1/$SAUCE_USERNAME/js-tests \
-u $SAUCE_USERNAME:$SAUCE_ACCESS_KEY \
-H 'Content-Type: application/json' \
-d '{
"name": "Unit tests, Mocha",
"build": "'"$build_name"'",
"customData": {"build_url": "'"$CIRCLE_BUILD_URL"'"},
"framework": "mocha",
"url": "http://localhost:8000/test/unit.html?post_xunit_to=http://localhost:9000",
"platforms": [["", "Chrome", ""]]
}' \
| tee /dev/stderr | tail -1 > js-tests.json

echo '2. Wait for tests to finish:'
echo
# > Make the request multiple times as the tests run until the response
# > contains `completed: true` to the get the final results.
# https://wiki.saucelabs.com/display/DOCS/JavaScript+Unit+Testing+Methods
while true # Bash has no do...while >:(
do
sleep 5
curl -i -X POST https://saucelabs.com/rest/v1/$SAUCE_USERNAME/js-tests/status \
-u $SAUCE_USERNAME:$SAUCE_ACCESS_KEY \
-H 'Content-Type: application/json' \
-d @js-tests.json \
| tee /dev/stderr | tail -1 > status.json

# deliberately do `... != false` rather than `... == true`
# because unexpected values should break rather than infinite loop
[ "$(jq .completed <status.json)" != false ] && break
done

echo '3. Exit with non-zero status code if any unit tests failed'
exit "$(jq '.["js tests"][0].result.failures' <status.json)"
node script/unit_test_webdriver.js http://localhost:8000/test/unit.html?xunit=true
- run: |-
# Stitch together screenshots and diff against master

echo '0. Wait for screenshots to be ready'
while [ ! -e ~/screenshots_are_ready ]; do sleep 1; done
time while [ ! -e ~/screenshots_are_ready ]; do sleep 1; done
test -z "$(<~/screenshots_are_ready)" || exit 1

echo '1. Stitch together pieces'
for img in $(ls $CIRCLE_ARTIFACTS/imgs/pieces/); do
convert $(ls -1 $CIRCLE_ARTIFACTS/imgs/pieces/$img/*.png | sort -n) -append $CIRCLE_ARTIFACTS/imgs/$img.png
time for img in $(ls $CIRCLE_ARTIFACTS/imgs/pieces/); do
time convert $(ls -1 $CIRCLE_ARTIFACTS/imgs/pieces/$img/*.png | sort -n) -append $CIRCLE_ARTIFACTS/imgs/$img.png
done

echo '2. Download the latest screenshots from master'
Expand Down
4 changes: 4 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
52972ff01abab19a5861ac2364efc7471c336ae7
d0530dbba74c87bbeb02433a490c49c28c1deb9d
8546f1fd2784ef579ef951c6d3ec4c20b1b156c5
353fd24b7d01420d405377985dc5a43ea7b69498
2 changes: 2 additions & 0 deletions .gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[blame]
ignoreRevsFile = .git-blame-ignore-revs
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
8 changes: 8 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

# run prettier on staged files
npx lint-staged

# typecheck
make lint
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.min.js
*.min.css
build
src/intro.js
src/outro.js
test/support/jquery-1.5.2.js
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
4 changes: 4 additions & 0 deletions BUILDING
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,9 @@ re-make, and also serve the demo, the unit tests, and the visual tests.
unit tests -> http://localhost:9292/test/unit.html
visual tests -> http://localhost:9292/test/visual.html

If building on Windows:
1. Install GNU Make from http://gnuwin32.sourceforge.net/packages/make.htm. Do not use make derivitives from mSYS or MinGW. Ensure the location of make.exe is added to your PATH environment variable.
2. Grab the latest Git for Windows from https://git-scm.com/download/win. When installing, add Git and its optional shell tools to your PATH environment variable (these questions are asked during setup).

If any of this does not work, please let us know! We want to make
hacking on mathquill as easy as possible.
Loading