Skip to content

Commit

Permalink
nystudio107/craft scaffolding
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Welch <[email protected]>
  • Loading branch information
khalwat committed Dec 1, 2017
1 parent be9c0a5 commit 0a1b3c2
Show file tree
Hide file tree
Showing 101 changed files with 12,895 additions and 1,974 deletions.
4 changes: 4 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": ["es2015"],
"compact": true
}
37 changes: 37 additions & 0 deletions .csslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"important": false,
"adjoining-classes": false,
"known-properties": false,
"box-sizing": false,
"box-model": false,
"overqualified-elements": false,
"display-property-grouping": false,
"bulletproof-font-face": false,
"compatible-vendor-prefixes": false,
"regex-selectors": false,
"errors": true,
"duplicate-background-images": false,
"duplicate-properties": false,
"empty-rules": false,
"selector-max-approaching": false,
"gradients": false,
"fallback-colors": false,
"font-sizes": false,
"font-faces": false,
"floats": false,
"star-property-hack": false,
"outline-none": false,
"import": false,
"ids": false,
"underscore-property-hack": false,
"rules-count": false,
"qualified-headings": false,
"selector-max": false,
"shorthand": false,
"text-indent": false,
"unique-headings": false,
"universal-selector": false,
"unqualified-attributes": false,
"vendor-prefix": false,
"zero-units": false
}
29 changes: 29 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# The environment Craft is currently running in ('dev', 'staging', 'production', etc.)
ENVIRONMENT="dev"

# The secure key Craft will use for hashing and encrypting data
SECURITY_KEY=""

# The database driver that will used ('mysql' or 'pgsql')
DB_DRIVER="mysql"

# The database server name or IP address (usually this is 'localhost' or '127.0.0.1')
DB_SERVER="localhost"

# The database username to connect with
DB_USER="root"

# The database password to connect with
DB_PASSWORD=""

# The name of the database to select
DB_DATABASE=""

# The database schema that will be used (PostgreSQL only)
DB_SCHEMA="public"

# The prefix that should be added to generated table names (only necessary if multiple things are sharing the same database)
DB_TABLE_PREFIX=""

# The port to connect to the database with. Will default to 5432 for PostgreSQL and 3306 for MySQL.
DB_PORT=""
22 changes: 10 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,40 +1,38 @@
# Craft .gitignore
# Craft 3 .gitignore
#
# Example .gitignore file for Craft CMS projects
# Example .gitignore file for Craft 3 CMS projects
#
# @author nystudio107
# @copyright Copyright (c) 2017 nystudio107
# @link https://nystudio107.com/
# @package craft-scripts
# @since 1.1.0
# @package nystudio107/craft
# @since 1.0.0
# @license MIT

# This file should be renamed to '.gitignore' and placed in your
# Craft CMS project root directory
# Craft 3 CMS project root directory

# CRAFT ENVIRONMENT
.env.php
.env.sh
.env

# COMPOSER
/vendor

# CRAFT STORAGE
/storage/*
/web/cpresources/*

# COMPOSER
/vendor/*
!/storage/.gitkeep

# ASSETS
/web/assets/*

# IMAGER TRANSFORMS
/web/imager/*

# BUILD FILES
/bower_components/*
/node_modules/*
/build/*
/yarn-error.log
/npm-debug.log

# MISC FILES
.cache
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# nystudio107/craft Change Log

## 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/)
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) Pixel & Tonic, Inc.
Copyright (c) nystudio107.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
60 changes: 59 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,62 @@
<p align="center"><a href="https://craftcms.com/" target="_blank"><img width="312" height="90" src="https://craftcms.com/craftcms.svg" alt="Craft CMS"></a></p>
<p align="center"><a href="https://craftcms.com/" target="_blank"><img width="300" height="300" src="https://nystudio107.com/img/site/nystudio107_submark.svg" alt="nystudio107"></a></p>

## 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.

In addition to setting up a new Craft 3 CMS project, this project sets up:

* [Craft 3 Multi-Environment](https://github.com/nystudio107/craft3-multi-environment) as described in the [Multi-Environment Config for Craft CMS](https://nystudio107.com/blog/multi-environment-config-for-craft-cms) article
* [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 sets up some other base scaffolding as described to the following articles:

* [A Better package.json for the Frontend](https://nystudio107.com/blog/a-better-package-json-for-the-frontend)
* [A Gulp Workflow for Frontend Development Automation](https://nystudio107.com/blog/a-gulp-workflow-for-frontend-development-automation)
* [Implementing Critical CSS on your website](https://nystudio107.com/blog/implementing-critical-css)
* [Simple Static Asset Versioning in Craft CMS](https://nystudio107.com/blog/simple-static-asset-versioning)

It also installs a few base plugins that I use on every project. 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.

## Assumptions Made

Since this is boilerplate that nystudio107 uses for projects, it is by definition opinionated, and has a number of assumptions:

* Gulp is used as a the frontend workflow automation tool
* [Tailwind CSS](https://tailwindcss.com/docs/what-is-tailwind) is used as the utility-first CSS framework
* Nginx with `ssi on;` is used as the web server
* Redis is used as the PHP Session and Craft data caching method
* Critical CSS is used site-wide
* FontFaceObserver is used for font loading
* Craft-Scripts are used for db/asset synching
* Craft 3 Multi-Environment is used for the Craft 3 multi-environment setup

Obviously you're free to remove whatever components you don't need/want to use.

## 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 -s RC

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 -s RC

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 & Craft 3 Multi-Environment based on your newly created `.env` settings:

./nys-setup

That's it, enjoy!

Below is the entire intact, unmodified `README.md` from Pixel & Tonic's [craftcms/craft](https://github.com/craftcms/craft):

.....

## About Craft CMS

Expand Down
4 changes: 4 additions & 0 deletions browserslist
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Supported browsers

last 3 versions
iOS >= 8
41 changes: 22 additions & 19 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "craftcms/craft",
"description": "Craft CMS",
"name": "nystudio107/craft",
"description": "nystudio107 Craft 3 CMS scaffolding project",
"version": "1.0.1",
"keywords": [
"craft",
"cms",
Expand All @@ -11,33 +12,35 @@
"homepage": "https://craftcms.com/",
"type": "project",
"support": {
"email": "[email protected]",
"issues": "https://github.com/craftcms/cms/issues",
"forum": "https://craftcms.stackexchange.com/",
"source": "https://github.com/craftcms/cms",
"docs": "https://craftcms.com/docs",
"rss": "https://craftcms.com/changelog.rss"
"email": "[email protected]",
"issues": "https://github.com/nystudio107/craft/issues",
"source": "https://github.com/nystudio107/craft",
"docs": "https://github.com/nystudio107/craft"
},
"minimum-stability": "beta",
"minimum-stability": "RC",
"require": {
"php": ">=7.0.0",
"craftcms/cms": "^3.0.0-beta.10",
"craftcms/cms": "dev-release/3.0.0-RC1 as 3.0.0-RC1",
"vlucas/phpdotenv": "^2.4.0",
"roave/security-advisories": "dev-master",
"nystudio107/craft3-transcoder": "^1.0"
"yiisoft/yii2-redis": "^2.0.6",
"nystudio107/craft3-multi-environment": "^1.0.5",
"nystudio107/craft-scripts": "^1.2.4",
"nystudio107/craft3-eagerbeaver": "^1.0.0",
"nystudio107/craft3-imageoptimize": "^1.3.2",
"nystudio107/craft3-minify": "^1.2.5",
"nystudio107/craft3-typogrify": "^1.1.1"
},
"config": {
"optimize-autoloader": true
},
"scripts": {
"post-root-package-install": [
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php craft setup/welcome",
"@php nys-setup welcome"
]
},
"repositories": [
{
"type": "composer",
"url": "https://asset-packagist.org"
}
]
}
}
Loading

0 comments on commit 0a1b3c2

Please sign in to comment.