Giter VIP home page Giter VIP logo

boilerplate's Introduction

TheDramatist Boilerplate v2.0.0

This is a boilerplate for WordPress with modern PHP development approach. It's goal is to simplify and speed up the process of creating new packages for the daily WordPress work. It's focused on creating composer packages of type wordpress-plugin, wordpress-theme, library and project with the default directory structure and meta files (phpunit.xml.dist, composer.json and so on) with the minimal amount of code needed for basic structure.

Usage

All you need is at least PHP 5.6 with Git and composer installed.

$ git clone [email protected]:rnaby/boilerplate.git <DIRECTORY>
$ cd <DIRECTORY>
$ composer install

After composer has fetched some dependencies and installed them, you will get asked some question about the new package:

> TheDramatistBoilerplate\Setup::run
Now running setup tasks...
Task Welcome
  _____   _              ____                                       _     _         _   
 |_   _| | |__     ___  |  _ \   _ __    __ _   _ __ ___     __ _  | |_  (_)  ___  | |_
   | |   | '_ \   / _ \ | | | | | '__|  / _` | | '_ ` _ \   / _` | | __| | | / __| | __|
   | |   | | | | |  __/ | |_| | | |    | (_| | | | | | | | | (_| | | |_  | | \__ \ | |_
   |_|   |_| |_|  \___| |____/  |_|     \__,_| |_| |_| |_|  \__,_|  \__| |_| |___/  \__|

  ____            _   _                         _           _          
 | __ )    ___   (_) | |   ___   _ __   _ __   | |   __ _  | |_    ___
 |  _ \   / _ \  | | | |  / _ \ | '__| | '_ \  | |  / _` | | __|  / _ \
 | |_) | | (_) | | | | | |  __/ | |    | |_) | | | | (_| | | |_  |  __/
 |____/   \___/  |_| |_|  \___| |_|    | .__/  |_|  \__,_|  \__|  \___|
                                       |_|                             

Task AskAboutProjectParameters
Vendor name [Human readable vendor name (probably your company's name)] Default: "TheDramatist" ?
Vendor name in lowercase [Used in composer package name (no spaces, [a-z0-9-] )] Default: "thedramatist" ?
Package name [Human readable package name] Default: "Awesome WordPress Plugin" ? My New Plugin
Package name in lowercase [Used for the composer package name (no spaces, [a-z0-9-] )] Default: "my-new-plugin" ?
License [License abbreviation [MIT|GPL]] Default: "GPL" ? MIT
Package type [The composer type of the package (library, wordpress-plugin, wordpress-theme or project)] Default: "wordpress-plugin" ? wordpress-plugin
Package base namespace [The base PHP namespace of the package.] Default: "TheDramatist\AwesomeWordPressPlugin" ?
Textdomain [Used for translation in gettext functions] Default: "my-new-plugin" ?
Package description [The package description in one sentence] Default: "TODO: Describe what this package is all about" ? This is the description of My New Plugin
Author name [The name of the author (in person) of the package] Default: "Khan M Rashedun-Naby" ? Khan M Rashedun-Naby
Author email [The email of the author.] Default: "[email protected]" ? [email protected]

Finally the boilerplate runs some scripts to create all the files according to your inputs. At the end the sources and VCS files of the boilerplate gets deleted and a new git repository is initialized.

After that, your directory looks like this:

$ ls -al <DIRECTORY>
drwxrwxr-x  8 khan khan   320 Jun 12 17:33 ./
drwxrwxrwt 18 root root   2440 Jun 12 17:33 ../
drwxrwxr-x  4 khan khan    80 Jun 12 17:33 assets/
-rw-rw-r--  1 khan khan   149 Jun 12 17:33 CHANGELOG.md
-rw-rw-r--  1 khan khan   539 Jun 12 17:33 composer.json
-rw-rw-r--  1 khan khan   158 Jun 12 17:33 functions.php
drwxrwxr-x  7 khan khan   200 Jun 12 17:33 .git/
-rw-rw-r--  1 khan khan    21 Jun 12 17:33 .gitignore
-rw-rw-r--  1 khan khan 17751 Jun 12 17:33 LICENSE
-rw-rw-r--  1 khan khan   389 Jun 12 17:33 phpunit.xml.dist
-rw-rw-r--  1 khan khan   781 Jun 12 17:33 README.md
drwxrwxr-x  2 khan khan    60 Jun 12 17:33 src/
-rw-rw-r--  1 khan khan   258 Jun 12 17:33 style.css
drwxrwxr-x  3 khan khan    60 Jun 12 17:33 tests/
drwxrwxr-x  3 khan khan    80 Jun 12 17:33 vendor/
drwxrwxr-x  2 khan khan    60 Jun 12 17:33 w-org-assets/

The structure of the directory depends on the type of package you choose. For example the w-org-assets/ directory won't appear for library or project types.

Crafted by Khan M Rashedun-Naby

I'm a professional web developer and I crafted this boilerplate according to my need. It's still evolving and I have plans to add more features to it in future.

License

Copyright (c) 2017 Khan M Rashedun-Naby

Good news, this boilerplate is free for everyone! Since it's released under the MIT License you can use it free of charge on your personal or commercial website. This package is build on top of the brightnucleus/boilerplate package by Alain Schlesser and the inpsyde/boilerplate package by Inpsyde.

Contributing

All feedback / bug reports / pull requests are welcome.

boilerplate's People

Contributors

khanrn avatar

Watchers

James Cloos avatar  avatar

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.