Skip to content

Commit

Permalink
fix: remove mod.ts under the project root
Browse files Browse the repository at this point in the history
close #24
  • Loading branch information
TomokiMiyauci committed Mar 20, 2022
1 parent ff769cb commit 8bad6e4
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 19 deletions.
11 changes: 6 additions & 5 deletions README.md
Expand Up @@ -8,7 +8,7 @@ Tiny, composable Atomic CSS engine

[![release](https://img.shields.io/github/v/release/TomokiMiyauci/mapcss?sort=semver&color=black&logo=github)](https://github.com/TomokiMiyauci/mapcss/releases)
[![deno version](https://img.shields.io/badge/deno-^1.19.0-black?logo=deno)](https://github.com/denoland/deno)
[![deno doc](https://img.shields.io/badge/deno-doc-black)](https://doc.deno.land/https/deno.land/x/mapcss/mod.ts)
[![deno doc](https://img.shields.io/badge/deno-doc-black)](https://doc.deno.land/https/deno.land/x/mapcss/core/mod.ts)

[![test](https://github.com/TomokiMiyauci/mapcss/actions/workflows/test.yaml/badge.svg?branch=beta)](https://github.com/TomokiMiyauci/mapcss/actions/workflows/test.yaml)
[![codecov](https://codecov.io/gh/TomokiMiyauci/mapcss/branch/main/graph/badge.svg?token=nQZ8Nnx3KH)](https://codecov.io/gh/TomokiMiyauci/mapcss)
Expand Down Expand Up @@ -87,7 +87,8 @@ For example, using `presetTw`, you can use the utility class of
[TailwindCSS](https://github.com/tailwindlabs/tailwindcss).

```ts
import { generate, presetTw } from "https://deno.land/x/mapcss@$VERSION/mod.ts";
import { generate } from "https://deno.land/x/mapcss@$VERSION/core/mod.ts";
import { presetTw } from "https://deno.land/x/mapcss@$VERSION/preset_tw/mod.ts";

const code = `<div className="relative flex">
<p className="text-red-500/20"></p>
Expand Down Expand Up @@ -125,7 +126,7 @@ For example, the following CSS Statement can be mapped as follows:
```

```ts
import type { CSSMap } from "https://deno.land/x/mapcss@$VERSION/mod.ts";
import type { CSSMap } from "https://deno.land/x/mapcss@$VERSION/core/mod.ts";
const cssMap: CSSMap = {
inline: {
block: { display: "inline" },
Expand All @@ -140,7 +141,7 @@ It is also possible to express dynamic identifiers using regular expressions.
```

```ts
import type { CSSMap } from "https://deno.land/x/mapcss@$VERSION/mod.ts";
import type { CSSMap } from "https://deno.land/x/mapcss@$VERSION/core/mod.ts";
const rePositiveNumber = /^(\d+)$/;
const cssMap: CSSMap = {
z: {
Expand Down Expand Up @@ -171,7 +172,7 @@ supported.
```

```ts
import type { CSSMap } from "https://deno.land/x/mapcss@$VERSION/mod.ts";
import type { CSSMap } from "https://deno.land/x/mapcss@$VERSION/core/mod.ts";
const cssMap: CSSMap = {
// className: .container
container: (_, { className }) => ({
Expand Down
4 changes: 3 additions & 1 deletion _e2e/preset_svg/css_test.ts
@@ -1,4 +1,6 @@
import { Config, generate, presetSvg } from "../../mod.ts";
import { Config, generate } from "../../core/mod.ts";
import { presetSvg } from "../../preset_svg/mod.ts";

import { expect, test } from "../../dev_deps.ts";

test("presetSvg generation test", () => {
Expand Down
3 changes: 2 additions & 1 deletion _e2e/preset_tw_test.ts
Expand Up @@ -3,7 +3,8 @@ import { min } from "./preset_tw/min.ts";
import { $single } from "./preset_tw/$single.ts";
import { modifier } from "./preset_tw/modifier.ts";
import { animate } from "./preset_tw/animate.ts";
import { generate, presetTw } from "../mod.ts";
import { generate } from "../core/mod.ts";
import { presetTw } from "../preset_tw/mod.ts";

const expects: [string, string][] = [
...min,
Expand Down
3 changes: 2 additions & 1 deletion _e2e/preset_typography/specifier_test.ts
@@ -1,4 +1,5 @@
import { generate, presetTypography } from "../../mod.ts";
import { generate } from "../../core/mod.ts";
import { presetTypography } from "../../preset_typography/mod.ts";
import { expect, test } from "../../dev_deps.ts";
test("generated Style Sheet", () => {
const table: [string, string][] = [
Expand Down
2 changes: 1 addition & 1 deletion egg.json
@@ -1,7 +1,7 @@
{
"$schema": "https://x.nest.land/eggs@0.3.10/src/schema.json",
"name": "mapcss",
"entry": "./mod.ts",
"entry": "./core/mod.ts",
"description": "Tiny, composable atomic CSS engine",
"homepage": "https://github.com/TomokiMiyauci/mapcss",
"files": [
Expand Down
4 changes: 0 additions & 4 deletions mod.ts

This file was deleted.

6 changes: 4 additions & 2 deletions preset_svg/README.md
Expand Up @@ -8,9 +8,11 @@
import {
type Config,
generate,
} from "https://deno.land/x/mapcss@$VERSION/core/mod.ts";
import {
iconifyJSON,
presetSvg,
} from "https://deno.land/x/mapcss@$VERSION/mod.ts";
} from "https://deno.land/x/mapcss@$VERSION/preset_svg/mod.ts";
import carbon from "https://esm.sh/@iconify-json/carbon/icons.json" assert {
type: "json",
};
Expand All @@ -23,5 +25,5 @@ const config: Config = {
},
})],
};
// generate(config, "i-bitcoin i-carbon-logo-github").css;
// generate("i-bitcoin i-carbon-logo-github", config).css;
```
3 changes: 2 additions & 1 deletion preset_tw/README.md
Expand Up @@ -5,7 +5,8 @@
## Usage

```ts
import { generate, presetTw } from "https://deno.land/x/mapcss@$VERSION/mod.ts";
import { generate } from "https://deno.land/x/mapcss@$VERSION/core/mod.ts";
import { presetTw } from "https://deno.land/x/mapcss@$VERSION/preset_tw/mod.ts";

const code = `<div className="relative flex">
<p className="text-red-500/20"></p>
Expand Down
6 changes: 3 additions & 3 deletions preset_typography/README.md
Expand Up @@ -8,8 +8,8 @@
import {
type Config,
generate,
presetTypography,
} from "https://deno.land/x/mapcss@$VERSION/mod.ts";
} from "https://deno.land/x/mapcss@$VERSION/core/mod.ts";
import { presetTypography } from "https://deno.land/x/mapcss@$VERSION/preset_typography/mod.ts";

const config: Config = {
preset: [presetTypography()],
Expand Down Expand Up @@ -107,7 +107,7 @@ a code {
```

```ts
import { presetTypography } from "https://deno.land/x/mapcss@$VERSION/mod.ts";
import { presetTypography } from "https://deno.land/x/mapcss@$VERSION/preset_typography/mod.ts";

presetTypography({
css: {
Expand Down

0 comments on commit 8bad6e4

Please sign in to comment.