Monorepo for the whole Olmo Kit, offical documentation at olmokit.github.io/olmokit
Clone this repo locally and install dependencies running
pnpm i
This will automatically run the postinstall
script which builds and globally link all packages. In this way we ensure dependencies
of each package are installed within the correct pnpm link structure. From then on you can simply run pnpm start
to start compiling a package in watch mode. You will be prompt to pick a single package to watch.
Now in your test project bootstrapped with @olmokit/create-app
you can run pnpm olmo link
to use the globally linked packages from your machine.
Develop the docs locally at localhost:3000/olmokit running
pnpm docs
First commit and push your local work. Then, never manually bump package versions, just run form the terminal:
pnpm dev publish
- Switch between php versions on linux
sudo update-alternatives --set php /usr/bin/php
(then press tab for autocomlete options).
- preview: via URL param only applied to the base controller of each Laravel Route
- maybe implement JamieMason/syncpack for this monorepo
- Use
parcel-watch
instead of chokidar - Use
lighting-css
as CSS minifier - To analyse current package managers see nx source
- Build libraries with nx and scss:
- Maybe fork nx-composer
- I've manually added "videojs-font" to core's deps, that is not right, but I am afraid otherwise that dep will be taken out from production/publishable build
- Look at
addDependenciesToPackageJson
andinstallPackagesTask
to dynamically add and install dependencies - To use
vite
as an alternative to webppack see official laravel vite-plugin source - Using
"@swc/core": "^1.3.68"
was causing exported strings from ts files to be inlined in the file resulting in missing exports from files that were importing from there, reverting to"@swc/core": "1.3.64"
fixed the issue. But we should align to the latest version.
- Fillform deprecation:
- in .scss files find and replace "FF-" with "OF-"
// from
import { getQueryParams } from "@acanto/core/helpers";
// to
import { getUrlQueryParams } from "@olmokit/utils";
import { changeUrlParams } from "@acanto/core/helpers";
import { navigateToMergedParams } from "@olmokit/browser";
import { removeUrlParam } from "@acanto/core/helpers";
import { navigateWithoutUrlParam } from "@olmokit/browser";
import { removeDuplicatesByKey } from "@acanto/core/helpers";
import { removeDuplicatesByKey } from "@olmokit/utils";
import { debounce } from "@acanto/core/helpers";
import { debounce } from "@olmokit/utils";
import { transitionBarbaCurtain } from "@acanto/core/transitions";
import { transitionsBarbaCurtain } from "@acanto/core/transitions";
import { $$ } from "@acanto/core/dom";
import { $all } from "@olmokit/dom";
// also replace the usages of the $$ function
import { initSwiper } from "@acanto/core/swiper";
import { swiperInit } from "@olmokit/core/swiper";
import { navigation } from "@acanto/core/swiper";
import { swiperNavigationOptions } from "@olmokit/core/swiper";
import { IMG_EMPTY_PLACEHOLDER } from "@acanto/core/img";
import { imgEmptyPixel } from "@olmokit/utils";
import { getCookie } from "@acanto/core/cookies";
import { readCookie } from "@olmokit/utils";
import { setCookie } from "@acanto/core/cookies";
import { setCookie } from "@olmokit/utils";
import { deleteCookie } from "@acanto/core/cookies";
import { removeCookie } from "@olmokit/utils";
That seem not needed anymore, it is better to install it specifically in the project that needs it, before we had for npm
in the project's package.json
the resolutions
data, added now is what would need pnpm
instead:
resolutions": {
"gsap": "file:src/vendor/gsap-bonus.tgz"
},
"pnpm": {
"overrides": {
"gsap": "file:src/vendor/gsap-bonus.tgz"
}
},
Note that today you can also use the natively supported overrides
in the package.json file.
It is better to deprecate all this, also update the related doc file and probably remove the vendor
folder from the laravel template, or just keep it empty?.
$ pnpm i
WARN deprecated rollup-plugin-terser@7.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser
WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
$ pnpm why stable@0.1.8
dependencies:
svg-sprite 2.0.2
└─┬ svgo 2.8.0
└── stable 0.1.8
$ pnpm why rollup-plugin-terser@7.0.2
dependencies:
workbox-webpack-plugin 7.0.0
└─┬ workbox-build 7.0.0
└── rollup-plugin-terser 7.0.2
$ pnpm why sourcemap-codec@1.4.8
dependencies:
workbox-webpack-plugin 7.0.0
└─┬ workbox-build 7.0.0
├─┬ @rollup/plugin-replace 2.4.2
│ └─┬ magic-string 0.25.9
│ └── sourcemap-codec 1.4.8
└─┬ @surma/rollup-plugin-off-main-thread 2.2.3
└─┬ magic-string 0.25.9
└── sourcemap-codec 1.4.8
Using in package.json
:
"pnpm": {
"overrides": {
"rollup-plugin-terser": "@rollup/plugin-terser@0.4.3",
}
}
does not work, workbox-webpack-plugin
complains, follow the related issue