-
Notifications
You must be signed in to change notification settings - Fork 0
v1 continuous integration #4
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
Changes from all commits
300af21
679bbe1
e8571bc
a356508
1027c28
3af667b
2d322bf
ac6b85a
56641f8
ec6f4de
a752fad
1579b84
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| .babelrc export-ignore | ||
| .eslintrc export-ignore | ||
| .nvmrc export-ignore | ||
| prettier.config.js export-ignore |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| name: Build and commit assets | ||
|
|
||
| on: [pull_request] | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| with: | ||
| repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
| ref: ${{ github.event.pull_request.head.ref }} | ||
|
|
||
| - name: Setup node | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version-file: '.nvmrc' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Build | ||
| run: npm run build | ||
|
|
||
| - name: Add & Commit | ||
| uses: EndBug/[email protected] | ||
| with: | ||
| add: build | ||
| message: 'Build production assets (from GitHub Actions)' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,16 @@ | ||
| # built assets | ||
| /build | ||
|
|
||
| # local environment | ||
| .env | ||
| error.log | ||
|
|
||
| # caching and debuging | ||
| # Deps | ||
| /node_modules | ||
| /vendor | ||
|
|
||
| vendor/**/* | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @braican similar question to my gitignore/build one... why are inner There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prob nevermind this Q, too as there's info in the PR description
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The reasoning here is similar to that of the static assets, with some additional context around the nuances of using Composer with a WordPress project. For some setup - this plugin uses PHP namespacing and includes an autoloader that is built by Composer, which gets added to the This is where things get interesting - if this was purely a PHP package that was getting included via Composer in a typical PHP project, it would be ok for us to omit the But we're talking about a WordPress application here. This package has its type set to The short version is that when using Composer to include this plugin in a WordPress project, the dependencies and autoloader of this package get added to a directory within the parent project where this package can't access them, which means we need to include any dependencies directly in source control. At the moment, this plugin doesn't require any external PHP packages to work so we only need to include the autoloader here in source control - if we do end up pulling in any external packages down the line, we'll also need to add an exception for those packages in the .gitignore to include them in source control as well. Note that there are a few dev-dependencies (things like linters) that will get installed when working on this plugin. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for writing that all out! @braican this makes me wonder: why publish this as a WordPress plugin and not as a plain Composer package? Are there advantages I don't see (other than making this discoverable/disable-able in the WP admin "Plugins" screen)? I'm happy with any plan here, btw, just curious if there's context.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a fair question - here's a couple of thoughts:
|
||
| !vendor/autoload.php | ||
| !vendor/composer | ||
| !vendor/composer/* | ||
|
|
||
| # caching and debuging | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| <?php return array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-plugins', 'wp-rich-text'), 'version' => '42166e9cbebc9b002fd7'); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| <?php | ||
|
|
||
| // autoload.php @generated by Composer | ||
|
|
||
| require_once __DIR__ . '/composer/autoload_real.php'; | ||
|
|
||
| return ComposerAutoloaderInite77806528b56491efceb0d413e19fe77::getLoader(); |
Uh oh!
There was an error while loading. Please reload this page.