Skip to content

Commit 1157f1f

Browse files
committed
fix: fix root path detection
1 parent 5668794 commit 1157f1f

File tree

3 files changed

+3
-37
lines changed

3 files changed

+3
-37
lines changed

lib/constants.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
import * as path from "path"
22

33

4-
const pkg = require("../package.json")
5-
64
export const directories = {
75
get root() {
8-
if (process.cwd().includes(pkg.name)) {
9-
return process.cwd()
10-
}
11-
return require.resolve(pkg.name).replace(path.join(pkg.main), "")
6+
return path.resolve(__dirname, "..")
127
},
138
get styles() {
149
return path.join(this.root, "./styles")

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "outlinecss",
33
"description": "A headless, responsive, and composable CSS framework designed for easy customization.",
4-
"version": "0.0.4",
4+
"version": "0.0.5",
55
"main": "./lib/index.js",
66
"types": "./lib/index.d.ts",
77
"bin": {

website/styles/main.scss

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1 @@
1-
@forward "main";
2-
3-
4-
5-
//
6-
7-
.menu {
8-
--ui__menu__spacing-x: var(--spacing__md);
9-
--ui__menu__spacing-y: var(--spacing__xs);
10-
11-
display: flex;
12-
flex-direction: column;
13-
14-
& > .menu {
15-
margin-left: 1rem;
16-
}
17-
18-
& .menu-title, & .menu-item {
19-
padding: var(--ui__menu__spacing-y) var(--ui__menu__spacing-x);
20-
}
21-
22-
& .menu-title {
23-
font-weight: bold;
24-
margin-top: 1rem;
25-
}
26-
27-
& .menu-item {
28-
29-
}
30-
}
1+
@forward "outline";

0 commit comments

Comments
 (0)