wind

Dreary, drizzly Sunday with breezy southeast winds

Expect cloudy skies with sporadic rain showers for our Sunday. Breezy winds out of the south-southeast 10-20 mph. This week, temperatures will stay above the seasonal average, reaching the 50s.




wind

Election Day rain winds down this evening

A low-pressure system brings another soaking to much of Minnesota on Election Day.




wind

Temperatures cool slightly for Monday with breezy winds

Expect lingering cloud cover into Sunday night, with northwesterly winds picking up. A dry cold front will pass through, causing temperatures to dip slightly on Monday. After that, a pleasant warming trend is expected through the end of the work week.




wind

Wind chill is back; rain ahead Wednesday

It was frigid Tuesday morning across Minnesota. Our next rain arrives on Wednesday.




wind

UC Berkeley Wind Ensemble I, Dec. 7

Matthew Sadowski, conductorSafety The UC Berkeley Department of Music is committed to the health and safety of our students, staff, and patrons. Measures to protect concertgoers and musicians will be informed by state, local, and UC Berkeley Public Health policies and are subject to change. Social distancing, masks, and proof of COVID 19 vaccination may be required. UC Berkeley does not promise or guarantee that all patrons or employees on site are vaccinated. Unvaccinated individuals may be present as a result of exemptions, exceptions, fraudulent verification, or checker error. None of these precautions eliminate the risk of exposure to COVID-19. Accessibility If you require an accommodation for effective communication (ASL interpreting/CART captioning, alternative media formats, etc.) or information about campus mobility access features in order to fully participate in this event, please contact the Hertz Hall Manager at 510.642.4864 or hertzhallmgr@berkeley.edu. with as much advance notice as possible and at least 7-10 days in advance of the event. Facebook: @ucbmusicdept Instagram: @ucberkeleymusic Twitter @ucbmusicdept Youtube: Berkeley Music YouTube channel




wind

Corrupt Olympic Movement is breaking wind

The miracle did not happen. In the morning of February 9, the Court of Arbitration for Sport (CAS) announced that it was dismissing the appeals from 47 Russian athletes against the International Olympic Committee (IOC). The athletes were in a dispute regarding the decision of the IOC not to invite them to participate in the Games in Pyeongchang. The judges decided that there was nothing to abolish because the IOC did not apply sanctions against the Russians, but distributed gifts in the form of invitations instead. A nice game of words, behind which both the IOC and WADA with their dirty deeds could hide comfortably. The IOC firmly believed that only clean Russian athletes would be able to take part in the winter Olympics in Pyeongchang. However, we will see plenty of "unclean" athletes in South Korea, albeit from other countries. Suffice it to recall German biathlonist Denise Herrmann and Polish skier Poland Justyna Kowalczyk. Both of them had been caught in doping. Christopher Del Bosco of Canada will perform in ski-cross, even though his doping test showed traces of marijuana. The position of the IOC is two-faced and cynical, and its slogans about the purity of sports are needed for something else.Elite sports have been corrupt with doping for many years, and WADA would have been set up otherwise. Big sport events always mean big money involved. How easier is it for IOC and WADA officials to make champions of the people, who had their medals supported with a nice and special thank you from sponsors? Suspending competitors appears to be a great favour to do. Russia a convenient target for WADA and IOC Russia turned out to be a very convenient target. First off, Russian athletes would always win whole baskets of medals at all Olympic competitions. Secondly, Russia remains under the sanctions of Western countries, which means that no one will stand up for Russia, and we can see it with our own eyes. This is not conspiracy - this is plain business.Most importantly, one can never find the one who bears the blame. When WADA president Craig Reedie was asked whether he would like to leave his cozy office after CAS proved the innocence of the Russians, implying that WADA had soiled itself, Reedie simply said that WADA had nothing to do with it and shifted the blame for the IOC. Why is WADA so obsessed with Russian athletes only? Why not check athletes from other countries, the Norwegians, for example? Norwegians breaking doping rules The Norwegian Broadcasting Corporation (NRK), announced without any hesitation that the national team of Norway took bags of different medications for asthma to South Korea. In particular, it goes about more than 6,000 doses! There are sick athletes in other teams, but the Swedes, the Finns and the Germans hope to get by with a considerably lower amount of doses. Interestingly, journalists of Swedish SVT television channel established that since 1992, Norwegian asthmatic athletes had won every seven out of ten Olympic medals since 1992. In Russia, children with asthma are not allowed to sports training on the level of youth sports schools. It is hard to make champions out of sick children, whose lives depend on medications. One may assume that Norway has a different approach to children's sports, implicating that the Norwegians are good at bypassing anti-doping rules.At the end of last summer, Norwegian TV channel T2 aired a report, in which former skiers of the national team said that doctors had over-medicalised them with asthma medications for prophylactic purposes. It is an open secret that regular intake of such drugs contributes to muscle growth. Famous skier Martin Sundby will apparently be the first one, who will need many doses of asthma drugs in Pyeongchang. The Olympic medalist was taking the medicine for anabolic and fat burning effects.It has been 1.5 years since January 2015 till the time when Sundby was "punished" for his rampant craving for drugs. Yet, Sundby was taking medications, collecting the money and winning the medals and that his is probably proud of. He had to return some afterwards, but the most ridiculous part of the whole story is that it took CAS a whole winter to study Sundby's addiction, but the Court of Arbitration for Sport eventually suspended the Norwegian skier for two summer (!) months. How absurd is that?




wind

Pyongyang as seen through bus window

A curious video from Pyongyang has recently appeared on social media. The video was said to be made by Russian visitors who landed in Pyongyang in October. It is worthy of note that foreigners visiting the DPRK are required to follow a set of rules regulating their stay. In general, filming is allowed, but there are many nuances at this point. For example, there are strict rules for photographing portraits and monuments of the leaders. All such monuments and portraits must be photographed in their entirety. Photos depicting half of such installations or monuments are strictly prohibited. Filming local residents is not advisable either. Taking pictures and making videos of North Korean scenery and places of interest is free. Tourists may video anything they like — hills, buildings, cityscapes, etc.





wind

How to Connect AirPods to a Laptop (Windows and Mac)

Modern PCs and Macs use built-in Bluetooth to easily connect to your phone's AirPods. We'll show you how.




wind

How to Delete a Page in Word on Mac and Windows

Can't figure out how to delete an entire page in Word? It's easy. We'll show you how.




wind

How to Get Rid of a Virus on a Windows PC

To remove a computer virus, you first need to know if you actually have a virus. Then, take a look at these steps on how to remove a computer virus.





wind

A correction procedure for secondary scattering contributions from windows in small-angle X-ray scattering and ultra-small-angle X-ray scattering

This article describes a correction procedure for the removal of indirect background contributions to measured small-angle X-ray scattering patterns. The high scattering power of a sample in the ultra-small-angle region may serve as a secondary source for a window placed in front of the detector. The resulting secondary scattering appears as a sample-dependent background in the measured pattern that cannot be directly subtracted. This is an intricate problem in measurements at ultra-low angles, which can significantly reduce the useful dynamic range of detection. Two different procedures are presented to retrieve the real scattering profile of the sample.





wind

Biden Administration Strikes Deal To Bring Offshore Wind To California

The Biden administration is opening the West Coast to offshore wind. Companies have largely focused on the East Coast, like this wind farm off Block Island, Rhode Island.; Credit: Don Emmert/AFP via Getty Images

Lauren Sommer | NPR

Updated May 25, 2021 at 2:56 PM ET

The Biden administration plans to open the California coast to offshore wind development, ending a long-running stalemate with the Department of Defense that has been the biggest barrier to building wind power along the Pacific Coast.

The move adds momentum to the administration's goal of reaching 100% carbon-free electricity by 2035, coming just weeks after the country's first large-scale offshore wind farm was approved off the coast of New England. Today, the country has just a handful of offshore wind turbines in the Atlantic Ocean, with around a dozen wind farms being developed in federal waters off the East Coast.

"It's an announcement that will set the stage for the long term development of clean energy and the growth of a brand new made-in-America industry," says national climate adviser Gina McCarthy. "Now we're thinking big and thinking bold."

The agreement identifies two sites off Central and Northern California with the potential to install massive floating wind turbines that could produce 4.6 gigawatts of electricity, enough to power 1.6 million homes.

Interest in offshore wind on the West Coast has grown for years, especially with California's own ambitious goal to cut greenhouse gas emissions. The deep waters off the coast have the potential to produce a significant amount of energy.

But the Defense Department has largely objected to the idea, since the Navy and Air Force use the area for training and testing operations. In response to the growing interest, the Navy released a map in 2017 putting large swaths of California waters off limits.

In 2018, the federal Bureau of Ocean Energy Management solicited interest from wind developers. But negotiations with the Department of Defense have been slow going ever since, effectively blocking wind development off California.

Tuesday's announcement outlines a compromise for a 399-square-mile area off Morro Bay, a site that's appealing to renewable energy companies because of existing transmission lines nearby that once service a retired power plant. It also identifies a location off Humboldt County in Northern California.

"It's our view that the world faces a grave and growing climate crisis," says Dr. Colin Kahl, undersecretary of defense for policy. "Climate change is both a threat to the Department of Defense's operations around the world and an existential challenge to our ability to maintain resilience here at home."

Another key site, just offshore from the Diablo Canyon nuclear power plant, was not included in Tuesday's deal. California's last-remaining nuclear plant is scheduled to completely close by 2025, freeing up more potential transmission lines for offshore wind.

The Biden administration has set a goal of jump-starting the country's offshore wind sector with 30 gigawatts of projects by 2030. Those wind farms will foster tens of thousands of jobs, according to the White House, between renewable energy installers, manufacturers and steelworkers.

"This is a major breakthrough — a major advancement that will allow California to start planning for its carbon-free electricity goals with offshore wind firmly in the picture," says Nancy Rader of the California Wind Energy Association, who also pointed to the challenges. "Offshore wind development off the coast at Morro Bay and Humboldt will require a major port facility in each area to construct the floating platforms and assemble the turbines that will require continued proactive planning by the state and federal governments."

Still, the areas identified in the agreement may not be enough for hitting the administration's clean electricity goal, as well as California's. The state is planning to get 100% of its electricity from zero-emission sources by 2045. To reach that, renewable energy needs to triple statewide with offshore wind playing a key role, reaching 10 GW, according to a recent state analysis. Tuesday's deal could provide just half of that.

A potential lease auction for the offshore wind sites could be held in mid-2022. But the projects will still have to negotiate concerns about the potential impacts on California's fishing industry and shipping channels, as well as any environmental concerns about sensitive ecosystems.

"Far too many questions remain unanswered regarding potential impacts to marine life which is dependent on a healthy ecosystem," says Mike Conroy of the Pacific Coast Federation of Fishermen's Associations. "The fishing industry has been told these areas work best for offshore wind developers; but no one has asked us what areas would work best for us."

Copyright 2021 NPR. To see more, visit https://www.npr.org.

This content is from Southern California Public Radio. View the original story at SCPR.org.




wind

Offshore Wind Farms Can Interfere with Ship Radar and Navigation, Says New Report

A new report says wind turbine generators used in offshore wind farms can interfere with navigational radar used by ships to avoid collisions, posing challenges for safe maritime navigation.




wind

Westerly winds have blown across central Asia for at least 42 million years

The gusting westerly winds that dominate the climate in central Asia, setting the pattern of dryness and location of central Asian deserts, have blown mostly unchanged for 42 million years. A University of Washington geologist led a team that has discovered a surprising resilience to one of the world's dominant weather systems. The finding could help long-term climate forecasts, since it suggests these winds are likely to persist through radical climate shifts.

read more



  • Earth & Climate

wind

Experts anticipate significant continued reductions in wind energy costs

Technology advancements are expected to continue to drive down the cost of wind energy, according to a survey of the world's foremost wind power experts led by Lawrence Berkeley National Laboratory (Berkeley Lab). Experts anticipate cost reductions of 24%-30% by 2030 and 35%-41% by 2050, under a median or 'best guess' scenario, driven by bigger and more efficient turbines, lower capital and operating costs, and other advancements (see Figure 1).

read more



  • Physics & Chemistry

wind

New AI-enabled Outlook app to replace Mail, Calendar apps on Windows 11

On existing devices, users can switch to the new Outlook for Windows from a toggle in the Mail and Calendar applications.




wind

New tools assess the future of wind power

Using software tools developed by Near Zero, a research group hosted by the Carnegie Institution for Science's Department of Global Ecology, a team of researchers has completed the largest expert survey yet on any energy technology, in this case wind energy.

read more



  • Mathematics & Economics

wind

A long and winding road to ethanol reform

Last month, I had the opportunity to offer testimony in support of the Environmental Protection Agency (EPA) proposal to modestly scale back the amount of ethanol required to be produced under the Renewable Fuel Standard (RFS). 




wind

Atlantic Hurricane CENTER MIAMI FL AL182024 348 AM EST THU NOV 7 2024 .HURRICANE RAFAEL CAUTION...THIS PRODUCT ONLY APPROXIMATELY CONVEYS THE EXTENT OF Tropical Cyclone WIND AND SURGE WATCHES AND WARNINGS. PLEASE SEE THE LATEST PUBLIC Advisory FROM THE NA

 
 000
 WTNT83 KNHC 070848
 TCVAT3
 
 RAFAEL WATCH/WARNING ADVISORY NUMBER 15
 NWS NATIONAL HURRICANE CENTER MIAMI FL     AL182024
 348 AM EST THU NOV 7 2024
 
 .HURRICANE RAFAEL
 
 CAUTION...THIS PRODUCT ONLY APPROXIMATELY CONVEYS THE EXTENT OF
 TROPICAL CYCLONE WIND AND SURGE WATCHES AND WARNINGS. PLEASE SEE
 THE LATEST PUBLIC ADVISORY FROM THE NATIONAL HURRICANE CENTER FOR
 THE PRECISE LATERAL EXTENT OF WIND WATCHES AND WARNINGS ALONG THE
 COAST...AS WELL AS THE APPROXIMATE LATERAL EXTENT OF SURGE WATCHES
 AND WARNINGS. THE PRECISE EXTENT OF SURGE WATCHES AND WARNINGS
 CAN BE FOUND IN THE NWS NATIONAL DIGITAL FORECAST DATABASE HAZARD
 GRIDS.
 
 FLZ077-078-071000-
 /O.CAN.KNHC.TR.W.1018.000000T0000Z-000000T0000Z/
 348 AM EST THU NOV 7 2024
 
 $$
 
 ATTN...WFO...KEY...
 




wind

Eastern Pacific Hurricane CENTER MIAMI FL EP092023 207 AM PDT MON AUG 21 2023 .Post-Tropical Cyclone HILARY CAUTION...THIS PRODUCT ONLY APPROXIMATELY CONVEYS THE EXTENT OF TROPICAL Cyclone WIND AND SURGE WATCHES AND WARNINGS. PLEASE SEE THE LATEST PUBLIC

 
 000
 WTPZ84 KNHC 210907
 TCVEP4
 
 HILARY WATCH/WARNING ADVISORY NUMBER 20
 NWS NATIONAL HURRICANE CENTER MIAMI FL     EP092023
 207 AM PDT MON AUG 21 2023
 
 .POST-TROPICAL CYCLONE HILARY
 
 CAUTION...THIS PRODUCT ONLY APPROXIMATELY CONVEYS THE EXTENT OF
 TROPICAL CYCLONE WIND AND SURGE WATCHES AND WARNINGS. PLEASE SEE
 THE LATEST PUBLIC ADVISORY FROM THE NATIONAL HURRICANE CENTER FOR
 THE PRECISE LATERAL EXTENT OF WIND WATCHES AND WARNINGS ALONG THE
 COAST...AS WELL AS THE APPROXIMATE LATERAL EXTENT OF SURGE WATCHES
 AND WARNINGS. THE PRECISE EXTENT OF SURGE WATCHES AND WARNINGS
 CAN BE FOUND IN THE NWS NATIONAL DIGITAL FORECAST DATABASE HAZARD
 GRIDS.
 
 CAZ043-048-050-055>058-060>062-065-087-088-358-362-366>383-548-552-
 554-211015-
 /O.CAN.KNHC.TR.W.2009.000000T0000Z-000000T0000Z/
 207 AM PDT MON AUG 21 2023
 
 $$
 
 ATTN...WFO...LOX...SGX...
 




wind

Dan Holohan: Why Congress has no windows

People who knew Capt. Montgomery C. Meigs said he was occasionally pompous, but when the job was done to his satisfaction, he said, “This was the most difficult piece of engineering and construction that I have yet to undertake.”




wind

Pressed Unwind Tonic, Calm Shot

Pressed Juicery introduced a new line of adaptogenic juices, expanding its portfolio into this growing category.




wind

"Windows Beyond an Old Adobe"

Chronicles a Family's Legacy and Resilience in Captivating Autobiography by Chris William Palomares




wind

Community Public Adjusters shares 5 Wind and Rain Property Tips to Minimize Damage

Here a 5 ways to minimize wind and rain damage to your property.




wind

High Software Prices Got You Down? Get Office 2021 And Windows For Unbeatable Prices On Microsoftwares

Budget-Friendly Software Solutions: Office 2021 and Windows on Sale at Microsoftwares




wind

Clear Choice Windows and More, Inc., Suncoast Florida's Leading Impact Window & Door Company, Celebrates Their 20th Year in Business!

As an A+ Rated business by the Better Business Bureau, Clear Choice Windows is dedicated to serving customers in Hillsborough, Pasco & Pinellas Counties in Florida.




wind

Central Texans Can Ward Off Outdoor Allergen Exposure Thanks to BMT AllergyGuard® Window Shields.

Skinner's Custom Screens Doors & Windows is thrilled to launch the new allergy and virus screens to both the public and private sectors of Georgetown Texas and throughout Central Texas.




wind

Concurrency, Inc. Achieves Microsoft Windows Virtual Desktop Specialization, Setting New Standards in Cloud Expertise

Achieving this Specialization is a milestone for Concurrency, showcasing dedication to innovation. It opens doors for future projects, welcomes new clients, and enhances Mergers and Acquisitions services, streamlining processes for exceptional value.




wind

n-tech Research Releases Preview of Upcoming Smart Windows Report Scheduled for April 2021 Release

n-tech believes smart windows still represent a business opportunity but as part of a smart buildings play and with different drivers than in the past.




wind

Rolling Around, Merge Windows, and Merge Walls are Available for Free in the Apple App Store

Announcing the latest releases of three challenging and fun video games written by Brian Giedt this year.




wind

MyConverters Released Its First Version Software for Both Windows and Mac Users on July 5th: Best Video Service for Streaming Sites

MyConverters is available for Windows and Mac users to serve the rich and exclusive content from regional and leading OTT giants such as Amazon Prime, Netflix, Hulu, and Disney +. Its top-notch high-resolution audio-video output is extraordinary.




wind

Go Coreless - Supply55 and NEPATA release the new UA770 30" Coreless Rewinder/Trimmer

Reduce converting operating expenses with the UA770 Coreless Rewinder, eliminate cores, increase production capacity.




wind

Windland Design Celebrates 4-Year Milestone and Expands Luxury Style into the Des Moines Market

Setting a New Standard of Luxury in Des Moines Interior Design




wind

Revitalize Your Home with Expert Window Screen Repair Services in Los Angeles

Screen Master Door & Window Offers Unmatched Window Screen Repair Solutions for Los Angeles Residents




wind

Signature Glass Expands to Offer Residential Window and Door Replacement Services

Leading Commercial Glass Company in Salinas Now Offers Residential Solutions Across California's Central Coast




wind

Unwind and Rejuvenate with Brazilian Silhouette's Comprehensive Spa Services in Fort Myers, FL

Let the Expertise of Skilled Spa and Massage Therapists Guide You Through a Relaxing and Rejuvenating Journey, Featuring Services such as Deep Tissue Massage Therapy, Microblading, Facials, and More.




wind

MoniVisor Unveils a New Update for Windows Real-Time Screen Monitoring

Remotely monitor PC usage in real-time from any online device with MoniVisor, ClevGuard's top-notch Windows monitoring software




wind

Bandicam Screen Recorder 7.0: Record a Specific window With Precision in Major Update

Users can now select and record any specific window while multitasking with multiple programs.




wind

Windsong Communications Expands with igolgi XScale

XScale enables up to 24 channels from a single ATSC 1.0 encoder




wind

American Windsong Music presents singer-songwriter Dallen Fox's "Silly Songs and Lullabies." Dallen's second EP collection of charming and endearing children's songs

American Windsong Music is proud to release Dallen Fox's second EP, "Silly Songs & Lullabies".The multifaceted talent is back with a sequel to his musical journey that promises to touch the hearts of children everywhere.




wind

A New Era of Luxury: Windsor Jewelers Expands and Announces Liquidation Sale

It is with great excitement that Windsor Jewelers announces the expansion of their Winston-Salem jewelry store and a liquidation event starting Friday, March 8th!




wind

American Windsong Music releases The Best of Ken Lehnig, a compilation of fifteen chart-topping songs from Ken's six solo albums

If you have never heard singer, songwriter, multi-instrumentalist, arranger, and producer Ken Lehnig's music this album will make you a fan.




wind

Windes Highlights the Challenges and Solutions for Multi-Entity Accounting Consolidation

Organizations can streamline the multi-entity accounting consolidation process with the right tools and strategies. Learn more in this article.




wind

Keep Up with the Fabulous Events this June at Windsor Jewelers

Multiple incredible events are happening throughout June in the Winston-Salem and Charlotte locations of Windsor Jewelers




wind

5 Practical Options Before 2025 if Your Windows 10 PC Can’t Run Windows 11

Her, we’ll break down five practical choices you have, from simple workarounds to fresh upgrades, to keep your computer running safely and smoothly after the deadline.




wind

How we use DDEV, Vite and Tailwind with Craft CMS

In 2022 we changed our dev tooling for new Craft CMS projects. Goodbye complex esoteric Webpack configuration, hello Vite. Goodbye complex esoteric Docker Compose configuration, hello DDEV. This small change in tooling has completely transformed our development experience. We start work faster and avoid wasting billable time debugging Webpack and Docker.

From Webpack to Vite #

Webpack has been the defacto way of bundling JavaScript and front end assets. It’s a powerful tool… but with that great power comes great responsibility complexity.

Vite bills itself as the “next generation” of frontend tooling. Vite is much faster at bundling. But more importantly… its default configurations work great for most website projects.

Before (Webpack) #

Well over 300 lines of configuration spanning three files. Good luck making changes!

After (Vite) #

A crisp 30 - 50 lines of code. Want to switch to TypeScript? Need to drop in a popular front-end framework? Easy! All it takes is adding a plugin and 2-3 lines of config.

Deleting old code has never felt this good!

From Docker to DDEV #

Docker is another development staple. It isolates server infrastructure into virtual “containers.” This helps avoid issues that arise from each developer having a slightly different setup. However, Docker can have a learning curve. Config changes, PHP upgrades and unexpected issues often eat up precious project time.

Enter DDEV! DDEV describes itself as “Container superpowers with zero required Docker skills: environments in minutes, multiple concurrent projects, and less time to deployment.” We’ve found that statement to be 100% true.

Before (Docker) #

Every Craft project has a different Docker config. Bugs and upgrades required deep Docker experience. Last (but not least), it was difficult to run several projects at one time (ports often conflict).

After (DDEV) #

Performance is consistently better than our hand-rolled setup thanks to Mutagen and faster DB import/exports. Simultaneous projects run out of the box. DDEV provides (and maintains) a growing list of helpful shortcuts and DX features.

Getting started #

Ready to make the switch? Here’s how to set up DDEV, Vite and Tailwind on your own Craft project.

Show me the config files already! #

If you would rather see full config files instead of following step by step, check out our Craft Site Starter on GitHub.

DDEV #

Let’s set up a fresh DDEV project and start customizing.

  1. Make sure you have DDEV installed on your computer.
  2. If you’re a PHPStorm user, install the exceedingly helpful DDEV plugin. VS Code users have a similar plugin too!
  3. Follow Craft’s guide for creating a new project (they love DDEV too).

Now you have a fresh .ddev/config.yaml just waiting to be customized.

Node Version #

Open your DDEV config and make sure your Node JS version matches Vite’s recommendations.

nodejs_version: '20' # Vite 5 expects Node 18+

Ports for Vite’s dev server #

Next, expose ports that Vite’s dev server uses will use to serve assets.

web_extra_exposed_ports:
  - name: vite
    container_port: 3000
    http_port: 3000
    https_port: 3001

Routing ports can sometimes be confusing. This diagram might help!

  • Vite’s dev server runs inside of DDEV’s web container (a Docker container).
  • Until we expose these extra ports, any custom port within DDEV is unavailable to your host machine (your computer).
  • When it’s time to configure Vite, we’ll use port 3000
  • HTTP and HTTPS traffic must use separate ports.
  • We use port 3000 for http traffic and 3001 for https

Run Vite automatically #

Usually, you’ll want Vite to watch and build files automatically after you start a DDEV project. Using web_extra_daemons adds a separate background process (daemon) for Vite.

web_extra_daemons:
  # Run Vite in a separate process
  - name: 'vite'
    command: 'npm install && npm run dev'
    directory: /var/www/html

Use hooks to improve DX #

DDEV’s powerful hooks system can run tasks before or after various DDEV commands. These post-start tasks keep dependencies and schemas up to date every time you start DDEV.

hooks:
  post-start:
    - composer: install # Keeps installed packages up to date
    - exec: ./craft up # Apply migrations & project config changes

Time for Vite #

Vite is a Node app that’s installed with NPM. Your project will need a package.json. If you don’t have one set up yet, follow NPMs initialization script.

ddev npm init

# Don't forget to ignore node_modules!
echo node_modules >> .gitignore

????Why ddev at the start of the command? This let’s us run NPM from within DDEV’s Docker containers. This means you’ll always be using the Node version configured for this project. DDEV has a bunch of shortcuts and aliases for running CLI commands (such as npm, yarn, craft and composer).

Make sure your NPM package is configured for ES Modules #

Our various config files will be using ES Module syntax for imports and exports.

ddev npm pkg set type=module

Install Vite! #

ddev npm install --save-dev vite

Add convenience scripts to package.json #

"scripts": {
  "dev": "vite",
  "build": "vite build"
}

npm run dev runs Vite in dev mode. It watches and builds your files every save. Files are served through Vite’s dev server.

npm run build bundles your JavaScript, CSS and static images for production. Your deploy process will usually call this script.

Configure vite.config.js #

Running Vite for a server rendered CMS requires some extra configuration. These options put production files in the right spot and keeps Vite’s dev server running on a specific port.

import { defineConfig, loadEnv } from 'vite'

// Match ports in .ddev/config.yaml and config/vite.php
const HTTP_PORT = 3000
const HTTPS_PORT = 3001

export default defineConfig(({ command, mode }) => {
  const env = loadEnv(mode, process.cwd(), '')

  return {
    // In dev mode, we serve assets at the root of https://my.ddev.site:3000
    // In production, files live in the /dist directory
    base: command === 'serve' ? '' : '/dist/',
    build: {
      manifest: true,
      // Where your production files end up
      outDir: './web/dist/',
      rollupOptions: {
        input: {
          // The entry point for Vite, we'll create this file soon
          app: 'src/js/app.js',
        },
      },
    },
    server: {
	    // Special address that respond to all network requests
      host: '0.0.0.0',
	    // Use a strict port because we have to hard code this in vite.php
      strictPort: true,
      // This is the port running "inside" the Web container
      // It's the same as continer_port in .ddev/config.yaml
      port: HTTP_PORT,
      // Setting a specific origin ensures that your fonts & images load
      // correctly. Assumes you're accessing the front-end over https
      origin: env.PRIMARY_SITE_URL + ':' + HTTPS_PORT,
    },
  }
})

Add JavaScript and CSS files (Entrypoint) #

Vite needs an entry point to determine what JavaScript, CSS and Front End assets it needs to compile. Remember src/js/app.js that we defined in vite.config.js? Let's make that file now.

/* Make a file in src/js/app.js */

import '../css/app.css'

console.log('Hello Craft CMS')

We’ll also add our CSS as an import in app.js . In plain-old-JavaScript you can’t import CSS files. However, Vite uses this to figure out CSS dependencies for the project.

Once Vite builds everything for production, you end up with a separate CSS file. The Craft Vite plugin includes this automatically with along your JavaScript bundle.

/* Make a file in src/css/app.css */

body {
	background-color: peachpuff;
}

Install the Vite Craft Plugin #

ddev composer require nystudio107/craft-vite
ddev craft plugin/install vite

Vite assets have different URLs in dev mode vs. production. In dev mode, assets are served from Vite’s dev server. It uses the ports that we defined in our DDEV & Vite configs.

When Vite builds for production, filenames are hashed (app.js becomes app-BZi_KJSq.js). These hashes change when the contents of the file changes. Browser can cache these files indefinitely. When an asset changes, a whole new file is served.

To help find these hashed filenames, Vite creates a manifest.json file. The manifest associates the name of your asset src/js/app.js to the hashed file that ends up on your server web/dist/assets/app-BZi_KJSq.js

The Craft Vite Plugin by NYStudio107 takes care of all this routing for you.

{
  "src/js/app.js": {
    "file": "assets/app-BZi_KJSq.js",
    "name": "app",
    "src": "src/js/app.js",
    "isEntry": true,
    "css": ["assets/app-BXePGY5I.css"]
  }
}

Configure the Vite Craft Plugin #

Make a new plugin config file in config/vite.php

<?php

use crafthelpersApp;

// Use the current host for dev server requests. Otherwise fall back to the primary site.
$host = Craft::$app->getRequest()->getIsConsoleRequest()
    ? App::env('PRIMARY_SITE_URL')
    : Craft::$app->getRequest()->getHostInfo();

return [
    'devServerPublic' => "$host:3001", // Matches https_port in .ddev/config.yaml
    'serverPublic' => '/dist/',
    'useDevServer' => App::env('CRAFT_ENVIRONMENT') === 'dev',
    'manifestPath' => '@webroot/dist/.vite/manifest.json',
    // Optional if using React or Preact
    // 'includeReactRefreshShim' => true,
];

Include your Vite bundles in Twig #

The script and asset functions includes the appropriate files depending on in if you’re in dev mode or production. Clear out your templates/index.twig file and add the following snippet to your <head> tag.

{# Load our main CSS file in dev mode to avoid FOUC #}
{% if craft.vite.devServerRunning() %}
    <link rel="stylesheet" href="{{ craft.vite.asset("src/css/app.css") }}">
{% endif %}

{{ craft.vite.script('src/js/app.js', false) }}

Whew! ???? We’re at a point now where we can test our integration. Run ddev restart and then ddev launch . You should see “Hello Craft CMS” in your browser console.


Setup Tailwind #

Now that Vite is processing src/css/app.css, it’s time to install Tailwind and really get cooking.

These steps are based on Tailwind’s official installation guide. But make sure to run all commands from within DDEV.

Install packages #

ddev npm install -D tailwindcss postcss cssnano autoprefixer
# No DDEV shortcut for npx :(
ddev exec npx tailwindcss init -p

Configure template paths in tailwind.config.js #

/** @type {import('tailwindcss').Config} */
export default {
	// Watch Twig templates and any JS or JSX that might use Tailwind classes.
  content: ['./templates/**/*.twig', './src/**/*.{js,jsx,ts,tsx,svg}'],
  theme: {
    extend: {},
  },
  plugins: [],
}

Configure postcss.config.js for production #

export default {
  plugins: {
    tailwindcss: {},
    autoprefixer: {},
    ...(process.env.NODE_ENV === 'production' ? { cssnano: {} } : {})
  }
}

Add Tailwind directives to src/css/app.css #

@tailwind base;
@tailwind components;
@tailwind utilities;

You’ll most likely need to run ddev restart again to get Vite to recognize your new Tailwind config.


❓ Do i need to set up live reload of Twig? Turns out it’s already done for you! Styling a Tailwind project means editing Twig files to change styles. It’s super handy to reload your browser every time you save. Normally you’d reach for vite-plugin-restart to get this functionality. However, Tailwind’s JIT mode automatically notifies Vite when CSS has compiled and the page should reload.

That's a wrap! #

That’s all it takes to configure a minimal DDEV and Vite project! We’ve found that both of these tools are easy to extend as a project get more complo'ex. Adding things like Redis or React are just a plugin install and a few lines of config away.

???? If you'd like to see this setup (and more) in a real-world Craft CMS project, check out our Craft Site Starter on GitHub.

Go forth and Vite + DDEV to your heart’s desire.




wind

RIP a Livecast #654 – Excessive Wind-Breaking

We kick things off by discussing our new Twitch channel. We review Alex Skolnick's new rap video about the Capitol riots. We discuss the new Fresh Prince of Bel-Air reboot. […]



  • RIP a Livecast