-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dda92e0
commit 2b66348
Showing
13 changed files
with
1,230 additions
and
1,350 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@hyperse/tailwind-layer": patch | ||
--- | ||
|
||
bump version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
{ | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint" | ||
] | ||
} | ||
"recommendations": ["dbaeumer.vscode-eslint"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
626 changes: 313 additions & 313 deletions
626
.yarn/releases/yarn-4.2.2.cjs → .yarn/releases/yarn-4.3.1.cjs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,33 @@ | ||
import { Glob } from 'glob'; | ||
import { existsSync, readFileSync } from 'node:fs'; | ||
import { fileURLToPath } from 'node:url'; | ||
import { dirname, join } from 'path'; | ||
import { bundle } from '../src/bundle.js'; | ||
import { bundle } from '@/bundle.js'; | ||
|
||
const getDirname = (url: string, ...paths: string[]) => { | ||
return join(dirname(fileURLToPath(url)), ...paths); | ||
}; | ||
|
||
test('compile tailwind layer', async () => { | ||
const output = getDirname(import.meta.url, './tailwindcss-extend.cjs'); | ||
await bundle('**/globals.css', 'commonjs', output); | ||
expect(existsSync(output)).toBe(true); | ||
expect(readFileSync(output, 'utf-8')).toMatch( | ||
"'.hyperce-head-xl': { '@apply font-extrabold text-4xl md:text-6xl'" | ||
); | ||
describe('tailwind', () => { | ||
it('should correct glob files', async () => { | ||
const pattern = '**/fixtures/**/*.css'; | ||
const g = new Glob(pattern, { | ||
nodir: true, | ||
absolute: true, | ||
}); | ||
const item: string[] = []; | ||
for await (const file of g) { | ||
item.push(file); | ||
} | ||
expect(item).toHaveLength(1); | ||
}); | ||
|
||
it('compile tailwind layer', async () => { | ||
const output = getDirname(import.meta.url, './tailwindcss-extend.cjs'); | ||
await bundle('**/fixtures/**/*.css', 'commonjs', output); | ||
expect(existsSync(output)).toBe(true); | ||
expect(readFileSync(output, 'utf-8')).toMatch( | ||
"'.hyperce-head-xl': { '@apply font-extrabold text-4xl md:text-6xl'" | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
{ | ||
"extends": "@hyperse/eslint-config-hyperse/tsconfig.base.json", | ||
"compilerOptions": { | ||
"baseUrl": "./src", | ||
"baseUrl": "./", | ||
"outDir": "dist", | ||
"rootDir": ".", | ||
"types": [ | ||
"vitest/globals" | ||
], | ||
"paths": {} | ||
"types": ["vitest/globals", "node"], | ||
"paths": { | ||
"@/*": ["./src/*"] | ||
} | ||
}, | ||
"include": [ | ||
"**/*.ts", | ||
"**/*.tsx" | ||
] | ||
} | ||
"include": ["**/*.ts", "**/*.tsx"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
import { fileURLToPath } from 'url'; | ||
import { configDefaults, defineConfig } from 'vitest/config'; | ||
|
||
export default defineConfig({ | ||
test: { | ||
globals: true, | ||
testTimeout: 100000, | ||
exclude: [...configDefaults.exclude], | ||
alias: { | ||
'~/': fileURLToPath(new URL('./src/', import.meta.url)), | ||
'@/': new URL('./src/', import.meta.url).pathname, | ||
}, | ||
include: ['**/?(*.){test,spec}.?(c|m)[jt]s?(x)'], | ||
}, | ||
}); |
Oops, something went wrong.