Skip to content

Commit 37eed2f

Browse files
Merge branch 'develop' into feature/release-automation
2 parents e9a5ed4 + b5fb4e7 commit 37eed2f

113 files changed

Lines changed: 10592 additions & 12457 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.eslintignore‎

Lines changed: 0 additions & 6 deletions
This file was deleted.

‎.eslintrc.json‎

Lines changed: 0 additions & 30 deletions
This file was deleted.

‎.github/workflows/build-docs.yml‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
release:
8+
types: [published]
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
hookdocs:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: '22'
25+
cache: 'npm'
26+
27+
- name: Install dependencies
28+
run: npm ci
29+
30+
- name: Build docs
31+
run: npm run build:docs
32+
33+
- name: Deploy to GitHub Pages
34+
uses: peaceiris/actions-gh-pages@v4
35+
with:
36+
github_token: ${{ secrets.GITHUB_TOKEN }}
37+
publish_dir: ./docs

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,6 @@ package/dist
6161

6262
# PHPStan result cache
6363
/.phpstan-cache/
64+
65+
# Generated docs (published to gh-pages by workflow)
66+
/docs/

‎.hookdoc/layout.tmpl‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title><?js= title ?> - Cloudinary Docs</title>
6+
7+
<script src="scripts/prettify/prettify.js"></script>
8+
<script src="scripts/prettify/lang-css.js"></script>
9+
<!--[if lt IE 9]>
10+
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11+
<![endif]-->
12+
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
13+
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
14+
15+
<link
16+
href="https://fonts.googleapis.com/css?family=IBM+Plex+Mono|IBM+Plex+Sans:300,400|Playfair+Display:900&display=swap"
17+
rel="stylesheet">
18+
</head>
19+
20+
<body>
21+
22+
<div id="main">
23+
24+
<?js if (title !== 'Home') { ?>
25+
<h1 class="page-title"><?js= title ?></h1>
26+
<?js } ?>
27+
28+
<?js= content ?>
29+
</div>
30+
31+
<nav>
32+
<?js= this.nav ?>
33+
</nav>
34+
35+
<br class="clear">
36+
37+
<footer>
38+
<a href="https://cloudinary.com/" target="_blank" rel="noopener noreferrer">Cloudinary</a> |
39+
<a href="https://github.com/cloudinary/cloudinary_wordpress/" target="_blank" rel="noopener noreferrer">Cloudinary
40+
on GitHub</a>
41+
</footer>
42+
43+
<script> prettyPrint(); </script>
44+
<script src="scripts/linenumber.js"></script>
45+
</body>
46+
</html>

‎css/cloudinary.css‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎css/gallery-ui.css‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎eslint.config.js‎

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
const globals = require( 'globals' );
2+
const wpPlugin = require( '@wordpress/eslint-plugin' );
3+
4+
// eslint-import-resolver-typescript v4+ is incompatible with eslint-plugin-import
5+
// (throws "invalid interface loaded as resolver"), and this project has no TypeScript
6+
// anyway, so strip the typescript resolver that @wordpress/eslint-plugin configures.
7+
const recommended = wpPlugin.configs.recommended.map( ( config ) => {
8+
if ( ! config.settings || ! config.settings[ 'import/resolver' ] ) {
9+
return config;
10+
}
11+
const { typescript, ...resolver } = config.settings[ 'import/resolver' ];
12+
return {
13+
...config,
14+
settings: {
15+
...config.settings,
16+
'import/resolver': resolver,
17+
},
18+
};
19+
} );
20+
21+
module.exports = [
22+
{
23+
ignores: [
24+
'**/build/**',
25+
'**/built/**',
26+
'**/node_modules/**',
27+
'**/vendor/**',
28+
'js/**',
29+
'**/*.min.js',
30+
// Vendored third-party library (https://github.com/kallookoo/wp-color-picker-alpha).
31+
'src/js/wp-color-picker-alpha.js',
32+
],
33+
},
34+
...recommended,
35+
{
36+
settings: {
37+
'import/resolver': {
38+
node: true,
39+
},
40+
},
41+
languageOptions: {
42+
globals: {
43+
...globals.browser,
44+
cloudinary: 'readonly',
45+
jQuery: 'readonly',
46+
$: 'readonly',
47+
CLDN: 'readonly',
48+
CLDLB: 'readonly',
49+
CLD_GLOBAL_TRANSFORMATIONS: 'readonly',
50+
samplePlayer: 'readonly',
51+
CLDCACHE: 'readonly',
52+
cldData: 'readonly',
53+
CLD_METADATA: 'readonly',
54+
CLDASSETS: 'readonly',
55+
},
56+
},
57+
rules: {
58+
'no-alert': 'off',
59+
'no-console': 'off',
60+
'no-unused-vars': 'off',
61+
'no-nested-ternary': 'off',
62+
'jsx-a11y/click-events-have-key-events': 'off',
63+
'react-hooks/rules-of-hooks': 'error',
64+
'react-hooks/exhaustive-deps': 'warn',
65+
'@wordpress/no-global-event-listener': 'off',
66+
// CLD_Deactivate is a wp_localize_script object name (php/class-deactivation.php);
67+
// renaming it would require a matching PHP-side change.
68+
camelcase: [
69+
'error',
70+
{ properties: 'never', allow: [ '^CLD_Deactivate$' ] },
71+
],
72+
},
73+
},
74+
];

‎hookdoc-conf.json‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"opts": {
3+
"destination": "docs",
4+
"template": "node_modules/wp-hookdoc/template",
5+
"recurse": true,
6+
"readme": "./README.md"
7+
},
8+
"source": {
9+
"includePattern": ".+\\.(php|inc)?$"
10+
},
11+
"plugins": [
12+
"node_modules/wp-hookdoc/plugin"
13+
],
14+
"templates": {
15+
"default": {
16+
"layoutFile": ".hookdoc/layout.tmpl"
17+
}
18+
}
19+
}

‎js/asset-edit.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)