chasegiunta / craft-vue-tailwind Goto Github PK
View Code? Open in Web Editor NEWFork of craft-vue template that integrates the Tailwind CSS utility framework & removes unused CSS with Purgecss.
License: The Unlicense
Fork of craft-vue template that integrates the Tailwind CSS utility framework & removes unused CSS with Purgecss.
License: The Unlicense
I synced my fork with the 3.0.0 release and I have everything working now, I think, except this last part.
In my base template I have a twig object with some Craft info that I then json encode and put into a Craft
object on window
so I can get things like the csrf Token:
{% set jsCraft = {
apiUrl: alias('@web') ~ '/api',
baseUrl: alias('@web'),
csrfTokenName: craft.app.config.general.csrfTokenName,
csrfToken: craft.app.request.csrfToken
} %}
<script type="text/javascript">
window.Craft = {{ jsCraft|json_encode|raw }};
</script>
But Craft
never gets added to window
. It keeps coming up as undefined
. Is there something obvious that I've missed that's new in 3.0.0 that might make this no longer work for some reason? Or maybe there's a better way to do this now?
In the twigpack config file, both legacy and modern manifest files are defined. But I haven't figured out how to output them both with this setup, I just get either or when changing the VUE_CLI_MODERN_MODE
environment variable.
Hiya. I did a new install of craft-vue-tailwind
and followed the setup instructions (installed AssetRev, ran npm install (with latest node and npm versions), initialized tailwind, added the shadowLookup experiment to tailwind's conf file, and the site loads correctly after running npm run dev
. Before getting started I also made sure I had the latest @vue/cli
installed and uninstalled any old vue-cli
versions.
However, with the dev
script still running, if I make a change to a Vue component or to app.css
the script informs me of the change correctly, but the page doesn't "refresh" itself.
Was there a step I missed along the way?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.