Automattic/syntaxhighlighter
À propos
WordPress plugin that makes it easy to post syntax-highlighted code snippets.
Développement web et applicatifProgression mesurée des étoiles
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- +1
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
OriginalSyntaxHighlighter Evolved
Easily post syntax-highlighted code to your WordPress site without having to modify the code at all. As seen on WordPress.com.
Supports the new Gutenberg editor!
Development
You need Docker, Node and Composer. Run make help to list every target.
make installinstalls the Composer and npm dependencies.make upstarts WordPress with the plugin active at http://localhost:8890 (log in with admin/password).make downstops it.make testruns the PHPUnit suite in a separate test site on port 8891, so it never touches your development site. PassARGS="--filter test_name"to run some of it.make test-jsruns the JavaScript tests intests/jswith Node's built-in test runner.make statusshows whether this checkout's sites are running, their URLs, and the install path, whose name the containers start with.Each checkout gets its own containers, named after its directory. To run a second checkout, such as a git worktree, at the same time, give it other ports in two gitignored files, which every
maketarget then uses:echo '{ "port": 8892 }' > .wp-env.override.json echo '{ "port": 8893 }' > .wp-env.tests.override.jsonFor a one-off,
WP_ENV_PORTandWP_ENV_TESTS_PORToverride them, e.g.WP_ENV_PORT=8894 make up.make lintruns PHP CodeSniffer on the lines you changed sincetrunk.make lint-allchecks every file.
Releasing
The release scripts are shared with other plugins, so scripts/prepare-release.mjs, scripts/create-release.mjs and scripts/RELEASE_PR_TEMPLATE.md.mjs are the same in all of them. Settings for this plugin are in release.config.json.
- Create a milestone named after the version, and add the merged pull requests to it.
- Check "Tested up to" in
syntaxhighlighter.phpandreadme.txt. WordPress.org shows the one insyntaxhighlighter.php. - Run
make release VERSION=x.y.zontrunk. It updates the version and opens a release pull request. - Edit the release notes in the pull request's description. They become the changelog entry.
- Merge it. That publishes the plugin: the workflow writes the changelog, creates the tag and the GitHub release, and commits the plugin to WordPress.org.
readme.txt keeps the five newest changelog entries, and the workflow deletes the oldest one. Copy that one to changelog.txt in the release pull request to keep it.
The workflow needs two repository secrets: WORDPRESSORG_SVN_USERNAME and WORDPRESSORG_SVN_PASSWORD.
Block Development Workflow
Source code is located in the src folder.
When making changes to the block:
- Run
make start(npm start) to build a development version with file watching. - Run
make build(npm run build) to build a minified production file.
Explorer des projets similaires
Chargement…