From 8628ed1f82d1445ab44d3e02904974700c539a03 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Wed, 14 Aug 2019 23:49:11 -0400 Subject: [PATCH 1/4] Handle the case of no git repo Signed-off-by: Andrew Welch --- webpack.prod.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/webpack.prod.js b/webpack.prod.js index e8c8efc..6896f54 100644 --- a/webpack.prod.js +++ b/webpack.prod.js @@ -45,6 +45,14 @@ class TailwindExtractor { // Configure file banner const configureBanner = () => { + let commitHash = 'n/a'; + let branch = 'n/a'; + try { + let commitHash = git.long(); + let branch = git.branch(); + } catch(error) { + console.log('No git repository is associated with this project'); + } return { banner: [ '/*!', @@ -52,7 +60,7 @@ const configureBanner = () => { ' * @name ' + '[filebase]', ' * @author ' + pkg.author.name, ' * @build ' + moment().format('llll') + ' ET', - ' * @release ' + git.long() + ' [' + git.branch() + ']', + ' * @release ' + commitHash + ' [' + branch + ']', ' * @copyright Copyright (c) ' + moment().format('YYYY') + ' ' + settings.copyright, ' *', ' */', From f484a48040a1ef1444a64c7071e84fd42aeedbbc Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Thu, 15 Aug 2019 11:41:13 -0400 Subject: [PATCH 2/4] Version 2.0.0 Signed-off-by: Andrew Welch --- CHANGELOG.md | 102 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..bdc9b5a --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,102 @@ +# nystudio107/craft Change Log + +## 2.0.0 - 2018.08.14 +### Changed +* Updated to use modern webpack config +* Updated to use Craft 3.2 as the baseline + +## 1.0.16 - 2018.05.24 +### Changed +* Removed references to the Craft RC in the `composer.json` +* Added SEOmatic to the list of base plugins +* Change the Critical CSS loader to `onload="this.onload=null;this.rel='stylesheet'"` for IE 11 compatibility + +## 1.0.15 - 2018.02.19 +### Changed +* Updated `composer.json` to reflect the updated dependencies +* Fixed the site module's controller namespacing +* Added `sort-packages` to the `composer.json` +* Added `async-queue` plugin + +## 1.0.14 - 2018.02.01 +### Changed +* Fixed composer dependencies to reflect the `nystudio107/craft-` renaming + +## 1.0.13 - 2018.01.26 +### Changed +* Tell Composer to install PHP 7.0-compatible dependencies +* Fixed `sitemodule` namespacing + +## 1.0.12 - 2018.01.25 +### Changed +* Switched from `craft.app.config.general.custom.baseUrl` to `alias('@baseUrl')` + +## 1.0.11 - 2018.01.23 +### Added +* Added `post-install-cmd` to `composer.json` + +## 1.0.10 - 2018.01.18 +### Changed +* Synced the `modules/site` with `site-module` and pluginfactory.io generated modules + +## 1.0.9 - 2018.01.06 +### Added +* Added a static asset filename-based cache busting `LocalValetDriver.php` for Laravel Valet + +## 1.0.8 - 2018.01.01 +### Added +* Added a better PurgeCSS pipeline +* Added a `purgecssWhitelist` to `package.json` +* Execute JavaScript when doing Critical CSS +* Added a `criticalWhitelist` to `package.json` +* Added SiteModule framework to nystudio107/craft +* Added a `post-update-cmd` to `composer.json` to recreate any symlinks that may have been removed after a `composer update` or `composer install` + +## 1.0.7 - 2017.12.16 +### Added +* Added `purgecss` to production builds +* Added automatic incrementing of `staticAssetsVersion` for production builds + +## 1.0.6 - 2017.12.16 +### Changed +* Updated to use the latest `critical` package, adjusted `gulpfile.js` base path + +## 1.0.5 - 2017.12.13 +### Changed +* Slurp whitespace with the minify tags +* Fix favicon URLs/meta +* Fix manifest + +## 1.0.4 - 2017.12.06 +### Changed +* Fixed asset versioning in `sw.js` +* Run all inline JavaScript through `js-babel` for ES6 goodness + +### Added +* Added base VueJS and Axios support + +## 1.0.3 - 2017.12.05 +### Changed +* Updated for Craft CMS 3 RC1 release + +## 1.0.2 - 2017.12.04 +### Changed +* Fixed deprecation errors +* Cleaned up the default ServiceWorker in `sw.js` +* Added Fontello CSS to the `package.json` +* Added PhpStorm Craft app API type hinting + +## 1.0.1 - 2017.12.01 +### Added +* Added accessible tabhandler.js +* Added Tailwind CSS +* Added support for Redis via `app.php` +* Fixed `package.json` paths for `web/` +* Cleaned up the default templates +* Added `src/conf/` for Nginx or other configuration files + +## 1.0.0 - 2017.11.26 +### Added +* Initial release + +Brought to you by [nystudio107](https://nystudio107.com/) From ff4d78b3738f5c434c84dc9d6387aa6124a4628e Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Thu, 15 Aug 2019 11:41:23 -0400 Subject: [PATCH 3/4] Updated README.md Signed-off-by: Andrew Welch --- README.md | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/README.md b/README.md index 4a5ab32..e9e5238 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,69 @@ +

nystudio107

+ +## About nystudio107/craft + +This is an alternate scaffolding package for Craft 3 CMS projects to Pixel & Tonic's canonical [craftcms/craft](https://github.com/craftcms/craft) package. + +The project is based on [Craft CMS](https://CraftCMS.com) using a unique `templates/_boilerplate` system for web/AJAX/AMP pages, and implements a number of technologies/techniques: + +* [webpack](https://webpack.js.org/) is used for the build system as per [An Annotated webpack 4 Config for Frontend Web Development](https://nystudio107.com/blog/an-annotated-webpack-4-config-for-frontend-web-development) +* [VueJS](https://vuejs.org/) is used for some of the interactive bits on the website as per +* [Tailwind CSS](https://tailwindcss.com/) for the site-wide CSS +* JSON-LD structured data as per [Annotated JSON-LD Structured Data Examples](https://nystudio107.com/blog/annotated-json-ld-structured-data-examples) +* [Google AMP](https://developers.google.com/amp/) versions of the podcast episode and other pages +* Implements a Service Worker via Google's [Workbox](https://developers.google.com/web/tools/workbox/) as per [Service Workers and Offline Browsing](https://nystudio107.com/blog/service-workers-and-offline-browsing) +* Critical CSS as per [Implementing Critical CSS on your website](https://nystudio107.com/blog/implementing-critical-css) +* Frontend error handling as per [Handling Errors Gracefully in Craft CMS](https://nystudio107.com/blog/handling-errors-gracefully-in-craft-cms) +* A custom site module as per [Enhancing a Craft CMS 3 Website with a Custom Module](https://nystudio107.com/blog/enhancing-a-craft-cms-3-website-with-a-custom-module) +* CLI-based queue as per [Robust queue job handling in Craft CMS](https://nystudio107.com/blog/robust-queue-job-handling-in-craft-cms) +* FastCGI Static Cache as per [Static Page Caching with Craft CMS](https://nystudio107.com/blog/static-caching-with-craft-cms) +* [Craft-Scripts](https://github.com/nystudio107/craft-scripts) as described in the [Database & Asset Syncing Between Environments in Craft CMS](https://nystudio107.com/blog/database-asset-syncing-between-environments-in-craft-cms), [Mitigating Disaster via Website Backups](https://nystudio107.com/blog/mitigating-disaster-via-website-backups) & [Hardening Craft CMS Permissions](https://nystudio107.com/blog/hardening-craft-cms-permissions) articles + +...and probably a bunch of other stuff too. + +The following Craft CMS plugins are used on this site: +* [FastCGI Cache Bust](https://nystudio107.com/plugins/fastcgi-cache-bust) - to bust the FastCGI cache whenever entries are modified +* [ImageOptimize](https://nystudio107.com/plugins/imageoptimize) - for the optimized images and `srcset`s used on the site +* [Minify](https://nystudio107.com/plugins/minify) - to minify the HTML and inline JS/CSS +* [Retour](https://nystudio107.com/plugins/retour) - for setting up 404 redirects +* [SEOmatic](https://nystudio107.com/plugins/seomatic) - for handling site-side SEO +* [Twigpack](https://nystudio107.com/plugins/twigpack) - for loading webpack-generated `manifest.json` resources in a modern way +* [Typogrify](https://nystudio107.com/plugins/typogrify) - for smart quotes and other typographic ligatures +* [Webperf](https://nystudio107.com/plugins/webperf) - for monitoring web performance + +You can read more about it in the [Setting up a New Craft 3 CMS Project](https://nystudio107.com/blog/setting-up-a-craft-cms-3-project) article. + +## Using nystudio107/craft + +This project package works exactly the way Pixel & Tonic's [craftcms/craft](https://github.com/craftcms/craft) package works; you create a new project by first creating & installing the project: + + composer create-project nystudio107/craft PATH + +Make sure that `PATH` is the path to your project, including the name you want for the project, e.g.: + + composer create-project nystudio107/craft craft3 + +Then `cd` to your new project directory, and run Craft's `setup` console command to create your `.env` environments and optionally install: + + cd PATH + ./craft setup + +Finally, run the `nys-setup` command to configure Craft-Scripts based on your newly created `.env` settings: + + ./nys-setup + +That's it, enjoy! + +If you ever delete the `vendor` folder or such, just re-run: + + ./nys-setup + +...and it will re-create the symlink to your `.env.sh`; don't worry, it won't stomp on any changes you've made. + +Below is the entire intact, unmodified `README.md` from Pixel & Tonic's [craftcms/craft](https://github.com/craftcms/craft): + +..... +

Craft CMS

## About Craft CMS From b67758da355ebbc7cf8026483f53207230bf3433 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Thu, 15 Aug 2019 11:50:42 -0400 Subject: [PATCH 4/4] Version 2.0.1 Signed-off-by: Andrew Welch --- CHANGELOG.md | 4 ++++ composer.json | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bdc9b5a..fba2694 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # nystudio107/craft Change Log +## 2.0.1 - 2018.08.15 +### Changed +* Numerous template changes to get the base build working + ## 2.0.0 - 2018.08.14 ### Changed * Updated to use modern webpack config diff --git a/composer.json b/composer.json index a53c408..66e472f 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,7 @@ { "name": "craftcms/craft", - "description": "Craft CMS", + "description": "nystudio107 Craft 3.2 CMS scaffolding project", + "version": "2.0.1", "keywords": [ "craft", "cms", @@ -19,7 +20,7 @@ "rss": "https://craftcms.com/changelog.rss" }, "require": { - "craftcms/cms": "^3.0.0", + "craftcms/cms": "^3.2.0", "vlucas/phpdotenv": "^3.4.0" }, "autoload": {