diff --git a/.DS_Store b/.DS_Store index 16fc97e8..bbbcc363 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..9b29653f --- /dev/null +++ b/.gitattributes @@ -0,0 +1,30 @@ +# Files +/.editorconfig export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore +/.php_cs.dist export-ignore + +# Enforce checkout with linux lf consistent over all plattforms +*.bat text eol=lf +*.html text eol=lf +*.css text eol=lf +*.tmpl text eol=lf +*.less text eol=lf +*.scss text eol=lf +*.js text eol=lf +*.json text eol=lf +*.php text eol=lf +*.rst text eol=lf +*.md text eol=lf +*.yml text eol=lf +*.yaml text eol=lf +*.ts text eol=lf +*.typoscript text eol=lf +*.xlf text eol=lf +*.sql text eol=lf +*.t3s text eol=lf +*.txt text eol=lf +*.sh text eol=lf +*.html linguist-detectable=false +*.css linguist-detectable=false +*.scss linguist-detectable=false diff --git a/.gitignore b/.gitignore index a348ba4c..35b12655 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ /node_modules/ /deploy/ /nessapp-npm/ -package-lock.json \ No newline at end of file diff --git a/code_of_conduct.md b/code_of_conduct.md new file mode 100644 index 00000000..34c652e7 --- /dev/null +++ b/code_of_conduct.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +leroy.wagner20@gmail.com. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. diff --git a/license b/license new file mode 100644 index 00000000..4c62396d --- /dev/null +++ b/license @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Leroy Wagner + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/package-lock.json b/package-lock.json index 6fd1f655..70538d87 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ness.js", - "version": "0.1.0", + "version": "3.0.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ness.js", - "version": "0.1.0", + "version": "3.0.5", "license": "MIT", "dependencies": { "@testing-library/jest-dom": "^5.16.4", @@ -17,6 +17,8 @@ "pug": "^3.0.2", "react": "^18.2.0", "react-dom": "^18.2.0", + "react-helmet": "^6.1.0", + "react-helmet-async": "^1.3.0", "react-router-dom": "^6.3.0", "sass": "^1.53.0" }, @@ -9147,7 +9149,6 @@ "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "peer": true, "dependencies": { "loose-envify": "^1.0.0" } @@ -16255,6 +16256,21 @@ "node": ">= 6" } }, + "node_modules/prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "node_modules/prop-types/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, "node_modules/proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -16927,6 +16943,41 @@ "integrity": "sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg==", "peer": true }, + "node_modules/react-fast-compare": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.0.tgz", + "integrity": "sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA==" + }, + "node_modules/react-helmet": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/react-helmet/-/react-helmet-6.1.0.tgz", + "integrity": "sha512-4uMzEY9nlDlgxr61NL3XbKRy1hEkXmKNXhjbAIOVw5vcFrsdYbH2FEwcNyWvWinl103nXgzYNlns9ca+8kFiWw==", + "dependencies": { + "object-assign": "^4.1.1", + "prop-types": "^15.7.2", + "react-fast-compare": "^3.1.1", + "react-side-effect": "^2.1.0" + }, + "peerDependencies": { + "react": ">=16.3.0" + } + }, + "node_modules/react-helmet-async": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/react-helmet-async/-/react-helmet-async-1.3.0.tgz", + "integrity": "sha512-9jZ57/dAn9t3q6hneQS0wukqC2ENOBgMNVEhb/ZG9ZSxUetzVIw4iAmEU38IaVg3QGYauQPhSeUTuIUtFglWpg==", + "dependencies": { + "@babel/runtime": "^7.12.5", + "invariant": "^2.2.4", + "prop-types": "^15.7.2", + "react-fast-compare": "^3.2.0", + "shallowequal": "^1.1.0" + }, + "peerDependencies": { + "react": "^16.6.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.6.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", @@ -16956,6 +17007,14 @@ "react-dom": ">=16.8" } }, + "node_modules/react-side-effect": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/react-side-effect/-/react-side-effect-2.1.2.tgz", + "integrity": "sha512-PVjOcvVOyIILrYoyGEpDN3vmYNLdy1CajSFNt4TDsVQC5KpTijDvWVoR+/7Rz2xT978D8/ZtFceXxzsPwZEDvw==", + "peerDependencies": { + "react": "^16.3.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -17900,6 +17959,11 @@ "node": ">=8" } }, + "node_modules/shallowequal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", + "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" + }, "node_modules/shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -28482,7 +28546,6 @@ "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "peer": true, "requires": { "loose-envify": "^1.0.0" } @@ -34066,6 +34129,23 @@ "sisteransi": "^1.0.5" } }, + "prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + }, + "dependencies": { + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + } + } + }, "proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -34619,6 +34699,34 @@ "integrity": "sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg==", "peer": true }, + "react-fast-compare": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.0.tgz", + "integrity": "sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA==" + }, + "react-helmet": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/react-helmet/-/react-helmet-6.1.0.tgz", + "integrity": "sha512-4uMzEY9nlDlgxr61NL3XbKRy1hEkXmKNXhjbAIOVw5vcFrsdYbH2FEwcNyWvWinl103nXgzYNlns9ca+8kFiWw==", + "requires": { + "object-assign": "^4.1.1", + "prop-types": "^15.7.2", + "react-fast-compare": "^3.1.1", + "react-side-effect": "^2.1.0" + } + }, + "react-helmet-async": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/react-helmet-async/-/react-helmet-async-1.3.0.tgz", + "integrity": "sha512-9jZ57/dAn9t3q6hneQS0wukqC2ENOBgMNVEhb/ZG9ZSxUetzVIw4iAmEU38IaVg3QGYauQPhSeUTuIUtFglWpg==", + "requires": { + "@babel/runtime": "^7.12.5", + "invariant": "^2.2.4", + "prop-types": "^15.7.2", + "react-fast-compare": "^3.2.0", + "shallowequal": "^1.1.0" + } + }, "react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", @@ -34641,6 +34749,12 @@ "react-router": "6.3.0" } }, + "react-side-effect": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/react-side-effect/-/react-side-effect-2.1.2.tgz", + "integrity": "sha512-PVjOcvVOyIILrYoyGEpDN3vmYNLdy1CajSFNt4TDsVQC5KpTijDvWVoR+/7Rz2xT978D8/ZtFceXxzsPwZEDvw==", + "requires": {} + }, "read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -35410,6 +35524,11 @@ "kind-of": "^6.0.2" } }, + "shallowequal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", + "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" + }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", diff --git a/package.json b/package.json index d5d2d551..475a91d5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "ness.js", - "version": "3.0.5", + "name": "ness-app", + "version": "3.0.9", "license": "MIT", "dependencies": { "@testing-library/jest-dom": "^5.16.4", @@ -11,6 +11,8 @@ "pug": "^3.0.2", "react": "^18.2.0", "react-dom": "^18.2.0", + "react-helmet": "^6.1.0", + "react-helmet-async": "^1.3.0", "react-router-dom": "^6.3.0", "sass": "^1.53.0" }, diff --git a/postcss.config.js b/postcss.config.js index 1a3bd70c..3868728f 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,3 +1,4 @@ +// used for post-build tailwind module.exports = { plugins: ['tailwindcss', 'postcss-preset-env'], -} \ No newline at end of file +} diff --git a/readme.md b/readme.md new file mode 100644 index 00000000..07bb04c3 --- /dev/null +++ b/readme.md @@ -0,0 +1,56 @@ +

+ +




+ +




+
+

+ +## About NessJS · [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/leroywagner/ness.js/license) +NessJS - is an open-source framework based on React.js and Express.js + Webpack, supports both-side rendering with preinstalled TailwindCSS and Hot Reloader. + +## NessJS using: ++ [Webpack](https://github.com/webpack/webpack) ++ [Babel](https://github.com/babel/babel) ++ [Express](https://github.com/expressjs/express) ++ [React.js](https://github.com/facebook/create-react-app) ++ [React Helmet](https://github.com/nfl/react-helmet) ++ [TailwindCSS](https://github.com/tailwindlabs/tailwindcss) + +## 🌱 Installation +### Firstly install Ness.js-cli to setup new project +Install using npm or yarn: +``` + $ npm install -g create-ness-app +``` +``` + $ yarn global add create-ness-app +``` + +Setup new project, run in terminal: +``` +$ create-ness-app +``` +> Enter project name and place to install(by default ness-app) + + +## 🚀 There we go! +> Start your server-side and client-side app + +``` $ yarn start ``` +or +``` $ npm run start ``` + +> Start your production server + +``` $ yarn build ``` + +``` $ yarn start:prod ``` + +or + +``` $ npm run build ``` + +``` $ npm run start:prod ``` + +> open browser by default: localhost:3000 diff --git a/src/client/index.js b/src/client/index.js index 605e57f8..3aa5f645 100644 --- a/src/client/index.js +++ b/src/client/index.js @@ -9,11 +9,10 @@ const root = ReactDOM.createRoot(document.getElementById("root")); // render root.render( - + - ); // hot reload the components diff --git a/src/client/router.js b/src/client/router.js index ca040199..da0795a2 100644 --- a/src/client/router.js +++ b/src/client/router.js @@ -2,10 +2,17 @@ import React from 'react'; import { Route, Routes } from 'react-router-dom'; import Home from '../pages/Home'; -const Router = () => ( - - } /> - -); +// Routes +const HomePage = () => + +function Router() { + return ( + + + } /> + + + ) +} export default Router; \ No newline at end of file diff --git a/src/components/layout.component.js b/src/components/layout.component.js new file mode 100644 index 00000000..b8c4390b --- /dev/null +++ b/src/components/layout.component.js @@ -0,0 +1,20 @@ +import React from 'react'; + +export class PageMeta extends React.Component { + constructor(props) { + super(props); + } + + render() { + return this.props.children; + } +} + +export class Layout extends React.Component { + constructor(props) { + super(props); + } + render() { + return this.props.children + } +} \ No newline at end of file diff --git a/src/components/paragraph.component.js b/src/components/paragraph.component.js index fe07bfaa..29260ab6 100644 --- a/src/components/paragraph.component.js +++ b/src/components/paragraph.component.js @@ -8,14 +8,9 @@ export class Paragraph extends React.Component { render() { return (
- -
-

{this.props.text}

-
-
- {React.cloneElement(this.props.children)} -
-
+
+ {React.cloneElement(this.props.children)} +
); } diff --git a/src/pages/Home.js b/src/pages/Home.js index 8c094ef9..735a7d19 100644 --- a/src/pages/Home.js +++ b/src/pages/Home.js @@ -1,33 +1,46 @@ import React from 'react'; -import { Link } from 'react-router-dom'; import { Title } from '../components/title.component'; import { Paragraph } from '../components/paragraph.component'; +import { PageMeta, Layout } from '../components/layout.component'; +import { Helmet } from 'react-helmet'; import '../styles/layout.css'; class Home extends React.Component { + constructor(props) { + super(props); + } + render() { return ( -
-
- - Codestin Search App -

Get started by editing:

- -
- src/client/router.js -
-
- or - -
- src/pages/Home.js + + + Codestin Search App + + + +
+
+ + Codestin Search App +

Get started by editing:

+ +
+ src/client/router.js +
+
+ or + +
+ src/pages/Home.js +
+
- -
-
+
+ + ); } } -export default Home; +export default Home; \ No newline at end of file diff --git a/src/server/index.js b/src/server/index.js index e48258dd..6d935286 100644 --- a/src/server/index.js +++ b/src/server/index.js @@ -1,8 +1,9 @@ -import Router from '../client/router'; +import Router, { MetaData } from '../client/router'; import React from 'react'; import express from 'express'; import { StaticRouter } from 'react-router-dom/server'; import { renderToString } from 'react-dom/server'; +import { Helmet } from 'react-helmet'; // server configuration const port = 3000; @@ -36,12 +37,20 @@ server.set('views', path.join(__dirname, '..', 'views')); // all routes to client router server.get('/*', (req, res) => { const context = {}; - const serverRouter = renderToString(); + const serverRouter = renderToString( + + + + ); + const metadata = Helmet.renderStatic(); + const meta = metadata.meta.toComponent() + const title = metadata.title.toComponent(); + const manifest = renderToString(meta) + renderToString(title); if (context.url) res.redirect(context.url); else res.status(200).render('index', { + metadata: manifest, production: process.env.NODE_ENV === 'production', - title: 'Welcome to NessApp', clientStyles: assets.client.css, bundledScript: assets.client.js, body: serverRouter, @@ -49,6 +58,10 @@ server.get('/*', (req, res) => { } ); +server.get('/favicon.ico'), (req, res) => { + res.status(404); +} + // start server server.listen(process.env.PORT || port, () => { logger(`🌱 NessApp started on: ${chalk.hex('#5590CB').bold('http://localhost:' + process.env.PORT || port)} and ${chalk.hex('#5590CB').bold('http://' + results['en0'][0] + ':' + process.env.PORT || port)}`); diff --git a/tailwind.config.js b/tailwind.config.js index 5f2af6d1..d5599689 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,3 +1,4 @@ +// tailwind configuration module.exports = { content: [ "./src/pages/**/*.{js,ts,jsx,tsx}", @@ -7,4 +8,4 @@ module.exports = { extend: {}, }, plugins: [], -} \ No newline at end of file +} diff --git a/views/index.pug b/views/index.pug index 68f0954e..ee5ede83 100644 --- a/views/index.pug +++ b/views/index.pug @@ -1,18 +1,16 @@ doctype html html(lang='en') - head + head !{metadata} meta(charset='utf-8') meta(http-equiv='X-UA-Compatible', content='IE=edge') meta(name='viewport', content='width=device-width, initial-scale=1') - meta(name='description', content=content) + if clientStyles link(rel='stylesheet', href=clientStyles) - - title #{title} body #root !{body} if production - script(src=bundledScript, defer) + script(src=bundledScript, defer) else - script(src=bundledScript, defer, crossorigin) \ No newline at end of file + script(src=bundledScript, defer, crossorigin) \ No newline at end of file