Skip to content

codenamesrk/WP-Starter

Repository files navigation

WP Starter

A wordpress starter-theme forked from FoundationPress and modified to suit our internal needs.

Requirements

This project requires Node.js v4.x.x to v6.9.x to be installed on your machine. Please be aware that you will most likely encounter problems with the installation if you are using v7.1.0 with all the latest features.

FoundationPress uses Sass (CSS with superpowers). In short, Sass is a CSS pre-processor that allows you to write styles more effectively and tidy.

The Sass is compiled using libsass, which requires the GCC to be installed on your machine. Windows users can install it through MinGW, and Mac users can install it through the Xcode Command-line Tools.

Quickstart

1. Clone the repository and install with npm

$ cd my-wordpress-folder/wp-content/themes/
$ git clone https://github.com/codenamesrk/WP-Starter.git
$ cd WP-Starter
$ npm install

2. While you're working on your project, run:

$ npm run watch

If you want to take advantage of browser-sync (automatic browser refresh when a file is saved), simply open your Gulpfile.js and put your local dev-server address (e.g localhost) in this field var URL = ''; , save the Gulpfile and run

$ npm run watch

3. For building all the assets, run:

$ npm run build

Build all assets minified and without sourcemaps:

$ npm run production

4. To create a .zip file of your theme, run:

$ npm run package

Running this command will build and minify the theme's assets and place a .zip archive of the theme in the packaged directory. This excludes the developer files/directories from your theme like node_modules, assets/components, etc. to keep the theme lightweight for transferring the theme to a staging or production server.

Styles

  • style.css: Do not worry about this file. (For some reason) it's required by WordPress. All styling are handled in the Sass files described below

  • assets/scss/foundation.scss: Make imports for all your styles here

  • assets/scss/global/*.scss: Global settings

  • assets/scss/components/*.scss: Buttons etc.

  • assets/scss/modules/*.scss: Topbar, footer etc.

  • assets/scss/templates/*.scss: Page template spesific styling

Please note that you must run npm run build or npm run watch in your terminal for the styles to be copied and concatenated. See the Gulpfile.js for details

Scripts

  • assets/javascript/custom: This is the folder where you put all your custom scripts. Every .js file you put in this directory will be minified and concatenated one single .js file. (This is good for site speed and performance)

The main styles and scripts generated by the build

Version control on these files are turned off because they are automatically generated as part of the build process.

  • assets/stylesheets/foundation.css: All Sass files are minified and compiled to this file

  • assets/stylesheets/foundation.css.map: CSS source maps

  • assets/javascript/vendor: Vendor scripts are copied from assets/components/ to this directory. We use this path for enqueing the vendor scripts in WordPress.

About

A wordpress starter-theme forked from FoundationPress and modified to suit our internal needs.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published