GithubHelp home page GithubHelp logo

chasegiunta / craft-vue-tailwind Goto Github PK

View Code? Open in Web Editor NEW
78.0 78.0 29.0 277 KB

Fork of craft-vue template that integrates the Tailwind CSS utility framework & removes unused CSS with Purgecss.

License: The Unlicense

JavaScript 28.01% PHP 47.41% Batchfile 2.23% CSS 2.89% Vue 9.47% Shell 4.87% Twig 5.11%

craft-vue-tailwind's People

Contributors

angrybrad avatar benjamindavid avatar brandonkelly avatar carlcs avatar chasegiunta avatar cromwellryan avatar dependabot-preview[bot] avatar geenious avatar jasonmccallister avatar mildlygeeky avatar slebbo avatar tam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

craft-vue-tailwind's Issues

Unable to add object to `window` after 3.0.0 upgrade

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?

HMR not working on new install?

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.