Prechádzať zdrojové kódy

Add npm files for css building

Apis Necros 2 rokov pred
rodič
commit
498f393d52
3 zmenil súbory, kde vykonal 60 pridanie a 0 odobranie
  1. 25 0
      package.json
  2. 8 0
      postcss.config.js
  3. 27 0
      tailwind.config.js

+ 25 - 0
package.json

@@ -0,0 +1,25 @@
+{
+  "name": "apisnecros",
+  "version": "1.0.0",
+  "description": "A Hugo framework theme",
+  "dependencies": {
+    "autoprefixer": "^10.4.7",
+    "cssnano": "^5.1.7",
+    "markdown-it": "^13.0.1",
+    "markdown-it-anchor": "^8.6.4",
+    "markdown-it-attrs": "^4.1.4",
+    "postcss": "^8.4.13",
+    "postcss-cli": "^9.1.0",
+    "postcss-import": "^14.1.0",
+    "tailwindcss": "^2.2.19"
+  },
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1",
+    "postcss": "npx postcss static/css/master.css -o static/css/tailwind.min.css",
+    "minify": "npx cssnano css/tailwind.css css/tailwind.min.css --safe",
+    "help": "npx postcss --help",
+    "build": "npm run postcss && npm run minify"
+  },
+  "author": "Apis Necros",
+  "license": "ISC"
+}

+ 8 - 0
postcss.config.js

@@ -0,0 +1,8 @@
+module.exports = {
+    plugins: [
+        require('cssnano', {preset: "default"}),
+        require('postcss-import'),
+        require('tailwindcss'),
+        require('autoprefixer')
+    ]
+}

+ 27 - 0
tailwind.config.js

@@ -0,0 +1,27 @@
+module.exports = {
+  purge: {
+      content: [
+      './*.{html,php}',
+      './**/*.{html,php}',
+    ],
+    safelist: [
+      '.modal-overlay',
+      '.modal',
+      '.modal-header',
+      '.modal-title',
+      '.modal-closer',
+      '.modal-body',
+    ]
+  },
+  darkMode: false, // or 'media' or 'class'
+  theme: {
+    extend: {},
+  },
+  variants: {
+    extend: {
+      fontSize: ["hover"],
+      lineHeight: ["hover"]
+    },
+  },
+  plugins: [],
+}