@tsmodule/tsmodule 28.7.0 → 30.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/commands/build/index.js +3 -3
- package/dist/commands/create/index.js +1 -1
- package/dist/constants.js +1 -0
- package/dist/index.js +3 -3
- package/package.json +21 -20
- package/templates/default/LICENSE +16 -0
- package/templates/react/LICENSE +16 -0
- package/templates/react/README.md +2 -2
- package/templates/react/package.json +2 -2
- package/templates/react/postcss.config.js +5 -1
- package/templates/react/src/{styles/components/card → components/Card}/index.css +4 -0
- package/templates/react/src/components/index.css +19 -0
- package/templates/react/src/index.css +20 -0
- package/templates/react/src/pages/_app.tsx +4 -3
- package/templates/react/tailwind.config.js +0 -2
- package/templates/react/src/styles/components/index.css +0 -1
- package/templates/react/src/styles/global/elements/index.css +0 -266
- package/templates/react/src/styles/global/index.css +0 -2
- package/templates/react/src/styles/global/viewport/index.css +0 -11
- package/templates/react/src/styles/index.css +0 -6
- package/templates/react/src/utils/globs.ts +0 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
import{dirname as R,extname as K,isAbsolute as U,resolve as F,resolve as v}from"path";import{build as
|
1
|
+
import{dirname as R,extname as K,isAbsolute as U,resolve as F,resolve as v}from"path";import{build as j,transform as q}from"esbuild";import{existsSync as A,mkdirSync as H,readFileSync as h,rmSync as _,writeFileSync as $}from"fs";import l from"chalk";import{env as L}from"process";import Q from"fast-glob";import m from"ora";import{createDebugLogger as Y,log as g}from"create-debug-logger";import{isJsOrTs as M,isTs as y,isTsxOrJsx as f}from"../../utils/resolve.js";import{createShell as Z}from"await-shell";import{emitTsDeclarations as ee}from"./lib/emitTsDeclarations.js";import{normalizeImportSpecifiers as te}from"../normalize/index.js";import{getPackageJsonFile as oe}from"../../utils/pkgJson.js";import{getWorkingDirs as W}from"../../utils/cwd.js";import{readStdin as se}from"../../utils/stdin.js";const ie=`import React from "react";
|
2
2
|
import ReactDOM from "react-dom";
|
3
|
-
`,
|
4
|
-
This might take a moment.`),ee(r),m(`Generated delcarations for ${r.length} files.`).succeed(),
|
3
|
+
`,G=t=>{const o=` ${t} `;g(l.bgBlue(l.bold(l.white(o))))},ne=()=>{let t;if(A("dist/package.json")?t=JSON.parse(h("dist/package.json","utf-8")):t={},t?.module==="module")return!0;t.type="module",$("dist/package.json",JSON.stringify(t,null,2))},I=(t,o,p)=>{const{srcDir:i,outDir:S}=W();return o=v(o),{stdin:{contents:t,sourcefile:o,resolveDir:R(o),loader:p},outdir:void 0,outfile:o.replace(M,".js").replace(i,S)}},re=async({files:t="src/**/*",styles:o="src/components/index.css",bundle:p=!1,dev:i=!1,target:S="esnext",runtimeOnly:b=!1,noWrite:O=!1,stdin:c,stdinFile:d})=>{L.NODE_ENV=i?"development":"production";const s=Y(re),V=Z(),{cwd:w,srcDir:x,outDir:a}=W(),C=await oe(),J=JSON.parse(C),k={treeShaking:p,target:S,minify:!i,jsx:"transform",jsxFactory:"React.createElement",format:"esm",charset:"utf8",logLevel:i?"warning":"error",define:{PACKAGE_JSON:C,"process.env.NODE_ENV":i?JSON.stringify("development"):JSON.stringify("production")}},T={...k,bundle:p,absWorkingDir:w,outbase:"src",outdir:"dist",assetNames:"[name].js",format:"esm",target:"esnext",platform:J?.platform??"node",write:!O};let u="";if(c){s.log("Building file from stdin",{stdin:c,stdinFile:d,noWrite:O}),d||(g(l.red("ERROR: --stdin-file must be specified to emulate a file location when using stdin.")),process.exit(1)),typeof c=="string"&&c.length?u=c:u=await se();const e={...k,sourcefile:d,loader:"tsx",banner:void 0,footer:void 0};if(O)return(await q(u,e)).code;{const n=I(u,d,"tsx");return await j({...T,...n})}}s.log("Building",{files:t,dev:i,runtimeOnly:b}),G(`${l.bold("TS Module")} [${L.NODE_ENV}]`);const r=Q.sync(t,{cwd:w}).filter(e=>K(e)!==".d.ts").map(e=>v(e));if(U(t)){r.length||r.push(t);const e=t.replace(x,a).replace(y,".js").replace(f,".js");s.log("Cleaning emitted file:",{outfile:e}),_(e,{force:!0})}else s.log("Cleaning old output:",{outDir:a}),_(a,{force:!0,recursive:!0});console.log();const D=r.filter(e=>f.test(e));s.log("Compiling TSX files:",{tsxFiles:D});const z=D.filter(e=>!e.endsWith(".d.ts"));await Promise.all(z.map(async e=>{const n=h(e,"utf-8"),E=ie+n,P=I(E,e,"tsx");await j({...T,...P})})),m("Built TSX files.").succeed();const N=r.filter(e=>y.test(e)).filter(e=>!f.test(e));s.log("Compiling TS files:",{tsFiles:N}),await j({...T,entryPoints:N.filter(e=>!e.endsWith(".d.ts"))}),m("Built TS files.").succeed();const B=r.filter(e=>!M.test(e));if(s.log("Copying non-JS/TS files.",{allFiles:r,nonJsTsFiles:B}),await Promise.all(B.map(async e=>{const n=F(w,e).replace(x,a).replace(y,".js").replace(f,".js");s.log("Copying non-source file:",{file:e,outfile:n}),H(R(n),{recursive:!0}),$(n,h(e),{encoding:"binary",flag:"w"})})),!process.env.NO_REWRITES){const e=t.replace(x,a).replace(/^(\.\/)?src\//,"dist/").replace(y,".js").replace(f,".js");await te(e.endsWith(".js")?e:`${e}.js`),m("Normalized import specifiers.").succeed()}if(ne()&&m('Forced "type": "module" in output.').succeed(),console.log(),!(i||b)){if(A(F(o))){s.log("Building styles for production.");const{style:e="./dist/bundle.css"}=J,X=["npx tailwindcss",i?"":"-m","--postcss postcss.config.js",`-i ${o}`,"-o",e];await V.run(X.join(" "))}else s.log("Styles not found.",{styles:o});G("Running post-build setup."),g(`Generating type declarations.
|
4
|
+
This might take a moment.`),ee(r),m(`Generated delcarations for ${r.length} files.`).succeed(),g(l.green("Build complete."))}};export{G as bannerLog,re as build};
|
@@ -1 +1 @@
|
|
1
|
-
import
|
1
|
+
import c from"chalk";import{createShell as l}from"await-shell";import d from"ora";import{dependencies as p,devDependencies as n}from"../../constants.js";import{copyTemplate as a}from"./lib/createTemplate.js";import{rewritePkgJson as u}from"./lib/rewritePkgJson.js";globalThis.SHELL_OPTIONS={stdio:["ignore","ignore","inherit"]};const D=async(e,{react:o=!1})=>{const i=l(),r=d(`Creating new module ${c.blueBright(e)}.`).start();await a("default",e),o&&await a("react",e),await u(e),r.succeed("Project created."),process.chdir(e);const s=[],t=["@tsmodule/tsmodule"];o?(s.push(...p.react),t.push(...n.react)):t.push(...n.default),s.length&&await i.run(`yarn add ${s.join(" ")}`),t.length&&await i.run(`yarn add -D ${t.join(" ")}`),r.succeed("Dependencies installed."),await i.run("git init"),r.succeed("Git initialized.")};export{D as create};
|
@@ -0,0 +1 @@
|
|
1
|
+
const t={default:[],react:["@tsmodule/react","react","react-dom"]},s={default:["@types/node"],react:["next","@types/react","@types/react-dom","eslint","eslint-config-next","tailwindcss","autoprefixer","cssnano","postcss","postcss-import"]};export{t as dependencies,s as devDependencies};
|
package/dist/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
|
-
var r="@tsmodule/tsmodule",s="node",a="module",d="
|
2
|
+
var r="@tsmodule/tsmodule",s="node",a="module",d="30.0.0",m="tsmodule/tsmodule",l="TypeScript Module loader and compiler",p="MIT",c="dist/types/index.d.ts",u={tsmodule:"dist/index.js"},f={".":"./dist/loader/index.js","./*":"./dist/*/index.js","./package.json":"./package.json"},g=["dist/","templates/"],b={node:">=14"},y={bootstrap:"node bootstrap.js",bootload:"node --no-warnings --loader ./dist/loader/index.js src/index.ts build -r",prebuild:"yarn bootstrap && yarn bootload && yarn link -f",build:"tsmodule build",dev:"tsmodule dev",lint:"eslint --fix src",prepare:"yarn build -r",prepublishOnly:"yarn build && yarn test",pretest:"yarn build -r",test:"ava --no-worker-threads",retest:"SKIP_TEST_SETUP=1 yarn test"},h={"@types/glob":"^7.2.0","@types/node":"^17.0.21","@typescript-eslint/eslint-plugin":"^5.14.0","@typescript-eslint/parser":"^5.14.0",ava:"^4.1.0","await-shell":"^32.0.0",chalk:"^5.0.1",commander:"^9.0.0","create-debug-logger":"^3.0.0",esbuild:"^0.14.25",eslint:"^8.11.0","fast-glob":"^3.2.10","fs-extra":"^10.0.1",glob:"^7.2.0","node-watch":"^0.7.3",ora:"^6.1.0",path:"^0.12.7",typescript:"^4.6.2"},v={"@types/fs-extra":"^9.0.13","eslint-config-next":"^12.1.0"},w={timeout:"10 minutes",files:["test/**/*.test.ts"],extensions:{ts:"module"},nodeArguments:["--no-warnings","--loader=@tsmodule/tsmodule"]},S=["esm","loader","typescript","loader hook","require hook","experimental-loader"],R=[{name:"C. Lewis",email:"ctj.lewis@icloud.com",url:"https://ctjlewis.com"}],n={name:r,platform:s,type:a,version:d,repository:m,description:l,license:p,types:c,bin:u,exports:f,files:g,engines:b,scripts:y,dependencies:h,devDependencies:v,ava:w,keywords:S,contributors:R};import t from"chalk";import{Command as x}from"commander";import{build as B}from"./commands/build/index.js";import{create as C}from"./commands/create/index.js";import{dev as E}from"./commands/dev/index.js";import{execute as T}from"./commands/execute/index.js";import{normalizeImportSpecifiers as A}from"./commands/normalize/index.js";const{version:j}=n,o=new x;o.name(t.white(t.bold("tsmodule"))).usage(t.white(t.bold("<file | command> [options]"))).description(t.blueBright(`A tool for building TypeScript modules.
|
3
3
|
|
4
4
|
Run TS directly: ${t.bold("tsmodule src/index.ts")}
|
5
|
-
Use a command: ${t.bold("tsmodule build")}`)).version(String(j)),o.command("dev").description("Build and watch for changes.").action(E),o.command("build").option("--files <files>","Entrypoints to compile
|
6
|
-
For programmatic use alongside { stdin: ... }
|
5
|
+
Use a command: ${t.bold("tsmodule build")}`)).version(String(j)),o.command("dev").description("Build and watch for changes.").action(E),o.command("build").description("Builds TS files to output in dist/.").option("--files <files>","Entrypoints to compile.","src/**/*").option("--styles <styles>","Specify stylesheet entrypoint.","src/components/index.css").option("-t, --target <target>","ECMAScript featureset to target.","esnext").option("-b, --bundle","Bundle dependencies into entrypoints.",!1).option("-d, --dev","Build development runtime.",!1).option("-r, --runtime-only","Do not emit type declarations, only build JS runtime.",!1).option("--stdin [source]","Read from a string or stdin.").option("--stdin-file [file]","File path to mock for stdin.").option("--no-write",`Return code from build() rather than write to disk.
|
6
|
+
For programmatic use alongside { stdin: ... }.`,!1).action(async i=>{await B(i)}),o.command("create <name>").option("--react","Create React component library with Next.js").description("Create a new project.").action(C),o.command("normalize [files]").description(`Rewrites import specifiers in files to ESM-compliant paths.
|
7
7
|
(default: dist/**/*.js)`).action(async({files:i})=>{await A(i)}),o.command("run",{isDefault:!0}).argument("<file>","The file to run.").option("--d, --dev","Enable development mode").description("Run the given TS program, analogous to `node <file>`.").action(T),o.parse(process.argv);
|
package/package.json
CHANGED
@@ -2,10 +2,11 @@
|
|
2
2
|
"name": "@tsmodule/tsmodule",
|
3
3
|
"platform": "node",
|
4
4
|
"type": "module",
|
5
|
-
"version": "
|
5
|
+
"version": "30.0.0",
|
6
6
|
"repository": "tsmodule/tsmodule",
|
7
7
|
"description": "TypeScript Module loader and compiler",
|
8
8
|
"license": "MIT",
|
9
|
+
"types": "dist/types/index.d.ts",
|
9
10
|
"bin": {
|
10
11
|
"tsmodule": "dist/index.js"
|
11
12
|
},
|
@@ -14,14 +15,6 @@
|
|
14
15
|
"./*": "./dist/*/index.js",
|
15
16
|
"./package.json": "./package.json"
|
16
17
|
},
|
17
|
-
"types": "dist/types/index.d.ts",
|
18
|
-
"contributors": [
|
19
|
-
{
|
20
|
-
"name": "C. Lewis",
|
21
|
-
"email": "ctj.lewis@icloud.com",
|
22
|
-
"url": "https://ctjlewis.com"
|
23
|
-
}
|
24
|
-
],
|
25
18
|
"files": [
|
26
19
|
"dist/",
|
27
20
|
"templates/"
|
@@ -62,14 +55,10 @@
|
|
62
55
|
"path": "^0.12.7",
|
63
56
|
"typescript": "^4.6.2"
|
64
57
|
},
|
65
|
-
"
|
66
|
-
"
|
67
|
-
"
|
68
|
-
|
69
|
-
"loader hook",
|
70
|
-
"require hook",
|
71
|
-
"experimental-loader"
|
72
|
-
],
|
58
|
+
"devDependencies": {
|
59
|
+
"@types/fs-extra": "^9.0.13",
|
60
|
+
"eslint-config-next": "^12.1.0"
|
61
|
+
},
|
73
62
|
"ava": {
|
74
63
|
"timeout": "10 minutes",
|
75
64
|
"files": [
|
@@ -83,7 +72,19 @@
|
|
83
72
|
"--loader=@tsmodule/tsmodule"
|
84
73
|
]
|
85
74
|
},
|
86
|
-
"
|
87
|
-
"
|
88
|
-
|
75
|
+
"keywords": [
|
76
|
+
"esm",
|
77
|
+
"loader",
|
78
|
+
"typescript",
|
79
|
+
"loader hook",
|
80
|
+
"require hook",
|
81
|
+
"experimental-loader"
|
82
|
+
],
|
83
|
+
"contributors": [
|
84
|
+
{
|
85
|
+
"name": "C. Lewis",
|
86
|
+
"email": "ctj.lewis@icloud.com",
|
87
|
+
"url": "https://ctjlewis.com"
|
88
|
+
}
|
89
|
+
]
|
89
90
|
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
2
|
+
this software and associated documentation files (the "Software"), to deal in
|
3
|
+
the Software without restriction, including without limitation the rights to
|
4
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
5
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
6
|
+
subject to the following conditions:
|
7
|
+
|
8
|
+
The above copyright notice and this permission notice shall be included in all
|
9
|
+
copies or substantial portions of the Software.
|
10
|
+
|
11
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
12
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
13
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
14
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
15
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
16
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,16 @@
|
|
1
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
2
|
+
this software and associated documentation files (the "Software"), to deal in
|
3
|
+
the Software without restriction, including without limitation the rights to
|
4
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
5
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
6
|
+
subject to the following conditions:
|
7
|
+
|
8
|
+
The above copyright notice and this permission notice shall be included in all
|
9
|
+
copies or substantial portions of the Software.
|
10
|
+
|
11
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
12
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
13
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
14
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
15
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
16
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -39,10 +39,10 @@ To reuse your components:
|
|
39
39
|
|
40
40
|
#### Footnotes
|
41
41
|
|
42
|
-
Styles are exported in `dist/`, and are also bundled to `dist/
|
42
|
+
Styles are exported in `dist/`, and are also bundled to `dist/bundle.css` from
|
43
43
|
the entrypoint given in the `style` package.json.
|
44
44
|
|
45
45
|
The default behavior is to export all component styles, i.e.
|
46
|
-
`src/styles/components/index.css ➞ dist/
|
46
|
+
`src/styles/components/index.css ➞ dist/bundle.css`. This can be overridden
|
47
47
|
with tsmodule's `--styles` flag, i.e. `tsmodule build --styles
|
48
48
|
src/styles/index.css` (which would include all styles in emitted bundle).
|
@@ -4,14 +4,14 @@
|
|
4
4
|
"version": "0.0.1",
|
5
5
|
"license": "MIT",
|
6
6
|
"types": "dist/index.d.ts",
|
7
|
-
"style": "dist/
|
7
|
+
"style": "dist/bundle.css",
|
8
8
|
"files": [
|
9
9
|
"dist"
|
10
10
|
],
|
11
11
|
"exports": {
|
12
12
|
".": "./dist/index.js",
|
13
13
|
"./styles": "./dist/styles/index.css",
|
14
|
-
"./styles/*": "./dist/
|
14
|
+
"./styles/*": "./dist/components/*/index.css",
|
15
15
|
"./package.json": "./package.json",
|
16
16
|
"./*": "./dist/components/*/index.js"
|
17
17
|
},
|
@@ -0,0 +1,19 @@
|
|
1
|
+
/**
|
2
|
+
* @fileoverview
|
3
|
+
* COMPONENT STYLES
|
4
|
+
*
|
5
|
+
* This file loads all styles needed to render any of the module components, and
|
6
|
+
* does not include, e.g., the standardized viewport styles (which would alter
|
7
|
+
* the sizing of html, body, ... in any layouts that relied it).
|
8
|
+
*/
|
9
|
+
|
10
|
+
/**
|
11
|
+
* ❌ DO NOT CHANGE: Load standardized styles that may be relied on by component
|
12
|
+
* styles.
|
13
|
+
*/
|
14
|
+
@import "@tsmodule/react";
|
15
|
+
|
16
|
+
/**
|
17
|
+
* 📝 EXPORT COMPONENT STYLES: Load your component style exports here as needed.
|
18
|
+
*/
|
19
|
+
@import "./Card/index.css";
|
@@ -0,0 +1,20 @@
|
|
1
|
+
/**
|
2
|
+
* @fileoverview
|
3
|
+
* APPLICATION STYLES
|
4
|
+
*
|
5
|
+
* This stylesheet includes all styles needed to render the entire viewport,
|
6
|
+
* namely Tailwind utilities, standardized viewport styles, and all component
|
7
|
+
* styles.
|
8
|
+
*/
|
9
|
+
|
10
|
+
/**
|
11
|
+
* Load Tailwind utilities.
|
12
|
+
*/
|
13
|
+
@import "tailwindcss/base";
|
14
|
+
@import "tailwindcss/utilities";
|
15
|
+
@import "tailwindcss/components";
|
16
|
+
|
17
|
+
/**
|
18
|
+
* Load this module's component styles.
|
19
|
+
*/
|
20
|
+
@import "./components/index.css";
|
@@ -1,8 +1,9 @@
|
|
1
|
-
import "../
|
1
|
+
import "../index.css";
|
2
|
+
|
2
3
|
import type { AppProps } from "next/app";
|
3
4
|
import { StrictMode } from "react";
|
4
5
|
|
5
|
-
function
|
6
|
+
function App({ Component, pageProps }: AppProps) {
|
6
7
|
return (
|
7
8
|
<StrictMode>
|
8
9
|
<Component {...pageProps} />
|
@@ -10,4 +11,4 @@ function MyApp({ Component, pageProps }: AppProps) {
|
|
10
11
|
);
|
11
12
|
}
|
12
13
|
|
13
|
-
export default
|
14
|
+
export default App;
|
@@ -1 +0,0 @@
|
|
1
|
-
@import './card/index.css';
|
@@ -1,266 +0,0 @@
|
|
1
|
-
/* FONTS: Customize */
|
2
|
-
/* Style your serif font here. */
|
3
|
-
.serif {
|
4
|
-
font-family: serif;
|
5
|
-
}
|
6
|
-
|
7
|
-
/* Style your sans font here. */
|
8
|
-
.sans-serif {
|
9
|
-
font-family: sans-serif;
|
10
|
-
}
|
11
|
-
|
12
|
-
/* Style your display font here. */
|
13
|
-
.display {}
|
14
|
-
|
15
|
-
/* Style your interface font here. */
|
16
|
-
.interface {
|
17
|
-
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
|
18
|
-
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
|
19
|
-
}
|
20
|
-
|
21
|
-
/* LINKS */
|
22
|
-
a {
|
23
|
-
@apply underline;
|
24
|
-
color: inherit;
|
25
|
-
text-decoration: none;
|
26
|
-
}
|
27
|
-
|
28
|
-
h1 a,
|
29
|
-
h2 a,
|
30
|
-
h3 a,
|
31
|
-
h4 a,
|
32
|
-
h5 a,
|
33
|
-
h6 a {
|
34
|
-
color: #0070f3;
|
35
|
-
}
|
36
|
-
|
37
|
-
/* If the user can hover, transition in by default. */
|
38
|
-
@media (hover: hover) {
|
39
|
-
a {
|
40
|
-
transition: 300ms;
|
41
|
-
text-decoration: underline;
|
42
|
-
text-decoration-color: transparent;
|
43
|
-
}
|
44
|
-
|
45
|
-
a:hover {
|
46
|
-
text-decoration-color: inherit;
|
47
|
-
}
|
48
|
-
}
|
49
|
-
|
50
|
-
/* FONT SIZES */
|
51
|
-
@media (min-width: 769px) {
|
52
|
-
html {
|
53
|
-
font-size: 1.25em;
|
54
|
-
}
|
55
|
-
}
|
56
|
-
|
57
|
-
@media (min-width: 1081px) {
|
58
|
-
html {
|
59
|
-
font-size: 1.5em;
|
60
|
-
}
|
61
|
-
}
|
62
|
-
|
63
|
-
@media (min-width: 1921px) {
|
64
|
-
html {
|
65
|
-
font-size: 2.5em;
|
66
|
-
}
|
67
|
-
}
|
68
|
-
|
69
|
-
/* HEADINGS */
|
70
|
-
|
71
|
-
h1, .h1,
|
72
|
-
h2, .h2,
|
73
|
-
h3, .h3,
|
74
|
-
h4, .h4,
|
75
|
-
h5, .h5,
|
76
|
-
h6, .h6 {
|
77
|
-
@apply font-bold display;
|
78
|
-
@apply pb-2 leading-snug;
|
79
|
-
}
|
80
|
-
|
81
|
-
h1, .h1 {
|
82
|
-
@apply text-4xl;
|
83
|
-
}
|
84
|
-
|
85
|
-
h2, .h2 {
|
86
|
-
@apply text-2xl;
|
87
|
-
}
|
88
|
-
|
89
|
-
h3, .h3 {
|
90
|
-
@apply text-xl;
|
91
|
-
}
|
92
|
-
|
93
|
-
h4, .h4 {
|
94
|
-
@apply text-lg;
|
95
|
-
}
|
96
|
-
|
97
|
-
h5, .h5 {
|
98
|
-
@apply text-base;
|
99
|
-
}
|
100
|
-
|
101
|
-
h6, .h6 {
|
102
|
-
@apply text-sm;
|
103
|
-
}
|
104
|
-
|
105
|
-
p {
|
106
|
-
@apply text-base;
|
107
|
-
}
|
108
|
-
|
109
|
-
.title {
|
110
|
-
@apply mt-2 display font-bold;
|
111
|
-
}
|
112
|
-
|
113
|
-
.title p {
|
114
|
-
@apply p-0 m-0;
|
115
|
-
}
|
116
|
-
|
117
|
-
/* FLEX */
|
118
|
-
|
119
|
-
/**
|
120
|
-
* A container that expands to fill its parent.
|
121
|
-
*/
|
122
|
-
.expanded {
|
123
|
-
@apply h-full w-full;
|
124
|
-
}
|
125
|
-
/**
|
126
|
-
* A flex container that is filled by its content.
|
127
|
-
*/
|
128
|
-
.filled {
|
129
|
-
@apply flex flex-1 items-stretch;
|
130
|
-
}
|
131
|
-
/**
|
132
|
-
* A pure-flex container will be display: flex.
|
133
|
-
*/
|
134
|
-
.pure-flex {
|
135
|
-
@apply flex;
|
136
|
-
}
|
137
|
-
/**
|
138
|
-
* And its immediate children will have zero padding and margin.
|
139
|
-
*/
|
140
|
-
.pure-flex > * {
|
141
|
-
@apply m-0 p-0;
|
142
|
-
}
|
143
|
-
/*
|
144
|
-
* A flex container centered along both axes.
|
145
|
-
*/
|
146
|
-
.flex-center {
|
147
|
-
@apply flex justify-center items-center;
|
148
|
-
}
|
149
|
-
/**
|
150
|
-
* Center flex and text.
|
151
|
-
*/
|
152
|
-
.center {
|
153
|
-
@apply flex-center text-center;
|
154
|
-
}
|
155
|
-
|
156
|
-
/* CONTENT */
|
157
|
-
|
158
|
-
code {}
|
159
|
-
|
160
|
-
main {
|
161
|
-
@apply flex-center flex-col space-y-8 md:space-y-16;
|
162
|
-
@apply min-h-full w-full;
|
163
|
-
@apply px-4 py-16;
|
164
|
-
}
|
165
|
-
|
166
|
-
header {
|
167
|
-
z-index: 9999;
|
168
|
-
}
|
169
|
-
|
170
|
-
footer {
|
171
|
-
@apply flex-center py-4 border-t-2 border-gray-200;
|
172
|
-
}
|
173
|
-
|
174
|
-
article {
|
175
|
-
@apply text-lg serif mx-auto;
|
176
|
-
@apply max-w-screen-sm lg:max-w-screen-lg 2xl:max-w-screen-2xl 4xl:max-w-screen-4xl;
|
177
|
-
}
|
178
|
-
|
179
|
-
/* FORMS */
|
180
|
-
|
181
|
-
button, .button {
|
182
|
-
@apply cursor-pointer;
|
183
|
-
@apply pure-flex flex-center;
|
184
|
-
@apply px-8 py-4;
|
185
|
-
@apply rounded-lg border-2;
|
186
|
-
@apply bg-blue-500 text-white font-bold;
|
187
|
-
|
188
|
-
text-decoration: none !important;
|
189
|
-
}
|
190
|
-
|
191
|
-
label {
|
192
|
-
@apply p-4 font-light;
|
193
|
-
}
|
194
|
-
|
195
|
-
input {
|
196
|
-
@apply border-2 border-gray-300 rounded-lg;
|
197
|
-
@apply p-2;
|
198
|
-
}
|
199
|
-
|
200
|
-
select {
|
201
|
-
@apply bg-white;
|
202
|
-
@apply border-2 border-gray-300 rounded-lg;
|
203
|
-
@apply p-2;
|
204
|
-
}
|
205
|
-
|
206
|
-
/* Buttons already signal that the user can interact by touching. */
|
207
|
-
button, .button {
|
208
|
-
text-decoration: none !important;
|
209
|
-
@apply cursor-pointer;
|
210
|
-
@apply pure-flex flex-center;
|
211
|
-
@apply px-8 py-4;
|
212
|
-
@apply rounded-lg border-2;
|
213
|
-
@apply bg-blue-500 text-white font-bold;
|
214
|
-
}
|
215
|
-
|
216
|
-
/* TABLES */
|
217
|
-
|
218
|
-
table {
|
219
|
-
@apply mx-auto w-full;
|
220
|
-
}
|
221
|
-
|
222
|
-
table tr, table tr div {
|
223
|
-
@apply truncate;
|
224
|
-
}
|
225
|
-
|
226
|
-
table tr:nth-child(even) {
|
227
|
-
/* @apply bg-gray-400; */
|
228
|
-
}
|
229
|
-
|
230
|
-
|
231
|
-
.squish {
|
232
|
-
animation-name: squish;
|
233
|
-
animation-timing-function: ease;
|
234
|
-
animation-duration: 2s;
|
235
|
-
animation-iteration-count: 1;
|
236
|
-
}
|
237
|
-
|
238
|
-
@keyframes squish {
|
239
|
-
0% {
|
240
|
-
transform: scale(1, 1);
|
241
|
-
}
|
242
|
-
|
243
|
-
10% {
|
244
|
-
transform: scale(1.1, 0.9);
|
245
|
-
}
|
246
|
-
|
247
|
-
30% {
|
248
|
-
transform: scale(0.9, 1.1);
|
249
|
-
}
|
250
|
-
|
251
|
-
50% {
|
252
|
-
transform: scale(1.05, 0.95);
|
253
|
-
}
|
254
|
-
|
255
|
-
57% {
|
256
|
-
transform: scale(1, 1);
|
257
|
-
}
|
258
|
-
|
259
|
-
64% {
|
260
|
-
transform: scale(1, 1);
|
261
|
-
}
|
262
|
-
|
263
|
-
100% {
|
264
|
-
transform: scale(1, 1);
|
265
|
-
}
|
266
|
-
}
|
@@ -1,11 +0,0 @@
|
|
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 {
|
7
|
-
@apply m-0 p-0 box-border;
|
8
|
-
@apply min-h-screen;
|
9
|
-
@apply w-full h-full;
|
10
|
-
}
|
11
|
-
/* purgecss end ignore */
|
@@ -1 +0,0 @@
|
|
1
|
-
export const PRODUCTION = process.env.NODE_ENV === 'production';
|