Git Product home page Git Product logo

blank-theme's Introduction

Blank Theme

Blank Theme is a custom blank theme created with underscore theme, which includes foundation basic grid system and some basic customizer settings which are required in almost all projects.

Getting Started

After cloning repo run

npm install

and then run the following command which will prompt for the theme name, start renaming and do cleanup.

npm run init

Compile Assets

npm run dev       # During development
npm run prod      # When ready for production

Other Commands

# Generate pot files
npm run pot

# Lint CSS, JS and PHP
npm run lint:css
npm run lint:js
npm run lint:php
npm run lint:php:fix

Before commit

This precommit script will lint your scss, js, php files and also generate pot file.

npm run precommit

Does this interest you?

Join us at rtCamp, we specialize in providing high performance enterprise WordPress solutions

blank-theme's People

Contributors

bnap00 avatar chandrapatel avatar dependabot[bot] avatar devanshijoshi9 avatar divyarajmasani avatar imranhsayed avatar kiranpotphode avatar kirtangajjar avatar kishanjasani avatar maitreyie-chavan avatar manishsongirkar avatar mohdsayed avatar mrrobot47 avatar rahidroid avatar robicse11127 avatar rtbot avatar thelovekesh avatar thrijith avatar umeshnevase avatar wpamitkumar avatar yahilmadakiya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blank-theme's Issues

Hint the origin of the theme

Summary

Once the search-replace is done, the user/developer has no idea of finding out where the theme originally originated from. If there were hints on the origin of the theme (blank theme), it would help somebody skimming through the codebase better understand architectural decisions and design patterns. We could get ahead and add some detail at the end of the readme file and in the header of the style.css file, something the _s theme does.

References

PHPCS warnings and errors

PHPCS error and warnings in inc/classes/class-base.php

Checked with WordPress coding standard.

FOUND 1 ERROR AND 3 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------------------------------------------
  50 | ERROR   | Visibility must be declared on method "__destruct"
 149 | WARNING | trigger_error() found. Debug code should not normally be used in production.
 195 | WARNING | Method name "_add_hook" should not be prefixed with an underscore to indicate visibility
 216 | WARNING | trigger_error() found. Debug code should not normally be used in production.
----------------------------------------------------------------------------------------------------------```

Issue with renaming script `npm run init`

I tried to setup fresh theme and run init command to renaming and do cleanup.
after Renaming Successful message on terminal I checked package-name, text-domain, function prefix there is no change.

Screenshot 2021-11-02 at 12 55 42 PM

Node:  16.13.0
NPM: 8.1.0

Issue on Windows when I run `npm run init`

When running npm run init, I encountered an issue (check screenshot).
I tried using a previous version of node - v12.13.0 but still had the same issue.

Before that, I encountered this error - '.' is not recognized as an internal or external command
To solve that, I ran - npm config set script-shell bash
As advised on stackoverflow.

error

Improve renaming script

When running npm run init, though it does the renaming as expected however the script is written in a sloppy way

  1. It does not handle errors.
  2. It does not give enough information about the steps in progress.
  3. Incorrect colors used for showing progress.
  4. It should rename the theme folder name from blank-theme => chosen name or create a new copy of the renamed theme and keep blank-theme as it is.

QnA

Hello

I got some questions regarding the blank theme from the partner.

  1. This theme seems to have been based on Underscores -- but the license in package.json was changed from GPL-2.0-or-later to MIT -- why was that change made?
  2. Underscores also has a /style.css in the root directory of the theme that is built from the /sass/ folder in the theme. It looks like you've rearchitected the Sass to be be nested several directories down in the /assets/src/sass/ and output to the /assets/build/css/ folders, rather than the WordPress-standard /style.css file in the root. Why?
  3. It seems the main.css and other generated css files are compressed at the highest degree, saving some bits of data with the tradeoff of maintenance and comprehension. Was this an intentional choice?
  4. Why was the functions.php from underscores rewritten to a much more complex autoloader system?
  5. Could you explain how you weighted the cost/benefit of building wrapper methods for WordPress core functionality such as registering styles? It feels like a needless bit of complexity that makes it more difficult to ack through the codebase and finds where resources are registered, and I'm not sure I understand the advantage when it's only used three or four times.
  6. Is there a reason for the theme not including a theme.json file for the block editor to be able to use to guide font sizes, colors, and the like?
  7. For how constants are named -- something ending in _TEMP_DIR feels confusing when it's used to refer to a "Template Directory" rather than a directory for temporary files -- minor stuff, but more of a remark that it may want to be reevaluated for naming patterns.

Thanks

CC: @chandrapatel

Php Unit test case setup

  • Create a setup for Php Unit Tests along with the documentation.

Acceptance Criteria:

  • Each class and its method should pass though the Php Unit test case
  • If any of the methods is ignored then, it should have proper docs with a reason to ignore it.
  • It should have detailed documentation for the local setup of Unit tests and how to run it locally.

Update init script

Summary

  • Update theme init script in bin/init.js

References

Acceptance Criteria

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.