Last active
February 23, 2020 15:18
-
-
Save florianjs/cb81c38bc446d5fcec2a45df362f94d7 to your computer and use it in GitHub Desktop.
Revisions
-
florianjs revised this gist
Feb 23, 2020 . 2 changed files with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ Install all packages: npm init -y npm i postcss-cli postcss cssnano @fullhuman/postcss-purgecss tailwindcss --save-dev npm i watch --save-dev // ( optionnal ) package.json : @@ -9,7 +9,7 @@ Change the path to your styles.css and main.css ( "build:css": "postcss YOUR_ postcss.config.js : Change the path to your *.html files and *.js files (if needed) in line 13 Follow the Steps 2 - 3 & 4 : https://tailwindcss.com/docs/installation/ When you are ready, build it : npm run build:css This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ { "name": "YOUR_OWN_NAME", "version": "1.0.0", "description": "", "main": "index.js", -
florianjs revised this gist
Feb 23, 2020 . 1 changed file with 6 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,15 +1,14 @@ Install all packages: npm init -y npm i postcss-cli postcss cssnano @fullhuman/postcss-purgecss --save-dev npm i watch --save-dev // ( optionnal ) package.json : Change the path to your styles.css and main.css ( "build:css": "postcss YOUR_PATH/styles.css -o YOUR_PATH/main.css", ) postcss.config.js : Change the path to your *.html files and *.js files (if needed) in line 13 Follow the Steps 1 - 2 - 3 & 4 : https://tailwindcss.com/docs/installation/ When you are ready, build it : -
florianjs revised this gist
Feb 16, 2020 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,6 +6,7 @@ Change the path to your *.html files and *.js files (if needed) in line 13 Install all packages: npm init -y npm i postcss-cli postcss cssnano @fullhuman/postcss-purgecss --save-dev npm i watch --save-dev // ( optionnal ) -
florianjs revised this gist
Feb 16, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ Change the path to your *.html files and *.js files (if needed) in line 13 Install all packages: npm i postcss-cli postcss cssnano @fullhuman/postcss-purgecss --save-dev npm i watch --save-dev // ( optionnal ) Follow the Steps 1 - 2 - 3 & 4 : https://tailwindcss.com/docs/installation/ -
florianjs revised this gist
Feb 16, 2020 . 1 changed file with 11 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,4 +2,14 @@ package.json : Change the path to your styles.css and main.css ( generated CSS) on the line 7 postcss.config.js : Change the path to your *.html files and *.js files (if needed) in line 13 Install all packages: npm i postcss-cli postcss cssnano @fullhuman/postcss-purgecss --save-dev npm i watch --save // ( optionnal ) Follow the Steps 1 - 2 - 3 & 4 : https://tailwindcss.com/docs/installation/ When you are ready, build it : npm run build:css -
florianjs created this gist
Feb 16, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ package.json : Change the path to your styles.css and main.css ( generated CSS) on the line 7 postcss.config.js : Change the path to your *.html files and *.js files (if needed) in line 13 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ { "name": "Delightful", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "build:css": "postcss styles.css -o main.css", "watch": "watch \"npm run build:css\" ./" }, "keywords": [], "author": "", "license": "ISC", "devDependencies": { "@fullhuman/postcss-purgecss": "^2.0.6", "cssnano": "^4.1.10", "postcss": "^7.0.26", "postcss-cli": "^7.1.0", "tailwindcss": "^1.2.0" }, "dependencies": { "watch": "^1.0.2" } } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ const tailwindcss = require('tailwindcss'); const purgecss = require('@fullhuman/postcss-purgecss'); const cssnano = require('cssnano'); const autoprefixer = require('autoprefixer'); module.exports = { plugins: [ tailwindcss('./tailwind.config.js'), cssnano({ preset: 'default' }), purgecss({ content: ['./*.html', './assets/js/*.js'], defaultExtractor: (content) => content.match(/[\w-/:]+(?<!:)/g) || [] }), autoprefixer ] }; This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ /* purgecss start ignore */ @tailwind base; @tailwind components; /* purgecss end ignore */ @tailwind utilities;