![]() ![]() By default, Forge generates source/assets/stylesheets/.įorge supports both the Sass (.sass) and SCSS (.scss) syntax - just change the extension to if you prefer Sass syntax. Stylesheets in Forge use Sass or LESS, languages that make stylesheet development quicker and easier. If you want to stick with plain CSS and JavaScript, you can do that as well.Īssets fall into 3 categories: Stylesheets, JavaScript, and Images. You may use CoffeeScript, Sass, LESS, and Sprockets. 3.1 AssetsĪssets are your JavaScript, CSS, and image files. The source directory is made up of 4 sections: Assets, Templates, Functions, and Includes. As we explain how Forge works, we’ll be referring to the final_theme directory, which represents the "compiled" theme. When you run forge watch, forge build, or forge package the underlying process is the same - Forge compiles the source directory into a working theme. All of your development work takes place in the source directory of that project. Running forge create generates a skeleton project for developing your theme. To name the zip file, run forge package your_name and the theme will be compiled to package/your_name.zip. 2.5 forge package forge packageĬompiles the theme and zips it to package/your_theme.zip. If you want to build somewhere other than build, you can specify the directory by running forge build my_build_directory.įorge build is useful if you want to review Forge's output before releasing your theme. 2.4 forge build forge buildĬompiles the theme from the source directory into the build directory. forge/build), which should be linked to your WordPress installation after running forge link.įorge watch is where the magic happens - you need to leave forge watch running while working on your project.įor a more detailed explanation of what happens during forge watch, check out how Forge works. Watches the source directory in your project for changes and compiles those changes in the Forge build directory (. You'll need to run forge link once for every WordPress install you want to test your theme with. forge/build /path/to/wordpress_install/wp-content/themes/your_theme After running forge link, any changes you make while running forge watch will be reflected in your WordPress installation.įorge link is just a convenient way to run ln -s. 2.2 forge link forge link /wordpress/wp-content/themes/your_themeĬreates a symbolic link from /path/to/wordpress_install/wp-content/themes/your_theme to the hidden Forge build directory (. See how Forge works for a detailed explanation of how a Forge project is structured. Forge also generates a few standard WordPress templates and adds some example Sass / CSS. 2.1 forge create forge create your_themeĬreates the your_theme directory if it doesn't exist, and sets up a new Forge project in that directory.Ī new Forge project contains directories for your assets, templates, functions and includes. Forge comes with a handful of commands that help make theme development easy. ![]()
0 Comments
Leave a Reply. |