Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/homepage.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<img alt="Logo" src="kss-assets/logo-full.png" style="display:block; margin:16px 0; max-width:350px"/>

[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/mlutcss/mlut/test.yml?branch=master)](https://github.com/mlutcss/mlut/actions/workflows/test.yml)
[![](https://img.shields.io/npm/v/mlut.svg)](https://www.npmjs.com/package/mlut)
[![](https://img.shields.io/npm/v/@mlut/core.svg)](https://www.npmjs.com/package/@mlut/core)
[![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/mlutcss)](https://x.com/mlutcss)

Atomic CSS toolkit with Sass and ergonomics for creating styles of any complexity. <br> Make CSS exciting again!
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mlut/core",
"version": "2.3.0",
"version": "2.3.1",
"description": "Atomic CSS toolkit with Sass and ergonomics for creating styles of any complexity",
"author": "mr150",
"type": "module",
Expand Down
7 changes: 2 additions & 5 deletions packages/core/src/jit/JitEngine.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
import { path } from '../utils/path.js';
import { logger } from '../utils/index.js';
import type { AsyncCompiler } from 'sass';

const isNode = globalThis.process?.env != undefined;
const isNode = globalThis.window?.document === undefined;
const isTestEnv = globalThis.process?.env?.NODE_ENV === 'test';

const sass = await import('sass-embedded')
.catch(() => import('sass'))
//@ts-expect-error - for run in browser
.catch(() => import('https://jspm.dev/sass'))
.catch(() => {
throw new Error(
'The Sass package is not installed. You can do this with `npm i -D sass-embedded`'
);
}) as AsyncCompiler;
});

const sassImporters = !isTestEnv && isNode ? [] :
await import('./importerFromMemory.js')
Expand Down
12 changes: 6 additions & 6 deletions packages/core/src/jit/SassSourcesLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ declare global {
};
}

//@ts-expect-error - for run in browser
const retryPromise = import('https://esm.sh/@octokit/plugin-retry')
.catch(() => import('@octokit/plugin-retry'))
const retryPromise = import('@octokit/plugin-retry')
//@ts-expect-error - for run in browser
.catch(() => import('https://esm.sh/@octokit/plugin-retry'))
.then((r: typeof import('@octokit/plugin-retry')) => r.retry);

//@ts-expect-error - for run in browser
const octokit = await import('https://esm.sh/@octokit/rest')
.catch(() => import('@octokit/rest'))
const octokit = await import('@octokit/rest')
//@ts-expect-error - for run in browser
.catch(() => import('https://esm.sh/@octokit/rest'))
.then(async (r: typeof import('@octokit/rest')) => {
const retry = await retryPromise;
const ctr = r.Octokit.plugin(retry);
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/utils/path.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { PlatformPath } from 'node:path';

//@ts-expect-error - cdn for run in browser
export const path = await import('https://esm.sh/path-browserify-esm')
.catch(() => import('node:path'))
export const path = await import('path')
//@ts-expect-error - cdn for run in browser
.catch(() => import('https://esm.sh/path-browserify-esm'))
//eslint-disable-next-line
.then((r) => r.default) as PlatformPath;
2 changes: 1 addition & 1 deletion packages/mlut/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<img alt="Logo" src="https://github.com/mlutcss/mlut/raw/master/docs/img/logo-full.png" width="350"/>

[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/mlutcss/mlut/test.yml?branch=master)](https://github.com/mlutcss/mlut/actions/workflows/test.yml)
[![](https://img.shields.io/npm/v/mlut.svg)](https://www.npmjs.com/package/mlut)
[![](https://img.shields.io/npm/v/@mlut/core.svg)](https://www.npmjs.com/package/@mlut/core)
[![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/mlutcss)](https://x.com/mlutcss)

Atomic CSS toolkit with Sass and ergonomics for creating styles of any complexity. <br> Make CSS exciting again!
Expand Down
1 change: 1 addition & 0 deletions test/sass/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ sassTrue.runSass(
'packages/core',
'node_modules',
],
silenceDeprecations: [ 'if-function', ],
},
{
describe,
Expand Down
4 changes: 3 additions & 1 deletion test/web.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ <h1 class="title-h1 Fns3r">mlut tests</h1>
<script type="importmap">
{
"imports": {
"@mlut/core": "../packages/core/dist/index.js"
"@mlut/core": "../packages/core/dist/index.js",
"immutable": "https://unpkg.com/immutable@^4.0.0",
"sass": "https://unpkg.com/sass@^1.63.0/sass.default.js"
}
}
</script>
Expand Down