Skip to content

Commit 8894125

Browse files
committed
Prepare release archive using composer
1 parent 788ecca commit 8894125

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
.idea
33
dist/
44
node_modules
5+
/vendor/
6+
/*.zip

composer.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "automattic/syntaxhighlighter",
3+
"description": "Easily post syntax-highlighted code to your WordPress site without having to modify the code at all.",
4+
"type": "wordpress-plugin",
5+
"license": "GPL-2.0-or-later",
6+
"require": {},
7+
"archive": {
8+
"exclude": [
9+
"/*",
10+
"!/dist",
11+
"!/syntaxhighlighter2",
12+
"!/syntaxhighlighter3",
13+
"!/third-party-brushes",
14+
"!/syntaxhighlighter_mce-4.js",
15+
"!/syntaxhighlighter_mce.js",
16+
"!/syntaxhighlighter.js",
17+
"!/syntaxhighlighter.php",
18+
"!/readme.txt",
19+
".DS_Store",
20+
".*",
21+
"*.test.js"
22+
]
23+
}
24+
}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
"start": "cgb-scripts start",
1717
"build": "cgb-scripts build",
1818
"distclean": "rm -rf node_modules && rm -rf dist",
19-
"preinstall": "npx npm-force-resolutions"
19+
"preinstall": "npx npm-force-resolutions",
20+
"archive": "composer archive --file=$npm_package_name --format=zip",
21+
"release": "npm run build && npm run archive"
2022
},
2123
"dependencies": {
2224
"@wordpress/escape-html": "1.9.0",

0 commit comments

Comments
 (0)