Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marketempower/axiom.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJhaura Wachsman <jhaurawachsman@gmail.com>2020-04-16 04:04:43 +0300
committerJhaura Wachsman <jhaurawachsman@gmail.com>2020-04-16 04:04:43 +0300
commit22a2430da4d46469cdeb97baad3942ba1d4abd1a (patch)
tree44070ed4d6c180da5dfbc63b040012b4cdfe8566 /postcss.config.js
Initial commitv0.5.0
Diffstat (limited to 'postcss.config.js')
-rw-r--r--postcss.config.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/postcss.config.js b/postcss.config.js
new file mode 100644
index 0000000..500e82d
--- /dev/null
+++ b/postcss.config.js
@@ -0,0 +1,27 @@
+const autoprefixer = require('autoprefixer')
+const cssnano = require('cssnano')({
+ preset: 'default'
+})
+const purgecss = require('@fullhuman/postcss-purgecss')({
+ content: [
+ // theme files
+ './*(layouts|content|data|static)/**/*.*(html|toml|md)',
+ // user files
+ '../../*(layouts|content|data|static)/**/*.*(html|toml|md)',
+ ],
+ defaultExtractor: content => content.match(/[\w-/:]+(?<!:)/g) || [],
+ whitelist: [ // make available for user's shortcodes
+ 'text-left', 'text-center', 'text-right', 'text-justify', 'h-0', 'h-1', 'h-2', 'h-3', 'h-4', 'h-5', 'h-6', 'h-8', 'h-10', 'w-0', 'w-1', 'w-2', 'w-3', 'w-4', 'w-5', 'w-6', 'w-8', 'w-10', 'mx-0', 'mx-1', 'mx-2', 'mx-3', 'mx-4', 'mx-5', 'mx-6', 'mx-8', 'mx-10', 'mt-0', 'mt-1', 'mt-2', 'mt-3', 'mt-4', 'mt-5', 'mt-6', 'mt-7', 'mt-8', 'mt-9', 'mt-10', 'px-0', 'px-1', 'px-2', 'px-3', 'px-4', 'px-5', 'px-6', 'px-8', 'px-10', 'pt-0', 'pt-1', 'pt-2', 'pt-3', 'pt-4', 'pt-5', 'pt-6', 'pt-7', 'pt-8', 'pt-9', 'pt-10', 'first:mt-0', 'first:pt-0', 'max-w-2xl', 'max-w-2xlp', 'max-w-3xl', 'max-w-4xl', 'max-w-5xl', 'max-w-6xl', 'max-w-full', 'flex', 'sm:flex', 'justify-center', 'sm:justify-center', 'flex-row', 'flex-col',
+ ]
+})
+
+module.exports = {
+ plugins: [
+ require('postcss-import'),
+ require('tailwindcss'),
+ require('postcss-nesting'),
+ ...process.env.NODE_ENV === 'production'
+ ? [purgecss, autoprefixer, cssnano]
+ : []
+ ]
+}