Commit Graph

8 Commits (133199bf478afbfe3580a7de46e42ab3154c91dd)

Author SHA1 Message Date
Thomas Bouffard 893ad44ff2
chore: improve the configuration to build the npm package (#87)
Root and all package.json files
  - Fix license, version and authors
  - Remove the non-relevant .npmignore file at the project. It was designed for mxgraph, the whole directory structure
  changed, and we don't plan to publish the root package

`core` package
  - Generate type definition and javascript files for ESM output
    - dedicated folder for `esm` and `types` in the `dist` folder to clearly separate concerns
    - exported in the package.json
  - Add npm script for `npm pack` configuration
  - Drop the `postinstall` npm script that built the `core` bundle. It would have been run when the package is installed
  in dependent projects at dependencies install. And it would have failed as it tries to build the project from TypeScript
  sources that are not available in the npm package.

fix: ConstraintHandler now loads image as everywhere else in the code using `Client.imageBasePath`
Using import doesn't work as the image is not available in the npm package. It generated error like this in ViteJS
project:
Failed to resolve import "../../../images/point.gif" from "../core/dist/esm/view/handler/ConstraintHandler.js". Does the file exist?
This gif import had been introduced to make `Anchors.stories.js` retrieve the gif file. Configuring `imageBasePath` as
already done in other stories fixes the issue.

Don't export EditorCodec and StylesheetCodec as they generate errors.
This is a temporary solution to avoid error in dependent project (at least, with ViteJS projects).
2022-07-05 08:08:25 +02:00
Junsik Shim 93e69cc5a3 Adds .vscode to .gitignore. 2022-01-22 13:30:20 +09:00
Thomas Bouffard fb7819f92a
chore: fix build error and introduce a build github workflow (#71)
Fix imports that are not respecting the case of the filenames.

The build often has errors and they are only detected after a developer pull the `development` branch on their local machine.
To early catch build failures, add a GitHub workflow that runs a build command.
2022-01-14 06:17:38 +01:00
Dave Morrissey c9753a2691 update packages and remove circular dependancies 2021-11-27 17:17:08 +11:00
Junsik Shim 1b0f3d6b9e - Restructure into a monorepo.
- Add Storybook to packages.
- Remove circular dependencies.
2021-04-15 13:12:12 +09:00
mcyph 942f537f17 started adding basic next.js examples app to src subdir 2021-03-21 13:00:55 +11:00
Nic O'Connor 3c5cb53936 Added Gruntfile and package.json for npm install; updated .gitignore 2017-10-18 08:34:38 -04:00
Brendon Boshell 1a6adcc7d8 Make objects available via CommonJS require, and create a package.json file for npm 2017-03-09 11:54:03 +00:00