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

Calypsoify: Copy the module code to the Calypsoify package #37339

Merged
merged 10 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
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
52 changes: 51 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions projects/packages/calypsoify/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
vendor/
node_modules/
build/
.cache/
21 changes: 21 additions & 0 deletions projects/packages/calypsoify/.phan/baseline.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/**
* This is an automatically generated baseline for Phan issues.
* When Phan is invoked with --load-baseline=path/to/baseline.php,
* The pre-existing issues listed in this file won't be emitted.
*
* This file can be updated by invoking Phan with --save-baseline=path/to/baseline.php
* (can be combined with --load-baseline)
*/
return [
// # Issue statistics:
// PhanTypeMismatchArgumentProbablyReal : 1 occurrence
// PhanTypeMismatchPropertyDefault : 1 occurrence

// Currently, file_suppressions and directory_suppressions are the only supported suppressions
'file_suppressions' => [
'src/class-jetpack-calypsoify.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchPropertyDefault'],
],
// 'directory_suppressions' => ['src/directory_name' => ['PhanIssueName1', 'PhanIssueName2']] can be manually added if needed.
// (directory_suppressions will currently be ignored by subsequent calls to --save-baseline, but may be preserved in future Phan releases)
];
8 changes: 5 additions & 3 deletions projects/packages/calypsoify/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# calypsoify
# Calypsoify

Calypsoify is designed to make sure specific wp-admin pages include navigation that prioritizes the Calypso navigation experience.

## How to install calypsoify
![](https://cldup.com/awmrHOWz7t.png)

## How to install Calypsoify

### Installation From Git Repo

Expand All @@ -20,5 +22,5 @@ Need to report a security vulnerability? Go to [https://automattic.com/security/

## License

calypsoify is licensed under [GNU General Public License v2 (or later)](./LICENSE.txt)
Calypsoify is licensed under [GNU General Public License v2 (or later)](./LICENSE.txt)

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: added

Calypsoify: Copy the code from the Jetpack module into the package.
13 changes: 9 additions & 4 deletions projects/packages/calypsoify/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"type": "jetpack-library",
"license": "GPL-2.0-or-later",
"require": {
"php": ">=7.0"
"php": ">=7.0",
"automattic/jetpack-status": "@dev"
},
"require-dev": {
"yoast/phpunit-polyfills": "1.1.0",
Expand All @@ -16,8 +17,12 @@
]
},
"scripts": {
"build-development": "echo 'Add your build step to composer.json, please!'",
"build-production": "echo 'Add your build step to composer.json, please!'",
"build-production": [
"pnpm run build-production"
],
"build-development": [
"pnpm run build"
],
"phpunit": [
"./vendor/phpunit/phpunit/phpunit --colors=always"
],
Expand Down Expand Up @@ -47,7 +52,7 @@
"mirror-repo": "Automattic/jetpack-calypsoify",
"textdomain": "jetpack-calypsoify",
"version-constants": {
"::PACKAGE_VERSION": "src/class-calypsoify.php"
"::PACKAGE_VERSION": "src/class-jetpack-calypsoify.php"
}
},
"suggest": {
Expand Down
31 changes: 25 additions & 6 deletions projects/packages/calypsoify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,30 @@
"license": "GPL-2.0-or-later",
"author": "Automattic",
"scripts": {
"build": "echo 'Not implemented.'",
"build-js": "echo 'Not implemented.'",
"build-production": "echo 'Not implemented.'",
"build-production-js": "echo 'Not implemented.'",
"clean": "true"
"build": "pnpm run clean && webpack --config ./webpack.config.calypsoify.js",
"build-production": "NODE_ENV=production BABEL_ENV=production pnpm run build && pnpm run validate",
"clean": "rm -rf build/ .cache/",
"validate": "pnpm exec validate-es --no-error-on-unmatched-pattern build/",
"watch": "pnpm run build --watch"
},
"devDependencies": {}
"dependencies": {
"@automattic/calypso-color-schemes": "3.1.3",
"postcss-custom-properties": "12.1.7"
},
"devDependencies": {
"@automattic/jetpack-webpack-config": "workspace:*",
"@automattic/remove-asset-webpack-plugin": "workspace:*",
"autoprefixer": "10.4.14",
"@csstools/postcss-global-data": "2.1.1",
"@babel/core": "7.24.0",
"@wordpress/browserslist-config": "5.39.0",
"@wordpress/dependency-extraction-webpack-plugin": "5.7.0",
"core-js": "3.23.5",
"postcss": "8.4.31",
"postcss-loader": "6.2.0",
"sass": "1.64.1",
"sass-loader": "12.4.0",
"webpack": "5.76.0",
"webpack-cli": "4.9.1"
}
}
21 changes: 21 additions & 0 deletions projects/packages/calypsoify/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = () => ( {
plugins: [
require( '@csstools/postcss-global-data' )( {
// Provide the properties that postcss-custom-properties is going to work with.
files: [ require.resolve( '@automattic/calypso-color-schemes/root-only/index.css' ) ],
} ),
require( 'postcss-custom-properties' )( {
// Use of `preserve: false` dates back to when we still used @automattic/calypso-build.
// Ideally we'd get rid of it to properly make use of CSS vars, but first we have to
// figure out how to ensure the vars actually get defined in the browser without
// including them in every bundle. Some base stylesheet (wp_register_style) the other
// stylesheets depend on maybe? And also deal with extremely generic vars like "--color-text".
//
// See also https://github.com/Automattic/jetpack/pull/13854#issuecomment-550898168,
// where people were confused about what was going on when calypso-build stopped
// including a postcss.config.js like this by default.
preserve: false,
} ),
require( 'autoprefixer' ),
],
} );
16 changes: 0 additions & 16 deletions projects/packages/calypsoify/src/class-calypsoify.php

This file was deleted.

Loading
Loading