npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

generator-start-wp-theme

v0.0.7

Published

A starting point for developing Wordpress themes

Downloads

19

Readme

generator-start-wp-theme

About

A Yeoman generator for creating a starting point for developing Wordpress themes. You'll need npm, yeoman, grunt & sass installed, but if your awesome you'll already have that setup.

Setup

Install the package on your machine using:

npm install generator-start-wp-theme

Lot's of code will happen. This may take a few minutes. Go make a beverage! When it's done you can use the generator like so... Navigate to your development Wordpress' theme folder [change path as needed]:

cd ~/Sites/Development/Wordpress/wp-content/themes

Run the generator

yo start-wp-theme

You will be prompted with a few basic questions to help the setup get started. Once you get past the description question you will again see lots of code. That's grunt and bower doing their thing. It's also time to drink your beverage!

Development

In your theme folder you will now have a folder with the name of your theme which is setup with the basics to get a theme ofter the ground quickly. Grunt lives in the dev/tasks/ folder in your theme so navigate to that and run:

grunt watch

This will watch your sass, js and images in the dev folder and the php files in your theme. If your using livereload then now would be a good time to start it! You should NEVER edit the css, js or image files in static. Static is used for serving the files and they are replaced when grunt detects changes in dev! So with that firndly warning it's time to build your theme!... Off you go!

  • Dev = GOOD!
  • Static = BAD!

Production

When you're done and ready to go live you'll need to minify your js and whatnot. You can do this by using:

grunt prod

MEGA BIG WARNING!!!! This will minify all css, js and image files in the static folder and OVERWRITE THEM with minified versions of the same name (so WP doesn't need paths to be changed)! Make sure any css, js and images are kept in the dev folder.

Once the prod is complete you'll notice a new .zip file with your theme name! That's your theme all packeged up, minfied, optimized and shiny.

  • Upload
  • Activate
  • ?????
  • Profit

Sundries

Theme structure

/dev/ - Where you will be working. /static/ - wp links to theme files in here - dev compiles to here. /_inc/ - The settings framework. /content-parts/ - Where to put your template parts such as loops etc (if you want to)

style.css - names and sets up your theme as far as WP is concerned. functions.php - your theme functions options.php - options for the settings framework *.php your theme files

themename
|
|-dev
| |-scss
| |-js
| |-images
| |-fonts
|
|-static
| |-css
| |-js
| |-images
| |-fonts
|
|-content-parts
|
|-_inc
|
|*.php
|style.css