Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes npm script errors on Windows #5711

Merged
merged 5 commits into from
Feb 26, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "0.1.0",
"private": true,
"scripts": {
"build": "next build && echo 'mantine.dev' > out/CNAME && touch out/.nojekyll",
"build:alpha": "next build && echo 'alpha.mantine.dev' > out/CNAME && touch out/.nojekyll",
"build": "next build && echo 'mantine.dev' > out/CNAME && echo '' > out/.nojekyll",
"build:alpha": "next build && echo 'alpha.mantine.dev' > out/CNAME && echo '' > out/.nojekyll",
"clean": "rm -rf .next",
"dev": "next dev -p 7545",
"postbuild": "next-sitemap",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"docs:deploy": "npm run docs:build && gh-pages -d docs/out -t true",
"docs:deploy:alpha": "npm run docs:build:alpha && esno scripts/docs/deploy-alpha",
"docs:count": "esno scripts/docs/count",
"clean": "rimraf packages/*/*/{esm,cjs,lib,dist} packages/*/*/*.tsbuildinfo packages/*/*/styles.css packages/*/*/styles.layer.css packages/@mantine/core/styles",
"clean": "rimraf --glob packages/*/*/{esm,cjs,lib,dist} packages/*/*/*.tsbuildinfo packages/*/*/styles.css packages/*/*/styles.layer.css packages/@mantine/core/styles",
"build": "esno scripts/build",
"publish:package": "esno scripts/publish",
"publish:package:alpha": "esno scripts/publish --stage alpha --tag next",
Expand All @@ -54,7 +54,7 @@
"typecheck": "tsc --noEmit && cd docs && npm run typecheck",
"lint": "npm run eslint && npm run stylelint",
"eslint": "eslint packages docs/src scripts --ext .ts,.tsx --cache",
"stylelint": "stylelint '**/*.css' --cache",
"stylelint": "stylelint \"**/*.css\" --cache",
"syncpack": "syncpack list-mismatches",
"syncpack:format": "syncpack format",
"prettier:test": "prettier --check \"**/*.{ts,tsx,mdx,css}\"",
Expand Down
6 changes: 4 additions & 2 deletions scripts/build/generate-css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ async function processFile(

// Generates styles.layers.css files for each @mantine/* component
async function generateCSSLayers() {
const files = await glob(getPath('packages/*/*/styles.css'));
const packagesPath = glob.convertPathToPattern(getPath('packages'));
const files = await glob(`${packagesPath}/*/*/styles.css`);

files.forEach((filePath) => {
const directory = path.normalize(path.join(filePath, '..'));
Expand All @@ -46,7 +47,8 @@ async function generateCSSLayers() {

// Generates individual css files for each @mantine/core component
export async function generateCoreCSS() {
const files = await glob(getPath('packages/@mantine/core/src/**/*.css'));
const packagesPath = glob.convertPathToPattern(getPath('packages'));
const files = await glob(`${packagesPath}/@mantine/core/src/**/*.css`);
const modules = files.filter((file) => file.endsWith('.module.css'));
const global = files.find((file) => file.endsWith('global.css'))!;

Expand Down