All Projects → tighten → laravel-mix-jigsaw

tighten / laravel-mix-jigsaw

Licence: MIT license
Laravel Mix plugin for Jigsaw.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to laravel-mix-jigsaw

laravel-mix-auto-extract
[DEPRECATED] Laravel Mix v2/3 plugin to auto extract vendor js
Stars: ✭ 26 (+85.71%)
Mutual labels:  laravel-mix, laravel-mix-plugin
laravel-mix-tailwindcss
Tailwind CSS wrapper for Laravel Mix.
Stars: ✭ 43 (+207.14%)
Mutual labels:  laravel-mix, laravel-mix-plugin
jigsaw-seed
这是组件库 Jigsaw-七巧板(https://github.com/rdkmaster/jigsaw) 的种子工程,建议所有新增的app都以这个工程作为种子开始构建。
Stars: ✭ 17 (+21.43%)
Mutual labels:  jigsaw
theme-lib-mix
A Laravel Mix function for WordPress themes.
Stars: ✭ 33 (+135.71%)
Mutual labels:  laravel-mix
adonisjs-laravel-mix
An AdonisJs fullstack application blueprint with Laravel Mix
Stars: ✭ 17 (+21.43%)
Mutual labels:  laravel-mix
laravel-mix-kirby
Laravel Mix helper for Kirby
Stars: ✭ 23 (+64.29%)
Mutual labels:  laravel-mix
rss-for-the-rest-of-us
A simple RSS reader built on Laravel. For the rest of us.
Stars: ✭ 16 (+14.29%)
Mutual labels:  laravel-mix
jigsaw-site
Jigsaw Documentation Site
Stars: ✭ 27 (+92.86%)
Mutual labels:  jigsaw
sage-vue-tailwind
Sage 10 with laravel mix, tailwindcss and vuejs https://roots.io/sage/
Stars: ✭ 38 (+171.43%)
Mutual labels:  laravel-mix
CRUD-Laravel-Livewire-SPA
CRUD Laravel 7 & Livewire (SPA) Single Page Application
Stars: ✭ 34 (+142.86%)
Mutual labels:  laravel-mix
laravel-mix-tailwindcss-purgecss
Minimal Boilerplate for building static pages based on Laravel Mix 6, TailwindCSS 3, PostCSS 8, and ES6 Vanilla JS components.
Stars: ✭ 15 (+7.14%)
Mutual labels:  laravel-mix
laravel-react-boilerplate
Laravel React Boilerplate with Ant Design, Route-Level Code Splitting, Redux, Sanctum Auth
Stars: ✭ 49 (+250%)
Mutual labels:  laravel-mix
tailwind-preset
An awesome Tailwind CSS front-end preset for Laravel 7.
Stars: ✭ 31 (+121.43%)
Mutual labels:  laravel-mix
craft-boilerplate
Starter project for Craft CMS & Tailwind CSS Sites
Stars: ✭ 18 (+28.57%)
Mutual labels:  laravel-mix
Jigsaw
Simple static sites with Laravel’s Blade.
Stars: ✭ 1,823 (+12921.43%)
Mutual labels:  jigsaw
jigsaw-blog-template
Starter template for a blog, using Jigsaw by Tighten
Stars: ✭ 75 (+435.71%)
Mutual labels:  jigsaw
asset-mix
Provides helpers functions for CakePHP to use Laravel Mix.
Stars: ✭ 27 (+92.86%)
Mutual labels:  laravel-mix
stock-management
platform to manage stock operations built with laravel5 and VueJs2
Stars: ✭ 23 (+64.29%)
Mutual labels:  laravel-mix
craft-plugin-mix
Helper plugin for Laravel Mix in Craft CMS templates
Stars: ✭ 50 (+257.14%)
Mutual labels:  laravel-mix
envoyer-npm-deployment
Compile assets that depend on node packages using Laravel Envoyer deployment hooks
Stars: ✭ 43 (+207.14%)
Mutual labels:  laravel-mix

Jigsaw plugin for Laravel Mix

MIT License Latest Stable Version Total Downloads

laravel-mix-jigsaw is a Laravel Mix plugin for the Jigsaw static site generator. It watches your Jigsaw site's files and triggers a new Mix build when it detects changes.

const mix = require('laravel-mix');
require('laravel-mix-jigsaw');

mix.jigsaw()
    .js('source/_assets/js/main.js', 'js')
    .css('source/_assets/css/main.css', 'css')
    .version();

Installation

npm install -D laravel-mix-jigsaw

Usage

Require the module in your webpack.mix.js file.

const mix = require('laravel-mix');
require('laravel-mix-jigsaw');

Enable the build tasks by calling .jigsaw() anywhere in your Mix build chain.

mix.js('source/_assets/js/main.js', 'js')
    .css('source/_assets/css/main.css', 'css')
    .jigsaw();

By default this plugin watches common Jigsaw file paths and triggers a new build when it detects changes. To add watched paths or override the watcher configuration, pass a config object to .jigsaw():

// Add additional file paths to watch
mix.jigsaw({
    watch: ['config.*.php'],
});

// Override the default config
mix.jigsaw({
    watch: {
        files: ['source/posts/*.blade.php'],
        notDirs: ['source/_assets/', 'source/assets/', 'source/ignore/'],
    },
});

If you use Laravel Mix's built-in BrowserSync integration, you may need to configure it to watch Jigsaw's paths:

mix.jigsaw()
    .browserSync({
        server: 'build_local',
        files: ['build_*/**'],
    });

Caveats

  • The plugin cannot detect the creation of new files immediately inside the source/ directory of your site. If you create a new file like source/home.blade.php, you'll need to stop and restart Mix.
  • With v1 of the plugin it was possible to add additional Webpack plugins/tasks that would run after the Jigsaw build but before Mix finished compiling assets. This created compatibility issues between this plugin and Mix itself, and was removed in v2. If you need to perform additional processing after your Jigsaw site is built, like minifying its HTML, you can do so using a Jigsaw event listener.

Credits

Huge thanks to Brandon Nifong for creating the initial version of this plugin!

License

Laravel Mix Jigsaw is provided under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].