Hi everybody,
When installing Sage 10 using :
composer create-project roots/sage your-theme-name dev-master
I don’t get the option to choose css framework, TailWind is installed by default!!
Is there a way to install Sage 10 along with bootstrap 5 ? Im i missing something ?
Is is safe to work with sage 10 on a new project ?
Thanks
ben
2
Hey @Tartamata - Sage 10 does not yet have an installer/support for choosing a different CSS framework
You can definitely swap out Tailwind for Bootstrap in Sage 10, but you’ll have to do so manually for now
Thank you @ben
How can i do it manually ?
ben
4
You’d swap out the dependencies and any references to Tailwind classes in the styles and Blade templates
1 Like
tombro
6
This is a very brief walkthrough:
-
git clone
-
mv themes/sage themes/projectname
-
cd themes/projectname
-
composer install
-
rm tailwind.config.js
-
yarn remove @tailwindcss/typography
-
yarn remove tailwindcss
-
remove postCss: [require(‘tailwindcss’)], from webpack.mix.js
-
remove all tailwind references from resources/styles
-
yarn add bootstrap
-
touch resources/styles/config/external.scss && touch resources/styles/config/variables.scss
-
import bootstrap in resources/styles/config/external.scss
-
in resources/styles/app.scss, import config/variables & config/external
-
update blade files with bootstrap classes
-
optional: configure postcss
const mix = require(‘laravel-mix’);
const path = require(‘path’);
require(‘laravel-mix-purgecss’);
require(’@tinypixelco/laravel-mix-wp-blocks’);
/*
|--------------------------------------------------------------------------
Mix Asset Management |
|
Mix provides a clean, fluent API for defining some Webpack build steps |
for your Sage application. By default, we are compiling the Sass file |
for your application, as well as bundling up your JS files. |
|
*/
mix
.setPublicPath(’./public’)
.browserSync(‘https://example.local’);
mix
.sass(‘resources/styles/app.scss’, ‘styles’)
.sass(‘resources/styles/editor.scss’, ‘styles’)
.purgeCss({
extend: { content: [path.join(__dirname, ‘index.php’)] },
safelist: require(‘purgecss-with-wordpress’).safelist,
})
.options({
processCssUrls: false,
});
mix
.js(‘resources/scripts/app.js’, ‘scripts’)
.js(‘resources/scripts/customizer.js’, ‘scripts’)
.blocks(‘resources/scripts/editor.js’, ‘scripts’)
.autoload({ jquery: [’$’, ‘window.jQuery’] })
.extract();
mix
.copy(‘resources/fontawesome-icons.json’, ‘public/fontawesome-icons.json’)
.copyDirectory(‘resources/images’, ‘public/images’)
.copyDirectory(‘resources/fonts’, ‘public/fonts’);
mix
.sourceMaps()
.version();
4 Likes
Thanks @tombro, i’ll give it a try
system
Closed
8
This topic was automatically closed after 42 days. New replies are no longer allowed.