Download the PHP package batch/craft-starter without Composer

On this page you can find all versions of the php package batch/craft-starter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package craft-starter

Contributors Forks Stargazers Issues MIT License


Batch logo

Batch Craft Starter

An opinionated Craft CMS project starter that integrates Vue.js, Tailwind CSS and Docksal configuration.
Explore the docs »

Report Bug · Request Feature

Table of Contents

About The Project

The idea behind this project was to create a Craft CMS starter that allows us to get up and running and developing on projects quickly.

This starter comes set up, ready for for development with:

Built With

Getting Started

To create a new project using this starter, follow the below steps.

Prerequisites

In order to use the this starter, you'll need to have Docksal up and running. You can find instructions at https://docksal.io/.

Installation

Create a new project via composer

Replace 'myproject' with the desired project directory name.

Note: We recommend using Docksal's fin rc and fin exec commands, which will execute the commands on a standalone 'cli' container mapped to the current directory. This ensures the commands will run even if Composer or NPM are not installed locally.

The --remove-vcs flag will removes the batch/craft git metadata so this will be ready for use in a project repository.

Run the installer

We include an installer script that will finish setting up your project:

fin batch/install

After executing this and following the prompts your project should be available at the configured domain, and you should see a demo page to confirm.

This command sets up SSL certificates using mkcert, runs the Craft installer, installs the Twigpack plugin and npm dependencies and performs an initial build of the frontend assets. If you wish to do these steps manually, see the instructions below.

Manual installation

  1. Generate an SSL certificate. We recommend using the mkcert global addon which can be installed with: fin addon install --global mkcert

  2. Start up the Docksal container

  3. Install Craft via the CLI

  4. Install the Twigpack plugin

  5. Install npm dependencies

  6. Build the asset files

That's it! Your new project should now be available at the configured domain and you should see a demo page to confirm.

Usage

Webpack / Build Tool

Install the depdendencies for the build tool

Production

Development

Run the development pipeline on the Docksal container. It will be available at webpack.{yourdomain}

Use the following commands to specifically generate a legacy or combined browser build during development

Build Configuration

Settings

The build settings in webpack.settings.js can be overridden at a project level by placing a webpack.settings.js file in the project root. This will be merged with the base webpack.settings.js file during build.

Example:

Webpack Config

Any custom Webpack config can be included by adding a webpack.config.js in the project root. This will be merged with the final Webpack config during build.

Example:

We have provided a set of defaults to alias the src/ paths and additional entry points.

Craft Plugins

Use the fin exec craft plugin/install command to install any additional plugins.

Twigpack is required, and installed by default. We also include the following common plugins in the composer.json dependencies:

Mixing Inline Scripts with Vue

On occasion we've found the need to run vanilla JS inline within a template (e.g. with Craft Commerce) and only run this code when our Vue app has mounted.

Our solution is to provide an event bus available at window.app that is instantiated within the head of the document via critical.js. To use the event bus, simply subscribe and publish to events like so:

Example: Subscribing to events

Example: Publishing events

The vue-mounted event is provided out of the box to hook into from your twig templates.

Testing

Frontend

The starter comes with Jest installed and configured, plus the Vue testing framework helper library. To run the test suite, you can use the command

fin exec npm run test.

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Project Link: https://github.com/batchnz/craft

Acknowledgements

Thanks to all the hard work by the teams behind the tools used in this project.


All versions of craft-starter with dependencies

PHP Build Version
Package Version
Requires craftcms/cms Version ^3.5.0
vlucas/phpdotenv Version ^3.4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package batch/craft-starter contains the following files

Loading the files please wait ....