Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tailwind v3 WP Scaffold #156

Closed
wants to merge 50 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
67d3d92
Add tailwind v3 and remove unnecessary css files
Nikki-Jones Apr 29, 2022
3fc1e18
Fix folder structure and add partials + templates to hot reload
Nikki-Jones Apr 29, 2022
a67d88e
Mod remove editor import from frontend js
Nikki-Jones Apr 29, 2022
b410640
Add all tailwind plugins and added additional content targets
iansvo May 3, 2022
d5b9222
Update to use import pattern instead of @tailwind
iansvo May 4, 2022
d793366
Update config to pull colors from theme json, content updates
iansvo May 10, 2022
40ef15c
Color tweaks, add defaults for container and extra breakpoint
iansvo May 10, 2022
9530476
Cleanup/PR Fixes
iansvo May 10, 2022
eaf83d6
Readded all official plugins and updated inline comments
iansvo May 14, 2022
f752cc5
Updated tailwind helpers and config
iansvo May 16, 2022
7011ceb
Added initial README updates
iansvo May 16, 2022
6fa75ee
add vscode extension recommendation
dainemawer May 18, 2022
065f177
.vscode folder should be in the root of the project
dainemawer May 18, 2022
e849adc
only track the extensions.json file, not other settings
dainemawer May 18, 2022
19a4262
Merge pull request #121 from 10up/feature/tailwind-v3-hybrid-ian
iansvo May 18, 2022
9d429c3
Merge pull request #124 from 10up/feature-add-vscode-config
iansvo May 31, 2022
3410748
merge trunk
iansvo May 31, 2022
a8f6ece
Remove default container padding
iansvo May 31, 2022
181681a
Add additional wp specific breakpoints
iansvo May 31, 2022
4a70e49
Fix arbitrary class typos for reduced motion
Nikki-Jones Jun 3, 2022
b174379
Merge pull request #127 from 10up/feature/tailwind-ian
iansvo Jun 25, 2022
e3c3f52
Merge pull request #129 from 10up/fix/reduce-motion
iansvo Jun 27, 2022
4143d39
added readme update to link to documentation
dainemawer Jul 24, 2022
bff72ca
added doc links
dainemawer Jul 24, 2022
806bb77
Merge pull request #150 from 10up/feature/add-doc-links
dainemawer Jul 24, 2022
d9dd187
added purgecss-with-wordpress to safelist output WP classes
dainemawer Jul 24, 2022
fa25393
begun documentation amendments
dainemawer Jul 25, 2022
6d33f21
Update themes/10up-theme/tailwind.config.js
dainemawer Aug 4, 2022
8d8a3e2
Merge pull request #152 from 10up/feature/update-tailwind-md
dainemawer Aug 8, 2022
9813785
Merge pull request #151 from 10up/feature/add-purge-css-wordpress
dainemawer Aug 8, 2022
7d9acb3
Typo fixes, added additional sections for clarity
iansvo Aug 15, 2022
b102228
Added additional sentence change
iansvo Aug 15, 2022
229d345
Merge branch 'trunk' into epic/tailwind-v3
iansvo Aug 15, 2022
c478602
Update TAILWIND.md
iansvo Aug 15, 2022
756e3d7
Remove extra example safelist entries
iansvo Aug 16, 2022
7a5d3ab
Removed old README content and added link to TAILWIND.md
iansvo Aug 16, 2022
27182df
Added additional documentation note for clarity
iansvo Aug 16, 2022
0075df8
typo fix
iansvo Aug 16, 2022
5a85a50
Add postcss modifications and stylintrc
Nikki-Jones Aug 16, 2022
292d1e5
Add stylelint
Nikki-Jones Aug 16, 2022
3e61852
Add custom tailwind reset and modify folder structure/imports
Nikki-Jones Aug 16, 2022
3eb3750
Add more documentation
Nikki-Jones Aug 16, 2022
e93b25b
Refactor folder structure with correct ordering of imports
Nikki-Jones Aug 18, 2022
6d456f8
Refactor postcss config
Nikki-Jones Aug 18, 2022
6a666ec
Mod remove comment
Nikki-Jones Aug 18, 2022
53cb4d3
Merge pull request #160 from 10up/feature/19138441-tailwind-v3-testing
iansvo Aug 25, 2022
c9de362
Add several updates to the docs
Nikki-Jones Sep 8, 2022
6093139
Remove repeated code snippet
Nikki-Jones Sep 9, 2022
f76e2df
Mod docs updates
Nikki-Jones Sep 12, 2022
3a48ae7
Merge pull request #162 from 10up/feature/tailwind-v3-doc-updates
Nikki-Jones Sep 12, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ tmtags
*.un~
Session.vim
*.swp
.vscode
.vscode/settings.json
.vscode/tasks.json
.vscode/launch.json
.vscode/keybindings.json
.vscode/snippets

# Mac OSX
.DS_Store
Expand Down
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"bradlc.vscode-tailwindcss"
]
}
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# 10up WP Scaffold
# 10up WP Scaffold (Tailwind Edition)

👋🏼 Hello! You are currently viewing the Tailwind version of wp-scaffold! We've included a nifty [TAILWIND.md](themes/10up-theme/TAILWIND.md) in the theme. Please read through it and let us know if you have any questions in the #10up-tailwind channel in Slack.

This scaffold is the starting point for all 10up WordPress projects.

Expand All @@ -15,7 +17,7 @@ It contains a bare bones theme and must use plugin for you to base your developm
2. Take what you need. If your project doesn't have a theme, remove the theme. If your project doesn't need any plugin functionality, remove the MU plugin. If your plugin doesn't need CSS/JS, remove it. If your plugin doesn't need to be translated, remove all the translation functionality.
3. Compiling, minifying, bundling, etc. of JavaScript and CSS is all done by [10up Toolkit](https://github.com/10up/10up-toolkit). 10up Toolkit is included as a dev dependency in both the plugin and theme. If you want to develop on the theme (and vice-versa the plugin), you would navigate to the theme directory in your console and run `npm run start` (after running `npm install` first of course). Inside `package.json` edit `10up-toolkit.devURL` to your local development URL for if you're not using a `.test`. `10up-toolkit.entry` are the paths to CSS/JS files that need to be bundled. Edit these as needed.
4. Make sure to add `define( 'SCRIPT_DEBUG', true )` to `wp-config.php` to enable Hot Module Reload and React Fast Refresh.
5. [npm workspaces](https://docs.npmjs.com/cli/v7/using-npm/workspaces) is used to manage npm dependencies. The main benefit of using npm workspaces is that we can hoist all dependencies to the root folder and avoid installing duplicate dependencies, saving time and space. By default the `workspaces` config are setup so that `mu-plugins/10up-plugin` and all themes are treated as "packages", if you are building a new plugin/theme make sure to update `workspaces` in `package.json` See the example below:
5. [npm workspaces](https://docs.npmjs.com/cli/v7/using-npm/workspaces) is used to manage npm dependencies. The main benefit of using npm workspaces is that we can hoist all dependencies to the root folder and avoid installing duplicate dependencies, saving time and space. By default the `workspaces` config are setup so that `mu-plugins/10up-plugin` and all themes are treated as "packages", if you are building a new plugin/theme make sure to update `workspaces` in the `wp-content/package.json` See the example below:

```json
"workspaces": [
Expand All @@ -25,14 +27,14 @@ It contains a bare bones theme and must use plugin for you to base your developm
],
```
6. To build plugins/themes simply run `npm install` at the root and `npm run [build|start|watch]` and npm will automatically build all themes and plugins.
7. `npm workspaces` do not have the ability to run scripts from multiple packages in parrallel. Because of that we use the `npm-run-all` package and we define specific scripts in `package.json` so you will need to update the `watch:*` scripts in `package.json` and replace `tenup-theme` and `tenup-plugin` with the actual package names.
7. `npm workspaces` do not have the ability to run scripts from multiple packages in parrallel. Because of that we use the `npm-run-all` package and we define specific scripts in `package.json` so you will need to update the `watch:*` scripts in `wp-content/package.json` and replace `tenup-theme` and `tenup-plugin` with the actual package names.

```json
"watch:theme": "npm run watch -w=tenup-theme",
"watch:plugin": "npm run watch -w=tenup-plugin",
"watch": "run-s watch:theme watch:plugin",
```
7. To add npm dependencies to your theme and/or plugins add the `-w=package-name` flag to the `npm install` command. E.g: `npm install --save prop-types -w=tenup-plugin` **DO NOT RUN** `npm install` inside an individual workspace/package. Always run the from the root folder.
7. To add npm dependencies to your theme and/or plugins add the `-w=package-name` flag to the `npm install` command. E.g: `npm install --save prop-types -w=tenup-plugin` **DO NOT RUN** `npm install` inside an individual workspace/package. Always run the from the `wp-content` root folder ie. local themes should not have a `package-lock.json` file.
8. If you're building Gutenberg blocks and importing `@wordpress/*` packages, **you do not** need to manually install them as `10up-toolkit` will handle these packages properly.

## Scaffold Rules
Expand Down
Loading