Code Monkey home page Code Monkey logo

craftcms-webpack-foundation's Introduction

Webpack build process for Craft CMS

Using Laravel Mix & Foundation


ย 

Step 1 - Install / Setup Craft CMS (like normal)

  • Install Craft CMS

    • Run composer create-project craftcms/craft <PROJECT_NAME>
  • Setup Craft CMS

    • Once composer has installed the project cd <PROJECT_NAME>
    • Create a new database in your local environment before running ./craft setup
    • Run ./craft setup and follow the prompts.

This step is a normal Craft CMS install / setup. For more detailed instructions or if your having problems, refer to there docs:

Craft CMS 3 Docs


Step 2 - Download this repo

  • Download this Repo
    • We're going to download the zip of this repo rather than clone it because we're going to move it into the existing Craft CMS project folder we just created.
    • After downloading this repo extract it and move the folder's contents into the Craft CMS project that you just created. It will ask you if you want to override the existing templates directory, answer yes to this.

Step 3 - Install dependencies

  • From the root of your Craft CMS project, run yarn or if you don't have yarn, run npm install.
  • Now to compile run either yarn run watch or npm run watch

Step 4 - BrowserSync

  • To have your code auto refresh in the browser on save, be sure to add :3000 to your base URL when viewing the front-end of your site.

Other Info

  • /templates now contains a very basic layouts/app.twig and index.twig to start from.

  • Your site's CSS/JS assets will be compiled to /web/assets/dist/

  • Custom Javascript to be written in /src/js/site.js

  • Custom SCSS to be written in /src/scss/ use main.scss to import other scss files you create.

craftcms-webpack-foundation's People

Contributors

speakincode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.