mirror of
https://github.com/jawira/emoji-catalog.git
synced 2023-08-10 21:12:49 +03:00
Cleaning Emoji class removing comments #8
This commit is contained in:
parent
6e1b950d58
commit
2e1c82f6cb
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -6,3 +6,6 @@
|
||||
/resources export-ignore
|
||||
/build.xml export-ignore
|
||||
/build.png export-ignore
|
||||
/CONTRIBUTING.md export-ignore
|
||||
/README.md export-ignore
|
||||
/CHANGELOG.md export-ignore
|
||||
|
@ -11,6 +11,10 @@
|
||||
|
||||
## Unreleased
|
||||
|
||||
### Changed
|
||||
|
||||
- [#8] Cleaning Emoji class removing comments, from 468K to 157K.
|
||||
|
||||
## [v2.0.0] - 2020-03-12
|
||||
|
||||
### Changed
|
||||
@ -43,7 +47,7 @@
|
||||
- [#2] Constant `Emoji::FLAG_WALES` was changed to `Emoji::FLAG_GBWLS`.
|
||||
|
||||
## [v0.0.0] - 2019-08-30
|
||||
[!6F(t#}P9Uyq&98
|
||||
|
||||
### Added
|
||||
|
||||
- First working version.
|
||||
|
BIN
build.png
BIN
build.png
Binary file not shown.
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 65 KiB |
25
build.xml
25
build.xml
@ -1,20 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<project name="Emoji catalog" default="diagnostics" phingVersion="3">
|
||||
<project name="Emoji catalog" default="help" phingVersion="3">
|
||||
|
||||
<defaultexcludes default="true"/><!--Initializing default excludes-->
|
||||
<defaultexcludes add="**/.idea"/>
|
||||
<defaultexcludes add="**/.idea/**"/>
|
||||
<property name="phing.http.proxy" value="${env.http_proxy}"/>
|
||||
|
||||
<target name="diagnostics">
|
||||
<diagnostics/>
|
||||
<target name="help">
|
||||
<exec executable="xdg-open" spawn="true">
|
||||
<arg path="build.png"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="setup" description="Prepare project for dev" depends="diagnostics, composer:install, phing:visualizer"/>
|
||||
<target name="setup" description="Prepare project for dev" depends="composer:install, phing:visualizer"/>
|
||||
<target name="qa" description="Quality assurance" depends="composer:validate, php:lint"/>
|
||||
<target name="update" description="Update class and catalog" depends="emoji:update, catalog:update"/>
|
||||
<target name="emoji:update" description="Update Emoji.php" depends="emoji-list:download, emoji:parse, emoji:build"/>
|
||||
<target name="emoji:update" description="Update Emoji.php"
|
||||
depends="emoji-list:download, emoji:parse, emoji:build, emoji:clean"/>
|
||||
<target name="catalog:update" description="Update catalog.md"
|
||||
depends="emoji-list:download, catalog:parse, catalog:build"/>
|
||||
|
||||
@ -23,6 +26,7 @@
|
||||
<arg value="--no-interaction"/>
|
||||
<arg value="--profile"/>
|
||||
<arg value="--strict"/>
|
||||
<arg value="--quiet"/>
|
||||
</composer>
|
||||
</target>
|
||||
|
||||
@ -91,6 +95,17 @@
|
||||
<append file="resources/templates/emoji-footer.php.dist" destFile="src/Emoji.php"/>
|
||||
</target>
|
||||
|
||||
<target name="emoji:clean" description="Reduce Emoji.php size">
|
||||
<reflexive file="src/Emoji.php">
|
||||
<filterchain>
|
||||
<stripphpcomments/>
|
||||
<linecontainsregexp>
|
||||
<regexp pattern="\S"/>
|
||||
</linecontainsregexp>
|
||||
</filterchain>
|
||||
</reflexive>
|
||||
</target>
|
||||
|
||||
<target name="catalog:parse">
|
||||
<mkdir dir="resources/output"/>
|
||||
<delete file="resources/output/catalog-1.txt"/>
|
||||
|
19
docs/dev.md
19
docs/dev.md
@ -4,7 +4,18 @@ Dev notes
|
||||
Update emoji class
|
||||
------------------
|
||||
|
||||
1. Run `phing update` and see if you had new emojis (you can see differences with `phing emoji:count`)
|
||||
2. Update Readme (e.g. file badge)
|
||||
3. Update changelog
|
||||
4. Create a tag (version should be the same as Emoji unicode)
|
||||
1. Run `$ phing setup update qa` and see if you had new emojis (you can also use
|
||||
`$ phing emoji:count` before and after update)
|
||||
2. Be aware that emojis can change its name without reason (ex: DIRECT_HIT →
|
||||
BULLSEYE). This forces me to publish a major version 👎.
|
||||
3. Update Readme: badges, emoji count, ...
|
||||
4. Update CHANGELOG.md
|
||||
|
||||
Cleaning Emoji.php
|
||||
------------------
|
||||
|
||||
Emoji.php is generated with descriptive comments for each constant.
|
||||
The comments are striped later to [avoid impacting OP_CACHE in production
|
||||
environments][issue-8].
|
||||
|
||||
[issue-8]: https://github.com/jawira/emoji-catalog/issues/8
|
||||
|
19838
src/Emoji.php
19838
src/Emoji.php
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user