Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 12 additions & 0 deletions .husky/post-checkout
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,15 @@ if [ "$HUSKY_POST_CHECKOUT" != 0 ]; then
npm install >/dev/null 2>&1
fi
fi

if [ ! -d "build/js/src" ]; then
if [ -d "build" ]; then
if [ "$OSTYPE" = "msys" ]; then
# Windows (Git Bash/MSYS)
cmd.exe /C "rmdir /s /q build"
else
# POSIX
rm -rf build
fi
fi
fi
15 changes: 15 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,19 @@ if [ "$HUSKY_PRE_COMMIT" != 0 ]; then

# Css wrap check
node .husky/css_check.js

# Check that all package.json versions are the same as the root
root_version=$(node -p "require('./package.json').version")
mismatch=0
for pkg in $(find packages -name package.json); do
pkg_version=$(node -p "require('./$pkg').version")
if [ "$pkg_version" != "$root_version" ]; then
echo "Version mismatch: $pkg ($pkg_version) != root ($root_version)"
mismatch=1
fi
done
if [ $mismatch -ne 0 ]; then
echo "❌ All package.json versions must match the root version."
exit 1
fi
fi
2 changes: 1 addition & 1 deletion demo/minimalist.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<script src="lib/chart_js_treemap.js"></script>

<!-- after all the dependencies are loaded, we load the main spreadsheet library here -->
<script src="../build/o_spreadsheet.iife.js"></script>
<script src="../build/o-spreadsheet.iife.js"></script>

<!-- finally, we have the application -->
<script src="minimalist.js" type="module"></script>
Expand Down
2 changes: 1 addition & 1 deletion doc/add_function.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
## Adding a new custom function

The `addFunction` method takes a name, and a function description which should
implement the [`AddFunctionDescription`](https://github.com/odoo/o-spreadsheet/blob/49285322f75dda2d5bab4aea04daa2a3d6c28370/src/types/functions.ts#L31) interface. `addFunction` will return an object to allow chain calls.
implement the [`Functions`](https://github.com/odoo/o-spreadsheet/blob/49285322f75dda2d5bab4aea04daa2a3d6c28370/src/types/functions.ts#L31) interface. `addFunction` will return an object to allow chain calls.

Below is a skeleton example to add multiple functions.

Expand Down
Loading