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-wp-fluidity

v0.0.1

Published

A WordPress theme YeoMan generator, to kickstart WordPress theme development with yo & grunt. Utilizing Stylus w/Fluidity, JadePHP, and Coffeescript.

Downloads

5

Readme

Fluidity + Wordpress = ♡

generator-wp-fluidity

A Yeoman generator to kickstart your WordPress theme development with an awesome grunt based workflow that utilizes Stylus w/Fluidity, JadePHP, and Coffeescript.

What do you get

  • A super barebones wp theme
  • An awesome grunt based development environment that rapidly increases theme development time and developer happiness with fetaures like:
    • Compiling, merging and compressing all Stylus files to one style.css file
    • Hinting, compiling, merging and compressing all Coffeescript files to one dist.js file
    • Sniffing, compiling, and compressing all JadePHP files to PHP files
    • A 'dev' task that offers LiveReload on changes to your PHP, Style, and Coffescript files all while hinting, sniffing, compiling, and merging automatically in the background.
    • A 'build' task for generating a production ready distribution version of the theme minified and compressed to ship.

Getting Started

You''l need to have Yeoman installed. You can get it through npm.

$ npm install -g yo

Of course you'll also need a working WordPress installation. Checkout YeoPress

npm install -g yo generator-wordpress

Once installed you'll be able to conjure up a wordpress install in any directory with:

yo wordpress

This theme develpoment toolchain also expects some things to be available globally on the system. In particular, it uses the phpcs binary to check the PHP files for syntax errors so you'll need to install that. We can and should use Composer the package manager for PHP.

I recommend installing Composer globally. To do so...

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

Next use Composer to install Pear phpcs

 composer global require "squizlabs/php_codesniffer=*"

Make sure you have ~/.composer/vendor/bin/ in your PATH. Add it to your ~/.bash_profile or ~/.bashrc like this...

export PATH="~/.composer/vendor/bin/:$PATH"

Installation

Finally, you can install wp-fluidity from npm.

npm install -g generator-wp-fluidity

Then from inside a themes directory of a working wordpress install.

yo wp-fluidity

You'll be prompted with a few questions about your theme and when it's all done you'll have a new folder wth your themes name.

Theme Development

To sart developing you'll need to install the dependences the grunt tasks depend on. First cd into the wp-content/themes/<your theme name>/grunt directory and run:

npm install

Once the install is done You'll be able to fire off the default grunt task (dev) and start developing.Simply by running...

grunt

Or You can run the dev task directly if you like...

grunt dev

This will run all of the preprocessing in development mode (Unminified, and sourcemapped where possible) for the first time generating the theme itself and starts a watcher that will trigger the appropriate tasks as you make changes to files.

Of course, you'll have to fire up a PHP server of some kind to actually serve up WordPress. I'll leave that up to you but I prefer MAMP.

About the Preprocessing

Our toolchain uses several pre-proccessors, linters, uglifiers to make development nicer, easier and cleaner They are as follows...

JadePHP

JadePHP allows us to write our php files using the terse and beatiful syntax of jade. For more information on the syntax and usage check the readme at Jade.PHP

Our jade files our kept in the /jade directory. They are then processed on change and the resulting PHP files are generated in the root of the theme directory.

Coffeescript

Coffeescript allows us to write our javascript files using the terse and beatiful syntax of coffeescript. Our coffeescript files are kept in the /coffee directory. They are then processed on change and the resulting JS files are generated in the root /js/tmp directory. These JS files will then be Concatenated into just one JS file in /js/dist.js.

During dist this file will also be uglified.

Stylus

Stylus allows us to write our CSS files using the terse and beatiful syntax of Stylus. Our stylus files are kept in the /stylus directory. They are then processed on change and the resulting CSS files are generated in the root of the theme directory.

Fluidity

We're using the FluidityCSS framework in our stylus files. Fluidity will be installed and available for use in your stylesheets.

Theme Distribution

To create a production ready buold of the them in the the /dist directory. Run...

grunt build

This will re-compile all of the source files in their resepective non-source-mapped, minified, or otherwise uglified/compressed manner and copy all the necessary files over to the `/dist' directory.

License

MIT License