Fix bin/publish: copy docs.dist from project root

Fix bin/publish: use correct .env path for rspade_system
Fix bin/publish script: prevent grep exit code 1 from terminating script

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-10-21 02:08:33 +00:00
commit f6fac6c4bc
79758 changed files with 10547827 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
# Contributing
Contributions are **welcome** and will be fully **credited**.
Please read and understand the contribution guide before creating an issue or pull request.
## Etiquette
This project is open source, and as such, the maintainers give their free time to build and maintain the source code
held within. They make the code freely available in the hope that it will be of use to other developers. It would be
extremely unfair for them to suffer abuse or anger for their hard work.
Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the
world that developers are civilized and selfless people.
It's the duty of the maintainer to ensure that all submissions to the project are of sufficient
quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used.
## Viability
When requesting or submitting new features, first consider whether it might be useful to others. Open
source projects are used by many developers, who may have entirely different needs to your own. Think about
whether or not your feature is likely to be used by other users of the project.
## Procedure
Before filing an issue:
- Attempt to replicate the problem, to ensure that it wasn't a coincidental incident.
- Check to make sure your feature suggestion isn't already present within the project.
- Check the pull requests tab to ensure that the bug doesn't have a fix in progress.
- Check the pull requests tab to ensure that the feature isn't already in progress.
Before submitting a pull request:
- Check the codebase to ensure that your feature doesn't already exist.
- Check the pull requests to ensure that another person hasn't already submitted the feature or fix.
## Requirements
If the project maintainer has any additional requirements, you will find them listed here.
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](https://pear.php.net/package/PHP_CodeSniffer).
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option.
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](https://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
**Happy coding**!

View File

@@ -0,0 +1 @@
github: spatie

View File

@@ -0,0 +1,3 @@
# Security Policy
If you discover any security related issues, please email freek@spatie.be instead of using the issue tracker.

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/highlightjs-blade.iml" filepath="$PROJECT_DIR$/.idea/highlightjs-blade.iml" />
</modules>
</component>
</project>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@@ -0,0 +1,3 @@
# Changelog
All notable changes to `highlightjs-blade` will be documented in this file

View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) Spatie <info@spatie.be>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -0,0 +1,144 @@
# Blade language definition for Highlight.js
Syntax implementation of [Laravel's](https://laravel.com/)'s Blade language
for [highlight.js](https://github.com/highlightjs/highlight.js).
## Support us
[<img src="https://github-ads.s3.eu-central-1.amazonaws.com/highlightjs-blade.jpg?t=1" width="419px" />](https://spatie.be/github-ad-click/highlightjs-blade)
We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can
support us by [buying one of our paid products](https://spatie.be/open-source/support-us).
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.
You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards
on [our virtual postcard wall](https://spatie.be/open-source/postcards).
## Installation
This package can be installed from NPM using `npm` or `yarn`:
```bash
yarn install highlightjs-blade
```
## Usage
Simply include the Highlight.js library in your webpage or Node app, then load this module.
### With Node or another build system
If you're using Node / Webpack / Rollup / Browserify, etc, simply require the language module, then register it with
Highlight.js.
```javascript
var hljs = require('highlightjs');
var hljsBlade = require('highlightjs-blade');
hljs.registerLanguage("blade", hljsBlade);
hljs.initHighlightingOnLoad();
```
### Static website or simple usage
Simply load the module after loading Highlight.js. You'll use the minified version found in the `dist` directory. This
module is just a CDN build of the language, so it will register itself as the Javascript is loaded.
```html
<script type="text/javascript" src="/path/to/highlight.min.js"></script>
<script
type="text/javascript" charset="UTF-8"
src="/path/to/highlightjs-blade/dist/blade.min.js"
></script>
<script type="text/javascript">
hljs.initHighlightingOnLoad();
</script>
```
### Using directly from the UNPKG CDN
```html
<script
type="text/javascript"
src="https://unpkg.com/highlightjs-blade/dist/blade.min.js"
></script>
```
- More info: <https://unpkg.com>
### React
You need to import both Highlight.js and third-party language like Blade:
```js
import React, {Component} from 'react';
import 'highlight.js/scss/darcula.scss'; // your favourite theme
import blade from './blade'; // TODO: Figure out exact path in package
import hljs from 'highlight.js';
hljs.registerLanguage('blade', blade);
class Highlighter extends Component {
constructor(props) {
super(props);
hljs.initHighlightingOnLoad();
}
render() {
let {children} = this.props;
return
{
<pre ref={(node) => this.node = node}>
<code className="blade">
{children}
</code>
</pre>
}
}
}
export default Highlighter;
```
## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.
### Building
⚠️ These instructions are only for contributing to this package. If you just want to use the language definition, please
refer to the [Usage](#usage) section above.
To build a distribution version of this module you need to use tools provided by Highlight.js. Please refer to the [language contribution guide](https://github.com/highlightjs/highlight.js/blob/main/extra/3RD_PARTY_QUICK_START.md) for more details on building this package.
1. Checkout `highlightjs/highlight.js` from GitHub.
2. Create the `extra` folder in the root directory, if missing.
3. In the `extra` directory create a `blade` subdirectory and put the contents of this repository there.
4. Run build tools for the `cdn` target and you should see the `blade` language module being build alongside
Highlight.js itself:
```
node ./tools/build.js -t cdn
...
Building extra\blade\dist/blade.min.js.
```
## Security Vulnerabilities
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
## Credits
- [Alex Vanderbist](https://github.com/alexvanderbist)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

View File

@@ -0,0 +1,15 @@
/*! `blade` grammar compiled for Highlight.js 11.4.0 */
var hljsGrammar=(()=>{"use strict";return e=>({name:"Blade",case_insensitive:!0,
subLanguage:"php-template",contains:[e.COMMENT(/\{\{--/,/--\}\}/),{
className:"template-variable",begin:/\{\{/,starts:{end:/\}\}/,returnEnd:!0,
subLanguage:"php"}},{className:"template-variable",begin:/\}\}/},{
className:"template-variable",begin:/\{\{\{/,starts:{end:/\}\}\}/,returnEnd:!0,
subLanguage:"php"}},{className:"template-variable",begin:/\}\}\}/},{
className:"template-variable",begin:/\{!!/,starts:{end:/!!\}/,returnEnd:!0,
subLanguage:"php"}},{className:"template-variable",begin:/!!\}/},{
className:"template-tag",begin:/@php\(/,starts:{end:/\)/,returnEnd:!0,
subLanguage:"php"},relevance:15},{className:"template-tag",begin:/@php/,starts:{
end:/@endphp/,returnEnd:!0,subLanguage:"php"},relevance:10},{className:"attr",
begin:/:[\w-]+="/,starts:{end:/"(?=\s|\n|\/)/,returnEnd:!0,subLanguage:"php"}},{
begin:/@\w+/,end:/\W/,excludeEnd:!0,className:"template-tag"}]})})()
;export default hljsGrammar;

View File

@@ -0,0 +1,15 @@
/*! `blade` grammar compiled for Highlight.js 11.4.0 */
(()=>{var e=(()=>{"use strict";return e=>({name:"Blade",case_insensitive:!0,
subLanguage:"php-template",contains:[e.COMMENT(/\{\{--/,/--\}\}/),{
className:"template-variable",begin:/\{\{/,starts:{end:/\}\}/,returnEnd:!0,
subLanguage:"php"}},{className:"template-variable",begin:/\}\}/},{
className:"template-variable",begin:/\{\{\{/,starts:{end:/\}\}\}/,returnEnd:!0,
subLanguage:"php"}},{className:"template-variable",begin:/\}\}\}/},{
className:"template-variable",begin:/\{!!/,starts:{end:/!!\}/,returnEnd:!0,
subLanguage:"php"}},{className:"template-variable",begin:/!!\}/},{
className:"template-tag",begin:/@php\(/,starts:{end:/\)/,returnEnd:!0,
subLanguage:"php"},relevance:15},{className:"template-tag",begin:/@php/,starts:{
end:/@endphp/,returnEnd:!0,subLanguage:"php"},relevance:10},{className:"attr",
begin:/:[\w-]+="/,starts:{end:/"(?=\s|\n|\/)/,returnEnd:!0,subLanguage:"php"}},{
begin:/@\w+/,end:/\W/,excludeEnd:!0,className:"template-tag"}]})})()
;hljs.registerLanguage("blade",e)})();

View File

@@ -0,0 +1,120 @@
/**
* Based on https://github.com/highlightjs/highlight.js/blob/main/src/languages/php-template.js
* and https://github.com/miken32/highlightjs-blade.
*/
module.exports = function (hljs) {
const COMMENT = hljs.COMMENT(/\{\{--/, /--\}\}/);
// {{ $escapedTemplateVariable }}
const ESCAPED_TEMPLATE_VARIABLE = {
className: 'template-variable',
begin: /\{\{/,
starts: {
end: /\}\}/,
returnEnd: true,
subLanguage: 'php',
},
};
// `}}` - just in case we're highlighting a partial file
const ESCAPED_TEMPLATE_VARIABLE_END = {
className: 'template-variable',
begin: /\}\}/,
};
// {{{ $likeThis }}}
const ESCAPED_TEMPLATE_VARIABLE_WITH_TRIPLE_CURLY_BRACKETS = {
className: 'template-variable',
begin: /\{\{\{/,
starts: {
end: /\}\}\}/,
returnEnd: true,
subLanguage: 'php',
},
};
// `}}}` - just in case we're highlighting a partial file
const ESCAPED_TEMPLATE_VARIABLE_WITH_TRIPLE_CURLY_BRACKETS_END = {
className: 'template-variable',
begin: /\}\}\}/,
};
// {!! $hello !!}
const UNESCAPED_TEMPLATE_VARIABLE = {
className: 'template-variable',
begin: /\{!!/,
starts: {
end: /!!\}/,
returnEnd: true,
subLanguage: 'php',
},
}
const UNESCAPED_TEMPLATE_VARIABLE_END = {
className: 'template-variable',
begin: /!!\}/,
};
// @php($a = 2)
const SINGLE_LINE_PHP_DIRECTIVE = {
className: 'template-tag',
begin: /@php\(/,
starts: {
end: /\)/,
returnEnd: true,
subLanguage: 'php',
},
relevance: 15,
};
// @php $a = 1 @endphp
const MULTI_LINE_PHP_DIRECTIVE = {
className: 'template-tag',
begin: /@php/,
starts: {
end: /@endphp/,
returnEnd: true,
subLanguage: 'php',
},
relevance: 10,
};
// :blade-value="$phpVar"
const BLADE_COMPONENT_ATTRIBUTE = {
className: 'attr',
begin: /:[\w-]+="/,
starts: {
end: /"(?=\s|\n|\/)/,
returnEnd: true,
subLanguage: 'php',
},
};
// @something
const CATCH_ALL_DIRECTIVE = {
begin: /@\w+/,
end: /\W/,
excludeEnd: true,
className: 'template-tag',
};
return {
name: 'Blade',
case_insensitive: true,
subLanguage: 'php-template',
contains: [
COMMENT,
ESCAPED_TEMPLATE_VARIABLE,
ESCAPED_TEMPLATE_VARIABLE_END,
ESCAPED_TEMPLATE_VARIABLE_WITH_TRIPLE_CURLY_BRACKETS,
ESCAPED_TEMPLATE_VARIABLE_WITH_TRIPLE_CURLY_BRACKETS_END,
UNESCAPED_TEMPLATE_VARIABLE,
UNESCAPED_TEMPLATE_VARIABLE_END,
SINGLE_LINE_PHP_DIRECTIVE,
MULTI_LINE_PHP_DIRECTIVE,
BLADE_COMPONENT_ATTRIBUTE,
CATCH_ALL_DIRECTIVE
],
};
}