Make processed Tailwind config file available in Jigsaw

This commit is contained in:
Adam Wathan 2017-10-26 19:33:41 -04:00
parent fa9c74a48b
commit e2b02e4fa3
3 changed files with 7 additions and 12 deletions

View File

@ -4,6 +4,7 @@ return [
'baseUrl' => '',
'production' => false,
'collections' => [],
'config' => json_decode(file_get_contents(__DIR__ . '/tailwind.json'), true),
'colors' => ['red', 'orange', 'yellow', 'green', 'teal', 'blue', 'indigo', 'purple', 'pink'],
'active' => function ($page, $path) {
return str_contains($page->getPath(), $path);

1
docs/tailwind.json Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,16 +1,9 @@
const mix = require('laravel-mix');
const tailwind = require('./../lib/index.js');
const mix = require('laravel-mix')
const tailwind = require('./../lib/index.js')
const config = require('./tailwind.js')
const fs = require('fs')
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
fs.writeFileSync('./tailwind.json', JSON.stringify(config))
mix.js('source/_assets/js/app.js', 'source/js')
.less('source/_assets/less/main.less', 'source/css')