Nothing fancy
- Alpine
- Jest
- Laravel Mix with LiveReload
Be sure to do a site wide search/replace for the following:
{author-name} - Example: Kevin Batdorf
{github-name} - Example: kevinbatdorf
{current-year} - Example: 2020
{package-title} - Example: The title of the package
{package-description} - Example: The summary
{package-slug} - Example: The full slug, like kevinbatdorf/alpine-plugin-template
{package-slug-short} - Example: alpine-plugin-template
TODO: Automate with an npm script like npm run setup or something
{package-description}
When to use?
<div x-data="{}">
</div>
function functionName() {
return {
foo: 'bar'
}
}
Include the following <script>
tag in the <head>
of your document (before Alpine):
<script src="https://cdn.jsdelivr.net/gh/{package-slug}@0.x.x/dist/index.js"></script>
If you wish to create your own bundle:
npm install {package-slug} --save
Then add the following to your script:
import '{package-slug-short}'
import 'alpinejs'
Copyright (c) {current-year} {author-name}
Licensed under the MIT license, see LICENSE.md for details.