diff --git a/README.md b/README.md index 101edae..aec43e5 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,38 @@ 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. +Blank Theme is a custom theme created with underscore theme, which includes foundation basic grid system and some basic customizer settings which are required in almost all projects. Here are some of the other more interesting things you'll find here: +* A modern workflow with a pre-made command-line interface to turn your project into a more pleasant experience. +* A just right amount of lean, well-commented, modern, HTML5 templates. +* `class-assets.php` that enqueue all your require css and js files. +* `class-blank-theme.php` file in inc/classes is where the theme is setup. This file add all the require theme supports. +* Customizer registration and settings added in `inc/classes/class-customizer.php` file. +* 2 widgets ( Sidebar & Footer ) added in `inc/classes/class-widgets.php` file. +* `inc/helpers/custom-functions.php` where you can add your custom functions. +* Custom template tags in `inc/helpers/template-tags.php` that keep your templates clean and neat and prevent code duplication. +* In `assets/src/js/admin/customizer.js` file, Theme Customizer enhancements added for a better user experience. +* `assets/src/js/components` where you can add the common components for the theme. +* You can add styles in `assets/src/sass` folder. Getting Started --------------- -After cloning repo run +### Requirements + +`Blank Theme` requires the following dependencies: + +- [Node.js](https://nodejs.org/) +- [Composer](https://getcomposer.org/) + +### Setup + +After cloning/downloading repository, you need to install the necessary Node.js and Composer dependencies : ```bash -npm install +$ composer install +$ npm install ``` and then run the following command which will prompt for the theme name, start renaming and do cleanup. @@ -31,7 +52,7 @@ npm run prod # When ready for production -#### Other Commands +#### Available CLI commands ```bash # Generate pot files diff --git a/bin/init.js b/bin/init.js index a62a69b..efe86d9 100755 --- a/bin/init.js +++ b/bin/init.js @@ -154,6 +154,9 @@ const initTheme = (themeInfo) => { blank_theme_: themeInfo.snakeCaseWithUnderscoreSuffix, Blank_Theme_: themeInfo.pascalSnakeCaseWithUnderscoreSuffix, BLANK_THEME_: themeInfo.macroCaseWithUnderscoreSuffix, + 'Blank theme': 'Blank Theme', + 'underscore theme': 'Blank Theme', + blankTheme: 'blank-theme', }; const files = getAllFiles(getRoot()); @@ -239,6 +242,11 @@ const getAllFiles = (dir) => { */ const replaceFileContent = (files, chunksToReplace, newChunk) => { files.forEach((file) => { + + if(path.basename(file) === 'init.js' && (chunksToReplace === 'Blank theme' || chunksToReplace === 'underscore theme' || chunksToReplace === 'blankTheme')) { + return; + } + const filePath = path.resolve(getRoot(), file); try { diff --git a/composer.json b/composer.json index e931d5f..2ae9d85 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,10 @@ }, "config": { "discard-changes": true, - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } }, "minimum-stability": "dev", "prefer-stable": true, diff --git a/languages/blank-theme.pot b/languages/blank-theme.pot index 1e41a6a..5902e50 100644 --- a/languages/blank-theme.pot +++ b/languages/blank-theme.pot @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Blank Theme +# Copyright (C) 2022 Blank Theme # This file is distributed under the same license as the Blank Theme package. msgid "" msgstr "" diff --git a/style.css b/style.css index b872c38..f98dd80 100644 --- a/style.css +++ b/style.css @@ -14,8 +14,7 @@ This theme, like WordPress, is licensed under the GPL. Use it to make something cool, have fun, and share what you've learned with others. -Blank Theme is based on Underscores http://underscores.me/, (C) 2012-2015 Automattic, Inc. -Underscores is distributed under the terms of the GNU GPL v2 or later. +Blank Theme is based on Blank theme https://github.com/rtCamp/blankTheme Normalizing styles have been helped along thanks to the fine work of Nicolas Gallagher and Jonathan Neal http://necolas.github.com/normalize.css/