Skip to content

Commit

Permalink
Add import demos useful for testing handsontable/hyperformula#1377 (#27)
Browse files Browse the repository at this point in the history
* Add demos for different ways of importing HyperFormula

* Update parcel demo to 2.11

* Test also the new ways of importing HF

* Add import demo for webpack 4

* Remove webpack4 import demo

* Add import demo webpack 4

* Add import demo for webpack 5 with ESM

* Add import demo for webpack 5 with CJS

* Add import demo for Webpack 5 with typescript

* Add import demo for Svelte

* Add import demo angular ESM

* Make angular 18 import demo work

* Add import demo for angular 16 and typescript 4

* Add Angular 18 sample app

* Add more angular demos

* Add import-demo-esm-webpack-5-ts-5 demo with a webpack boilerplate code (without typescript yet)

* Add webpack+TS demos

* Add webpack 5 demo without babel

* Add webpack 4 demo without babel

* Fix import-demo-esm-webpack-4-babel

* Remove babel from import-demo-esm-parcel
  • Loading branch information
sequba authored Jan 7, 2025
1 parent a137eb8 commit c5ed054
Show file tree
Hide file tree
Showing 181 changed files with 179,752 additions and 0 deletions.
26 changes: 26 additions & 0 deletions import-demo-cjs-node/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const { HyperFormula, AlwaysDense } = require('hyperformula');

// new way
const { enUS } = require('hyperformula/i18n/languages');
const { default: frFR } = require('hyperformula/i18n/languages/frFR');

// legacy way
const { csCZ } = require('hyperformula/commonjs/i18n/languages');
const { default: daDK } = require('hyperformula/commonjs/i18n/languages/daDK');
const { default: deDE } = require('hyperformula/commonjs/i18n/languages/deDE.js');

console.log(HyperFormula != null);
console.log(AlwaysDense != null);
console.log(enUS != null);
console.log(frFR != null);
console.log(csCZ != null);
console.log(daDK != null);
console.log(deDE != null);

HyperFormula.registerLanguage('enUS', enUS);
HyperFormula.registerLanguage('frFR', frFR);
HyperFormula.registerLanguage('csCZ', csCZ);
HyperFormula.registerLanguage('daDK', daDK);
HyperFormula.registerLanguage('deDE', deDE);

// npm i --registry http://localhost:4873 [email protected]
Loading

0 comments on commit c5ed054

Please sign in to comment.