Giter VIP home page Giter VIP logo

grunt-megumi-underscores's Introduction

grunt-megumi-underscores

Create a WordPress theme based on Underscores with grunt-init.

Installation

もし、grunt-init をインストールしてなければ先にインストールしてください。

sudo npm install -g grunt-init

grunt-init のインストールが完了したら、~/.grunt-init/ ディレクトリを作成してください。

mkdir ~/.grunt-init

次は、以下のコマンドを実行して、このテンプレートをインストールしてください。

git clone [email protected]:miya0001/grunt-megumi-underscores.git ~/.grunt-init/megumi-underscores

インストールは以上で完了です。

テンプレートを最新版に更新するには以下のコマンドを実行しましょう。

cd ~/.grunt-init/megumi-underscores
git pull

使い方

wp-content/themes ディレクトリに移動して任意のディレクトリを作成し、以下のコマンドを実行してください。

grunt-init megumi-underscores

以上を実行すると、テーマ名などの入力を求められた後、テーマファイルが作成されます。

テーマファイルの作成が完了したら、以下のコマンドを実行してください。これによりCompassなどのツールのセットアップが完了します。

npm install

あとは、sass/your-theme-name.scssjs/your-theme-name.js などを編集して、必要に応じて以下のコマンドを実行して、.scss などのコンパイルを実行してください。

grunt

以降は、grunt と実行するだけで、.scss のコンパイルや、JavaScriptのminifyを行います。

また、これらのファイルは、WordPressによってあらかじめロードされています。

Compassをさらに使いこなす!

Foundationを使う

Foundationをインストール

sudo gem install zurb-foundation

テーマディレクトリ内のGruntfile.jsの69行目に以下のように記述

        compass: {
            dist: {
                options: {
                    require: 'zurb-foundation', // この行を追加
                    sassDir: 'sass',
                    cssDir: 'css',

あとは .scss を編集して grunt コマンドを実行!

Susyを使う

Susyをインストール

sudo gem install susy

テーマディレクトリ内のGruntfile.jsの69行目に以下のように記述

        compass: {
            dist: {
                options: {
                    require: 'susy', // この行を追加
                    sassDir: 'sass',
                    cssDir: 'css',

あとは .scss を編集して grunt コマンドを実行!

Notes

  • Compassの設定ファイル config.rb は不要です。
  • Underscoresに対して、フックの追加、CSSの削除等の修正を加えてあります。

Release History

  • 2013-09-19 First Release

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.