@tsmodule/tsmodule 17.0.0 → 17.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/create/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/templates/default/.eslintrc +52 -0
- package/templates/default/.github/workflows/ci.yml +30 -0
- package/templates/default/.gitignore +10 -0
- package/templates/default/README.md +5 -0
- package/templates/default/package.json +35 -0
- package/templates/default/src/index.ts +4 -0
- package/templates/default/test/example.test.ts +7 -0
- package/templates/default/tsconfig.json +41 -0
- package/templates/react/.eslintrc +54 -0
- package/templates/react/.gitignore +11 -0
- package/templates/react/next-env.d.ts +5 -0
- package/templates/react/next.config.js +18 -0
- package/templates/react/package.json +38 -0
- package/templates/react/postcss.config.js +6 -0
- package/templates/react/src/components/Card/index.tsx +13 -0
- package/templates/react/src/components/CardGrid/index.tsx +29 -0
- package/templates/react/src/components/Footer/index.tsx +19 -0
- package/templates/react/src/components/GetStarted/index.tsx +8 -0
- package/templates/react/src/components/Welcome/index.tsx +7 -0
- package/templates/react/src/components/index.ts +4 -0
- package/templates/react/src/index.ts +1 -0
- package/templates/react/src/pages/_app.tsx +13 -0
- package/templates/react/src/pages/api/hello.ts +13 -0
- package/templates/react/src/pages/index.tsx +26 -0
- package/templates/react/src/styles/custom/index.css +0 -0
- package/templates/react/src/styles/elements/card/index.css +14 -0
- package/templates/react/src/styles/elements/index.css +1 -0
- package/templates/react/src/styles/index.css +253 -0
- package/templates/react/src/styles/viewport/index.css +26 -0
- package/templates/react/src/utils/globs.ts +1 -0
- package/templates/react/tailwind.config.js +21 -0
@@ -1 +1 @@
|
|
1
|
-
import
|
1
|
+
import a from"chalk";import{createShell as c}from"await-shell";import d from"ora";import{createTemplate as o}from"./lib/createTemplate.js";import{rewritePkgJson as l}from"./lib/rewritePkgJson.js";globalThis.SHELL_OPTIONS={stdio:["ignore","ignore","inherit"]};const w=async(e,{react:n=!1})=>{const t=c(),i=d(`Creating new module ${a.blueBright(e)}.`).start();await o("default",e),n&&await o("react",e),await l(e),i.succeed("Project created."),process.chdir(e);const r=[],s=["@tsmodule/tsmodule"];n&&(r.push("react","react-dom"),s.push("@types/react","@types/react-dom","next","eslint-config-next","tailwindcss","postcss","autoprefixer")),r.length&&await t.run(`yarn add ${r.join(" ")}`),s.length&&await t.run(`yarn add -D ${s.join(" ")}`),i.succeed("Dependencies installed."),await t.run("git init"),i.succeed("Git initialized.")};export{w as create};
|
package/dist/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
|
-
var r="@tsmodule/tsmodule",a="module",m="17.
|
2
|
+
var r="@tsmodule/tsmodule",a="module",m="17.1.1",d="tsmodule/tsmodule",s="TypeScript Module loader and compiler",l="MIT",c={tsmodule:"dist/index.js"},p={".":"./dist/loader/index.js","./*":"./dist/*/index.js","./package.json":"./package.json"},u="dist/types/index.d.ts",f=[{name:"C. Lewis",email:"ctj.lewis@icloud.com",url:"https://ctjlewis.com"}],b=["dist/","templates/"],v={node:">=14"},g={bootstrap:"node bootstrap.js",bootload:"node --no-warnings --loader ./dist/loader/index.js src/index.ts build -f",prebuild:"yarn bootstrap && yarn bootload && yarn link -f",build:"tsmodule build",dev:"tsmodule dev",lint:"eslint --fix src",prepare:"yarn build -f",prepublishOnly:"yarn build && yarn test",pretest:"yarn build -f",test:"ava --no-worker-threads"},h={"@types/glob":"^7.2.0","@types/node":"^17.0.15","@typescript-eslint/eslint-plugin":"^5.9.1","@typescript-eslint/parser":"^5.9.1",ava:"^4.0.1","await-shell":"^29.0.1-0",chalk:"^5.0.0",commander:"^8.3.0","create-debug-logger":"^1.10.1",esbuild:"^0.14.0",eslint:"^8.8.0","fast-glob":"^3.2.10","fs-extra":"^10.0.0",glob:"^7.2.0","node-watch":"^0.7.3",ora:"^6.0.1",path:"^0.12.7",typescript:"^4.5.5"},S=["esm","loader","typescript","loader hook","require hook","experimental-loader"],w={timeout:"10 minutes",files:["test/**/*.test.ts"],extensions:{ts:"module"},nodeArguments:["--no-warnings","--loader=@tsmodule/tsmodule"]},y={"@types/fs-extra":"^9.0.13"},t={name:r,type:a,version:m,repository:d,description:s,license:l,bin:c,exports:p,types:u,contributors:f,files:b,engines:v,scripts:g,dependencies:h,keywords:S,ava:w,devDependencies:y};import e from"chalk";import{Command as T}from"commander";import{build as B}from"./commands/build/index.js";import{create as C}from"./commands/create/index.js";import{dev as R}from"./commands/dev/index.js";import{execute as j}from"./commands/execute/index.js";import{normalizeImportSpecifiers as x}from"./commands/normalize/index.js";const{version:A}=t,i=new T;i.name(e.white(e.bold("tsmodule"))).usage(e.white(e.bold("<file | command> [options]"))).description(e.blueBright(`A tool for building TypeScript modules.
|
3
3
|
|
4
4
|
Run TS directly: ${e.bold("tsmodule src/index.ts")}
|
5
5
|
Use a command: ${e.bold("tsmodule build")}`)).version(String(A)),i.command("dev").description("Build and watch for changes.").action(R),i.command("build").option("--files <files>","The files to build (default: all)").option("-d, --dev","Build development version").option("-f, --fast","Do not emit type declarations, only transform to JS").description("Builds TS files to output in dist/.").action(B),i.command("create <name>").option("--react","Create React component library with Next.js").description("Create a new project.").action(C),i.command("normalize [files]").description(`Rewrites import specifiers in files to ESM-compliant paths.
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@tsmodule/tsmodule",
|
3
3
|
"type": "module",
|
4
|
-
"version": "17.
|
4
|
+
"version": "17.1.1",
|
5
5
|
"repository": "tsmodule/tsmodule",
|
6
6
|
"description": "TypeScript Module loader and compiler",
|
7
7
|
"license": "MIT",
|
@@ -23,7 +23,7 @@
|
|
23
23
|
],
|
24
24
|
"files": [
|
25
25
|
"dist/",
|
26
|
-
"
|
26
|
+
"templates/"
|
27
27
|
],
|
28
28
|
"engines": {
|
29
29
|
"node": ">=14"
|
@@ -0,0 +1,52 @@
|
|
1
|
+
{
|
2
|
+
"extends": [
|
3
|
+
"plugin:@typescript-eslint/recommended"
|
4
|
+
],
|
5
|
+
"parser": "@typescript-eslint/parser",
|
6
|
+
"plugins": ["@typescript-eslint"],
|
7
|
+
"rules": {
|
8
|
+
|
9
|
+
"no-console": "error",
|
10
|
+
"no-trailing-spaces": "error",
|
11
|
+
"max-len": [1, 80, 2, {
|
12
|
+
"ignorePattern": "^import\\s.+\\sfrom\\s.+;$",
|
13
|
+
"ignoreUrls": true,
|
14
|
+
"ignoreStrings": true,
|
15
|
+
"ignoreTemplateLiterals": true,
|
16
|
+
"ignoreRegExpLiterals": true
|
17
|
+
}],
|
18
|
+
|
19
|
+
"@typescript-eslint/type-annotation-spacing": ["error"],
|
20
|
+
|
21
|
+
"@typescript-eslint/ban-ts-comment": [
|
22
|
+
"error",
|
23
|
+
{
|
24
|
+
"ts-nocheck": "allow-with-description",
|
25
|
+
"ts-ignore": "allow-with-description"
|
26
|
+
}
|
27
|
+
],
|
28
|
+
|
29
|
+
"indent": "off",
|
30
|
+
"@typescript-eslint/indent": ["error", 2],
|
31
|
+
|
32
|
+
"semi": "off",
|
33
|
+
"@typescript-eslint/semi": ["error", "always"],
|
34
|
+
|
35
|
+
"quotes": "off",
|
36
|
+
"@typescript-eslint/quotes": ["error", "double"],
|
37
|
+
|
38
|
+
"object-curly-spacing": "off",
|
39
|
+
"@typescript-eslint/object-curly-spacing": ["error", "always"],
|
40
|
+
|
41
|
+
"sort-imports": [
|
42
|
+
"warn",
|
43
|
+
{
|
44
|
+
"ignoreCase": false,
|
45
|
+
"ignoreDeclarationSort": false,
|
46
|
+
"ignoreMemberSort": true,
|
47
|
+
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"],
|
48
|
+
"allowSeparatedGroups": true
|
49
|
+
}
|
50
|
+
]
|
51
|
+
}
|
52
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- '**'
|
7
|
+
pull_request:
|
8
|
+
branches:
|
9
|
+
- '**'
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
test:
|
13
|
+
name: Node ${{ matrix.nodejs }} on ${{ matrix.os }}
|
14
|
+
runs-on: ${{ matrix.os }}
|
15
|
+
timeout-minutes: 10
|
16
|
+
strategy:
|
17
|
+
matrix:
|
18
|
+
nodejs: [14, 16, "lts/*"]
|
19
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
20
|
+
steps:
|
21
|
+
- uses: actions/checkout@v2
|
22
|
+
- uses: actions/setup-node@v2
|
23
|
+
with:
|
24
|
+
node-version: ${{ matrix.nodejs }}
|
25
|
+
|
26
|
+
- name: Install and link
|
27
|
+
run: yarn install --frozen-lockfile && yarn build
|
28
|
+
|
29
|
+
- name: Test
|
30
|
+
run: yarn test
|
@@ -0,0 +1,35 @@
|
|
1
|
+
{
|
2
|
+
"name": "template",
|
3
|
+
"type": "module",
|
4
|
+
"version": "0.0.1",
|
5
|
+
"license": "MIT",
|
6
|
+
"types": "dist/index.d.ts",
|
7
|
+
"files": [
|
8
|
+
"dist"
|
9
|
+
],
|
10
|
+
"exports": {
|
11
|
+
"./package.json": "./package.json",
|
12
|
+
".": "./dist/index.js",
|
13
|
+
"./*": "./dist/*/index.js"
|
14
|
+
},
|
15
|
+
"scripts": {
|
16
|
+
"build": "tsmodule build",
|
17
|
+
"test": "ava",
|
18
|
+
"lint": "eslint src --fix",
|
19
|
+
"pretest": "tsmodule build -f",
|
20
|
+
"prepublishOnly": "yarn build && yarn test"
|
21
|
+
},
|
22
|
+
"ava": {
|
23
|
+
"timout": 240000,
|
24
|
+
"files": [
|
25
|
+
"test/**/*.test.ts"
|
26
|
+
],
|
27
|
+
"extensions": {
|
28
|
+
"ts": "module"
|
29
|
+
},
|
30
|
+
"nodeArguments": [
|
31
|
+
"--no-warnings",
|
32
|
+
"--loader=@tsmodule/tsmodule"
|
33
|
+
]
|
34
|
+
}
|
35
|
+
}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
{
|
2
|
+
"include": [
|
3
|
+
"*env.d.ts",
|
4
|
+
"src/**/*"
|
5
|
+
],
|
6
|
+
"exclude": [
|
7
|
+
"node_modules",
|
8
|
+
"test/**"
|
9
|
+
],
|
10
|
+
"compilerOptions": {
|
11
|
+
"moduleResolution": "Node",
|
12
|
+
"target": "ESNext",
|
13
|
+
"module": "ESNext",
|
14
|
+
"lib": [
|
15
|
+
"DOM",
|
16
|
+
"DOM.Iterable",
|
17
|
+
"ESNext"
|
18
|
+
],
|
19
|
+
"jsx": "preserve",
|
20
|
+
"rootDir": "src",
|
21
|
+
"outDir": "dist",
|
22
|
+
"allowJs": true,
|
23
|
+
"importHelpers": true,
|
24
|
+
"esModuleInterop": true,
|
25
|
+
"allowSyntheticDefaultImports": true,
|
26
|
+
"strict": true,
|
27
|
+
"noUnusedLocals": true,
|
28
|
+
"noUnusedParameters": true,
|
29
|
+
"noImplicitReturns": true,
|
30
|
+
"noFallthroughCasesInSwitch": true,
|
31
|
+
"skipLibCheck": true,
|
32
|
+
"resolveJsonModule": true,
|
33
|
+
"declaration": true,
|
34
|
+
"sourceMap": true,
|
35
|
+
"checkJs": true,
|
36
|
+
"noEmit": false,
|
37
|
+
"forceConsistentCasingInFileNames": true,
|
38
|
+
"isolatedModules": true,
|
39
|
+
"incremental": false
|
40
|
+
}
|
41
|
+
}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
{
|
2
|
+
"extends": [
|
3
|
+
"plugin:@typescript-eslint/recommended",
|
4
|
+
"next",
|
5
|
+
"next/core-web-vitals"
|
6
|
+
],
|
7
|
+
"parser": "@typescript-eslint/parser",
|
8
|
+
"plugins": ["@typescript-eslint"],
|
9
|
+
"rules": {
|
10
|
+
|
11
|
+
"no-console": "error",
|
12
|
+
"no-trailing-spaces": "error",
|
13
|
+
"max-len": [1, 80, 2, {
|
14
|
+
"ignorePattern": "^import\\s.+\\sfrom\\s.+;$",
|
15
|
+
"ignoreUrls": true,
|
16
|
+
"ignoreStrings": true,
|
17
|
+
"ignoreTemplateLiterals": true,
|
18
|
+
"ignoreRegExpLiterals": true
|
19
|
+
}],
|
20
|
+
|
21
|
+
"@typescript-eslint/type-annotation-spacing": ["error"],
|
22
|
+
|
23
|
+
"@typescript-eslint/ban-ts-comment": [
|
24
|
+
"error",
|
25
|
+
{
|
26
|
+
"ts-nocheck": "allow-with-description",
|
27
|
+
"ts-ignore": "allow-with-description"
|
28
|
+
}
|
29
|
+
],
|
30
|
+
|
31
|
+
"indent": "off",
|
32
|
+
"@typescript-eslint/indent": ["error", 2],
|
33
|
+
|
34
|
+
"semi": "off",
|
35
|
+
"@typescript-eslint/semi": ["error", "always"],
|
36
|
+
|
37
|
+
"quotes": "off",
|
38
|
+
"@typescript-eslint/quotes": ["error", "double"],
|
39
|
+
|
40
|
+
"object-curly-spacing": "off",
|
41
|
+
"@typescript-eslint/object-curly-spacing": ["error", "always"],
|
42
|
+
|
43
|
+
"sort-imports": [
|
44
|
+
"warn",
|
45
|
+
{
|
46
|
+
"ignoreCase": false,
|
47
|
+
"ignoreDeclarationSort": false,
|
48
|
+
"ignoreMemberSort": true,
|
49
|
+
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"],
|
50
|
+
"allowSeparatedGroups": true
|
51
|
+
}
|
52
|
+
]
|
53
|
+
}
|
54
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module.exports = {
|
2
|
+
reactStrictMode: true,
|
3
|
+
webpack: (config) => {
|
4
|
+
// config.experiments = { topLevelAwait: true };
|
5
|
+
// config.resolve.fallback = {
|
6
|
+
// assert: false,
|
7
|
+
// process: false,
|
8
|
+
// events: false,
|
9
|
+
// fs: false,
|
10
|
+
// util: false,
|
11
|
+
// path: false,
|
12
|
+
// stream: false,
|
13
|
+
// constants: false,
|
14
|
+
// os: false,
|
15
|
+
// };
|
16
|
+
return config;
|
17
|
+
},
|
18
|
+
};
|
@@ -0,0 +1,38 @@
|
|
1
|
+
{
|
2
|
+
"name": "template",
|
3
|
+
"version": "0.0.1",
|
4
|
+
"license": "MIT",
|
5
|
+
"types": "dist/index.d.ts",
|
6
|
+
"files": [
|
7
|
+
"dist"
|
8
|
+
],
|
9
|
+
"exports": {
|
10
|
+
".": "./dist/index.js",
|
11
|
+
"./styles": "./dist/styles/index.css",
|
12
|
+
"./styles/*": "./dist/styles/*/index.css",
|
13
|
+
"./package.json": "./package.json",
|
14
|
+
"./*": "./dist/components/*/index.js"
|
15
|
+
},
|
16
|
+
"scripts": {
|
17
|
+
"export": "tsmodule build",
|
18
|
+
"dev": "next dev",
|
19
|
+
"build": "next build",
|
20
|
+
"start": "next start",
|
21
|
+
"lint": "next lint --fix",
|
22
|
+
"test": "ava",
|
23
|
+
"prepublishOnly": "yarn build && yarn test"
|
24
|
+
},
|
25
|
+
"ava": {
|
26
|
+
"timout": 240000,
|
27
|
+
"files": [
|
28
|
+
"test/**/*.test.ts"
|
29
|
+
],
|
30
|
+
"extensions": {
|
31
|
+
"ts": "module"
|
32
|
+
},
|
33
|
+
"nodeArguments": [
|
34
|
+
"--no-warnings",
|
35
|
+
"--loader=@tsmodule/tsmodule"
|
36
|
+
]
|
37
|
+
}
|
38
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { Card } from "../Card";
|
2
|
+
|
3
|
+
export const CardGrid = () => {
|
4
|
+
return (
|
5
|
+
<div className="grid md:grid-cols-2">
|
6
|
+
<a href="https://nextjs.org/docs" className="card">
|
7
|
+
<h4>Documentation →</h4>
|
8
|
+
<p>Find in-depth information about Next.js features and API.</p>
|
9
|
+
</a>
|
10
|
+
|
11
|
+
<Card href="https://nextjs.org/learn">
|
12
|
+
<h4>Learn →</h4>
|
13
|
+
<p>Learn about Next.js in an interactive course with quizzes!</p>
|
14
|
+
</Card>
|
15
|
+
|
16
|
+
<Card href="https://github.com/vercel/next.js/tree/master/examples">
|
17
|
+
<h4>Examples →</h4>
|
18
|
+
<p>Discover and deploy boilerplate example Next.js projects.</p>
|
19
|
+
</Card>
|
20
|
+
|
21
|
+
<Card href="https://vercel.com/new?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app">
|
22
|
+
<h4>Deploy →</h4>
|
23
|
+
<p>
|
24
|
+
Instantly deploy your Next.js site to a public URL with Vercel.
|
25
|
+
</p>
|
26
|
+
</Card>
|
27
|
+
</div>
|
28
|
+
);
|
29
|
+
};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import Image from "next/image";
|
2
|
+
|
3
|
+
export const Footer = () => {
|
4
|
+
return (
|
5
|
+
<footer>
|
6
|
+
<a
|
7
|
+
className="flex-center"
|
8
|
+
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
|
9
|
+
target="_blank"
|
10
|
+
rel="noopener noreferrer"
|
11
|
+
>
|
12
|
+
Powered by{" "}
|
13
|
+
<span className="h-4 ml-2 flex-center">
|
14
|
+
<Image src="/vercel.svg" alt="Vercel Logo" width={72} height={16} />
|
15
|
+
</span>
|
16
|
+
</a>
|
17
|
+
</footer>
|
18
|
+
);
|
19
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./components";
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import "../styles/index.css";
|
2
|
+
import type { AppProps } from "next/app";
|
3
|
+
import { StrictMode } from "react";
|
4
|
+
|
5
|
+
function MyApp({ Component, pageProps }: AppProps) {
|
6
|
+
return (
|
7
|
+
<StrictMode>
|
8
|
+
<Component {...pageProps} />
|
9
|
+
</StrictMode>
|
10
|
+
);
|
11
|
+
}
|
12
|
+
|
13
|
+
export default MyApp;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
|
2
|
+
import type { NextApiRequest, NextApiResponse } from "next";
|
3
|
+
|
4
|
+
type Data = {
|
5
|
+
name: string
|
6
|
+
};
|
7
|
+
|
8
|
+
export default function handler(
|
9
|
+
_: NextApiRequest,
|
10
|
+
res: NextApiResponse<Data>
|
11
|
+
) {
|
12
|
+
res.status(200).json({ name: "John Doe" });
|
13
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import Head from "next/head";
|
2
|
+
|
3
|
+
import { CardGrid } from "../components/CardGrid";
|
4
|
+
import { Footer } from "../components/Footer";
|
5
|
+
import { GetStarted } from "../components/GetStarted";
|
6
|
+
import { Welcome } from "../components/Welcome";
|
7
|
+
|
8
|
+
export default function Home() {
|
9
|
+
return (
|
10
|
+
<>
|
11
|
+
<Head>
|
12
|
+
<title>Create Next App</title>
|
13
|
+
<meta name="description" content="Generated by create next app" />
|
14
|
+
<link rel="icon" href="/favicon.ico" />
|
15
|
+
</Head>
|
16
|
+
|
17
|
+
<main>
|
18
|
+
<Welcome />
|
19
|
+
<GetStarted />
|
20
|
+
<CardGrid />
|
21
|
+
</main>
|
22
|
+
|
23
|
+
<Footer />
|
24
|
+
</>
|
25
|
+
);
|
26
|
+
}
|
File without changes
|
@@ -0,0 +1,14 @@
|
|
1
|
+
.card {
|
2
|
+
@apply m-4 p-6 text-left rounded-lg;
|
3
|
+
text-decoration: none;
|
4
|
+
border: 1px solid #eaeaea;
|
5
|
+
transition: color 0.15s ease, border-color 0.15s ease;
|
6
|
+
/* max-width: 300px; */
|
7
|
+
}
|
8
|
+
|
9
|
+
.card:hover,
|
10
|
+
.card:focus,
|
11
|
+
.card:active {
|
12
|
+
color: #0070f3;
|
13
|
+
border-color: #0070f3;
|
14
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
@import './card/index.css';
|
@@ -0,0 +1,253 @@
|
|
1
|
+
@tailwind base;
|
2
|
+
@tailwind components;
|
3
|
+
@tailwind utilities;
|
4
|
+
|
5
|
+
/* FONTS: Customize */
|
6
|
+
@layer base {
|
7
|
+
/* Style your serif font here. */
|
8
|
+
.serif {
|
9
|
+
font-family: serif;
|
10
|
+
}
|
11
|
+
|
12
|
+
/* Style your sans font here. */
|
13
|
+
.sans-serif {
|
14
|
+
font-family: sans-serif;
|
15
|
+
}
|
16
|
+
|
17
|
+
/* Style your display font here. */
|
18
|
+
.display {}
|
19
|
+
|
20
|
+
/* Style your interface font here. */
|
21
|
+
.interface {
|
22
|
+
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
|
23
|
+
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
/* DEFAULT BODY FONT */
|
28
|
+
@layer base {
|
29
|
+
html, body {
|
30
|
+
@apply font-size-sm interface;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
/* LINKS */
|
35
|
+
@layer base {
|
36
|
+
a {
|
37
|
+
@apply underline;
|
38
|
+
color: inherit;
|
39
|
+
text-decoration: none;
|
40
|
+
}
|
41
|
+
|
42
|
+
h1 a,
|
43
|
+
h2 a,
|
44
|
+
h3 a,
|
45
|
+
h4 a,
|
46
|
+
h5 a,
|
47
|
+
h6 a {
|
48
|
+
color: #0070f3;
|
49
|
+
}
|
50
|
+
|
51
|
+
/* If the user can hover, transition in by default. */
|
52
|
+
@media (hover: hover) {
|
53
|
+
a {
|
54
|
+
transition: 300ms;
|
55
|
+
text-decoration: underline;
|
56
|
+
text-decoration-color: transparent;
|
57
|
+
}
|
58
|
+
|
59
|
+
a:hover {
|
60
|
+
text-decoration-color: inherit;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
|
65
|
+
/* FONT SIZES */
|
66
|
+
@layer base {
|
67
|
+
.font-size-1 {
|
68
|
+
@apply text-4xl sm:text-5xl 2xl:text-6xl 4xl:text-8xl;
|
69
|
+
}
|
70
|
+
|
71
|
+
.font-size-2 {
|
72
|
+
@apply text-2xl sm:text-4xl 2xl:text-5xl 4xl:text-6xl;
|
73
|
+
}
|
74
|
+
|
75
|
+
.font-size-3 {
|
76
|
+
@apply text-xl sm:text-2xl 2xl:text-4xl 4xl:text-5xl;
|
77
|
+
}
|
78
|
+
|
79
|
+
.font-size-base {
|
80
|
+
@apply text-lg sm:text-xl 2xl:text-2xl 4xl:text-3xl;
|
81
|
+
}
|
82
|
+
|
83
|
+
.font-size-sm {
|
84
|
+
@apply text-base 2xl:text-lg 4xl:text-2xl;
|
85
|
+
}
|
86
|
+
|
87
|
+
.font-size-xs {
|
88
|
+
@apply text-sm 2xl:text-base 4xl:text-lg;
|
89
|
+
}
|
90
|
+
}
|
91
|
+
|
92
|
+
/* HEADINGS */
|
93
|
+
@layer base {
|
94
|
+
h1, .h1,
|
95
|
+
h2, .h2,
|
96
|
+
h3, .h3,
|
97
|
+
h4, .h4,
|
98
|
+
h5, .h5,
|
99
|
+
h6, .h6 {
|
100
|
+
@apply font-bold display;
|
101
|
+
@apply pb-2 leading-snug;
|
102
|
+
}
|
103
|
+
|
104
|
+
h1, .h1 {
|
105
|
+
@apply font-size-1;
|
106
|
+
}
|
107
|
+
|
108
|
+
h2, .h2 {
|
109
|
+
@apply font-size-2;
|
110
|
+
}
|
111
|
+
|
112
|
+
h3, .h3 {
|
113
|
+
@apply font-size-3;
|
114
|
+
}
|
115
|
+
|
116
|
+
h4, .h4 {
|
117
|
+
@apply font-size-base;
|
118
|
+
}
|
119
|
+
|
120
|
+
h5, .h5 {
|
121
|
+
@apply font-size-sm;
|
122
|
+
}
|
123
|
+
|
124
|
+
h6, .h6 {
|
125
|
+
@apply font-size-xs;
|
126
|
+
}
|
127
|
+
|
128
|
+
.title {
|
129
|
+
@apply mt-2 display font-bold;
|
130
|
+
}
|
131
|
+
|
132
|
+
.title p {
|
133
|
+
@apply p-0 m-0;
|
134
|
+
}
|
135
|
+
}
|
136
|
+
|
137
|
+
/* FLEX */
|
138
|
+
@layer base {
|
139
|
+
/**
|
140
|
+
* A container that fills its parent.
|
141
|
+
*/
|
142
|
+
.expanded {
|
143
|
+
@apply h-full w-full;
|
144
|
+
}
|
145
|
+
/**
|
146
|
+
* Flex container that fills its content.
|
147
|
+
*/
|
148
|
+
.filled {
|
149
|
+
@apply flex flex-1 items-stretch;
|
150
|
+
}
|
151
|
+
/**
|
152
|
+
* A pure-flex container will be display: flex.
|
153
|
+
*/
|
154
|
+
.pure-flex {
|
155
|
+
@apply flex;
|
156
|
+
}
|
157
|
+
/**
|
158
|
+
* And its immediate children will have zero padding and margin.
|
159
|
+
*/
|
160
|
+
.pure-flex > * {
|
161
|
+
@apply m-0 p-0;
|
162
|
+
}
|
163
|
+
/*
|
164
|
+
* A flex container centered along both axes.
|
165
|
+
*/
|
166
|
+
.flex-center {
|
167
|
+
@apply flex justify-center items-center;
|
168
|
+
}
|
169
|
+
/**
|
170
|
+
* Center flex and text.
|
171
|
+
*/
|
172
|
+
.center {
|
173
|
+
@apply flex-center text-center;
|
174
|
+
}
|
175
|
+
}
|
176
|
+
|
177
|
+
/* CONTENT */
|
178
|
+
@layer base {
|
179
|
+
code {}
|
180
|
+
|
181
|
+
main {
|
182
|
+
@apply p-8 flex-col filled flex-center;
|
183
|
+
}
|
184
|
+
|
185
|
+
header {
|
186
|
+
z-index: 9999;
|
187
|
+
}
|
188
|
+
|
189
|
+
footer {
|
190
|
+
@apply flex-center py-4 border-t-2 border-gray-200;
|
191
|
+
}
|
192
|
+
|
193
|
+
article {
|
194
|
+
@apply font-size-base serif mx-auto;
|
195
|
+
@apply max-w-screen-sm lg:max-w-screen-lg 2xl:max-w-screen-2xl 4xl:max-w-screen-4xl;
|
196
|
+
}
|
197
|
+
}
|
198
|
+
|
199
|
+
/* FORMS */
|
200
|
+
@layer base {
|
201
|
+
button, .button {
|
202
|
+
text-decoration: none !important;
|
203
|
+
@apply cursor-pointer;
|
204
|
+
@apply pure-flex flex-center;
|
205
|
+
@apply px-8 py-4;
|
206
|
+
@apply rounded-lg border-2;
|
207
|
+
@apply bg-blue-500 text-white font-bold;
|
208
|
+
}
|
209
|
+
|
210
|
+
label {
|
211
|
+
@apply p-4 font-light;
|
212
|
+
}
|
213
|
+
|
214
|
+
input {
|
215
|
+
@apply border-2 border-gray-300 rounded-lg;
|
216
|
+
@apply p-2;
|
217
|
+
}
|
218
|
+
|
219
|
+
select {
|
220
|
+
@apply bg-white;
|
221
|
+
@apply border-2 border-gray-300 rounded-lg;
|
222
|
+
@apply p-2;
|
223
|
+
}
|
224
|
+
|
225
|
+
/* Buttons already signal that the user can interact by touching. */
|
226
|
+
button, .button {
|
227
|
+
text-decoration: none !important;
|
228
|
+
@apply cursor-pointer;
|
229
|
+
@apply pure-flex flex-center;
|
230
|
+
@apply px-8 py-4;
|
231
|
+
@apply rounded-lg border-2;
|
232
|
+
@apply bg-blue-500 text-white font-bold;
|
233
|
+
}
|
234
|
+
}
|
235
|
+
|
236
|
+
/* TABLES */
|
237
|
+
@layer base {
|
238
|
+
table {
|
239
|
+
@apply mx-auto w-full;
|
240
|
+
}
|
241
|
+
|
242
|
+
table tr, table tr div {
|
243
|
+
@apply truncate;
|
244
|
+
}
|
245
|
+
|
246
|
+
table tr:nth-child(even) {
|
247
|
+
/* @apply bg-gray-400; */
|
248
|
+
}
|
249
|
+
}
|
250
|
+
|
251
|
+
@import './elements/index.css';
|
252
|
+
@import './viewport/index.css';
|
253
|
+
@import './custom/index.css';
|
@@ -0,0 +1,26 @@
|
|
1
|
+
/*
|
2
|
+
* Ensure the page fills the viewport. Prevent purgecss from removing this
|
3
|
+
* styling, which it likes to do for the #__next selector.
|
4
|
+
*/
|
5
|
+
/* purgecss start ignore */
|
6
|
+
html, body, #__next, #root, main {
|
7
|
+
/* Border-box, no padding. */
|
8
|
+
@apply m-0 p-0 box-border;
|
9
|
+
/* Fill screen, flex column, stretch items. */
|
10
|
+
@apply min-h-screen flex-col;
|
11
|
+
}
|
12
|
+
|
13
|
+
html,
|
14
|
+
body {
|
15
|
+
background: #fafafa;
|
16
|
+
|
17
|
+
/* font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
18
|
+
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
19
|
+
sans-serif; */
|
20
|
+
-webkit-font-smoothing: antialiased;
|
21
|
+
-moz-osx-font-smoothing: grayscale;
|
22
|
+
/* background-color: #90d5ec; */
|
23
|
+
/* background-image: linear-gradient(320deg, #fec3c5 20%, #d1ebf6 80%); */
|
24
|
+
}
|
25
|
+
|
26
|
+
/* purgecss end ignore */
|
@@ -0,0 +1 @@
|
|
1
|
+
export const PRODUCTION = process.env.NODE_ENV === 'production';
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module.exports = {
|
2
|
+
content: ["src/**/*.{js,ts,jsx,tsx}"],
|
3
|
+
theme: {
|
4
|
+
extend: {
|
5
|
+
screens: {
|
6
|
+
"3xl": "1920px",
|
7
|
+
"4xl": "3840px",
|
8
|
+
},
|
9
|
+
backgroundImage: {
|
10
|
+
"gradient-radial": "radial-gradient(var(--tw-gradient-stops))"
|
11
|
+
},
|
12
|
+
border : [ "hover"],
|
13
|
+
|
14
|
+
|
15
|
+
},
|
16
|
+
},
|
17
|
+
variants: {
|
18
|
+
extend: {},
|
19
|
+
},
|
20
|
+
plugins: [],
|
21
|
+
};
|