Skip to content

Commit

Permalink
Major structural overhaul to the repo (#195)
Browse files Browse the repository at this point in the history
* Update packages to latest.

* Add start command for blocks

* Move all blocks to the src directory.

* Add the --webpack-copy-php flag to ensure all php file are copied to the build directory.

* Use the same version as Gutenberg.

* Remove lerna and update dependencies

* Add custom webpack to allow for one build process for all examples.

* Re-organize the repo and remove all build processes from each example.

* Ignore the non-JSX examples for the main linting command.

* Add the copywebpack plugin as a dependency.

* Finalize file naming and webpack.config.js set up.

* Linting fixes.

* Use a single .eslintrc for all code. Non-JSX examples contain their own for IDE integration.

* Update readme for developement instructions.

* Remove trailing comma.

* Rebuild.

* Update dynamic block to use new structure.

* Remove and gitigore the build directory.

* Use most recent node version.

* Regenerate package-lock.json after merge.

* Format JS files.

* Rename src directory to blocks-jsx.

* Rename non-JSX-examples directory to blocks-non-jsx.

* Update packcages and use --webpack-src-dir flag to point to blocks-jsx instead of src.

* Use nonBlockExamplesDir instead of otherFolder to better reflect the purpose of the variable.

* Create two separate build processes for blocks vs non-block examples.

* Create separate build process.

* Revert "Create two separate build processes for blocks vs non-block examples."

This reverts commit 9ac0fe9.

* Update node versions in action.

* Revert "Revert "Create two separate build processes for blocks vs non-block examples.""

This reverts commit d703499.

* Remove built files added incorrectly to repo.

* Run formatting on JS files.

* Add wp-prettier alias to address isses with the fork not being installed.

* Run npm install instead of ci

* Adding build commands.
  • Loading branch information
ryanwelcher committed May 11, 2022
1 parent fd7d35d commit 33348e9
Show file tree
Hide file tree
Showing 149 changed files with 16,298 additions and 34,413 deletions.
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
non-JSX-examples
build
node_modules
vendor
test
File renamed without changes.
39 changes: 19 additions & 20 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,24 @@ name: Node CI
on: [push]

jobs:
build:
build:
runs-on: ubuntu-latest

runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x]

strategy:
matrix:
node-version: [10.x, 12.x, 14.x]

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test
run: |
npm ci
# npm run lint:js
npm run lint:pkg-json
# npm test
env:
CI: true
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test
run: |
npm install
# npm run lint:js
npm run lint:pkg-json
# npm test
env:
CI: true
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Directories/files that may be generated by this project
node_modules
index.js.map
build
vendor

# Directories/files that may appear in your environment
.DS_Store
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/*
lts/*
31 changes: 0 additions & 31 deletions 01-basic-esnext/package.json

This file was deleted.

3 changes: 0 additions & 3 deletions 03-editable-esnext/.eslintrc

This file was deleted.

28 changes: 0 additions & 28 deletions 03-editable-esnext/package.json

This file was deleted.

3 changes: 0 additions & 3 deletions 04-controls-esnext/.eslintrc

This file was deleted.

28 changes: 0 additions & 28 deletions 04-controls-esnext/package.json

This file was deleted.

3 changes: 0 additions & 3 deletions 05-recipe-card-esnext/.eslintrc

This file was deleted.

28 changes: 0 additions & 28 deletions 05-recipe-card-esnext/package.json

This file was deleted.

3 changes: 0 additions & 3 deletions 06-inner-blocks-esnext/.eslintrc

This file was deleted.

28 changes: 0 additions & 28 deletions 06-inner-blocks-esnext/package.json

This file was deleted.

24 changes: 0 additions & 24 deletions 06-inner-blocks/block.js

This file was deleted.

3 changes: 0 additions & 3 deletions 07-slotfills-esnext/.eslintrc

This file was deleted.

27 changes: 0 additions & 27 deletions 07-slotfills-esnext/package.json

This file was deleted.

3 changes: 0 additions & 3 deletions 08-block-supports-esnext/.eslintrc

This file was deleted.

28 changes: 0 additions & 28 deletions 08-block-supports-esnext/package.json

This file was deleted.

24 changes: 0 additions & 24 deletions 08-block-supports-esnext/src/index.js

This file was deleted.

3 changes: 0 additions & 3 deletions 09-code-data-basics-esnext/.eslintrc

This file was deleted.

28 changes: 0 additions & 28 deletions 09-code-data-basics-esnext/package.json

This file was deleted.

3 changes: 0 additions & 3 deletions 10-dynamic-block/.eslintrc

This file was deleted.

0 comments on commit 33348e9

Please sign in to comment.