Skip to content

Commit b03a1b2

Browse files
[REF] *: Introduce o-spreadsheet-engine package
This commit is the first step towards running the Spreadsheet Model without the need of a web environment. It introduces the o-spreadsheet-engine package (almost empty for now) to host the model and all its dependencies (plugins, functions, ...). It should not have any impact in the development workflow as the npm commands have been updated to build/test/lint the new package as well. Task: 4179627 Co-authored-by: Vincent Schippefilt <vsc@odoo.com> Co-authored-by: Pierre Rousseau <pro@odoo.com>
1 parent e89a287 commit b03a1b2

File tree

17 files changed

+422
-167
lines changed

17 files changed

+422
-167
lines changed

.husky/post-checkout

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,15 @@ if [ "$HUSKY_POST_CHECKOUT" != 0 ]; then
66
npm install >/dev/null 2>&1
77
fi
88
fi
9+
10+
if [ ! -d "build/js/src" ]; then
11+
if [ -d "build" ]; then
12+
if [ "$OSTYPE" = "msys" ]; then
13+
# Windows (Git Bash/MSYS)
14+
cmd.exe /C "rmdir /s /q build"
15+
else
16+
# POSIX
17+
rm -rf build
18+
fi
19+
fi
20+
fi

.husky/pre-commit

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,19 @@ if [ "$HUSKY_PRE_COMMIT" != 0 ]; then
3737

3838
# Css wrap check
3939
node .husky/css_check.js
40+
41+
# Check that all package.json versions are the same as the root
42+
root_version=$(node -p "require('./package.json').version")
43+
mismatch=0
44+
for pkg in $(find packages -name package.json); do
45+
pkg_version=$(node -p "require('./$pkg').version")
46+
if [ "$pkg_version" != "$root_version" ]; then
47+
echo "Version mismatch: $pkg ($pkg_version) != root ($root_version)"
48+
mismatch=1
49+
fi
50+
done
51+
if [ $mismatch -ne 0 ]; then
52+
echo "❌ All package.json versions must match the root version."
53+
exit 1
54+
fi
4055
fi

demo/minimalist.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<script src="lib/chart_js_treemap.js"></script>
2525

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

2929
<!-- finally, we have the application -->
3030
<script src="minimalist.js" type="module"></script>

0 commit comments

Comments
 (0)