Skip to content

Commit

Permalink
Move Tailwind's CSS into a vendor file so it loads first rather than …
Browse files Browse the repository at this point in the history
…last
  • Loading branch information
atanas-dev committed Oct 4, 2020
1 parent 61f8303 commit 4c3a67f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/Presets/TailwindCss.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ public function getName() {
public function execute( $directory, OutputInterface $output ) {
$this->installNodePackage( $directory, $output, 'tailwindcss', '^1.1.2' );

$tailwind_scss_filepath = $this->path( WPEMERGE_CLI_DIR, 'src', 'TailwindCss', 'tailwind.scss' );
$index_scss_filepath = $this->path( $directory, 'resources', 'styles', 'frontend', 'index.scss' );
$this->appendUniqueStatement( $index_scss_filepath, file_get_contents( $tailwind_scss_filepath ) );
$this->copy([
$this->path( WPEMERGE_CLI_DIR, 'src', 'TailwindCss', 'tailwindcss.scss' )
=> $this->path( $directory, 'resources', 'styles', 'frontend', 'vendor', 'tailwindcss.scss' ),
]);

$postcss_js_filepath = $this->path( $directory, 'resources', 'build', 'postcss.js' );
$this->enablePreset( $postcss_js_filepath, 'Tailwind CSS' );
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/* ------------------------------------------------------------ *\
Tailwind CSS
\* ------------------------------------------------------------ */
Expand Down

0 comments on commit 4c3a67f

Please sign in to comment.