Skip to content

Commit 971daf5

Browse files
authored
Merge pull request #224 from Automattic/add/release-archive-preparation
Prepare release archive using composer
2 parents 788ecca + 3135e78 commit 971daf5

File tree

5 files changed

+59
-30
lines changed

5 files changed

+59
-30
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ insert_final_newline = true
1313
trim_trailing_whitespace = true
1414
indent_style = tab
1515

16-
[*.yml]
16+
[*.{yml,json}]
1717
indent_style = space
1818
indent_size = 2
1919

.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

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ before_script:
6868
exit 1
6969
;;
7070
esac
71+
composer global require "yoast/phpunit-polyfills:^1.0"
7172
fi
7273
- |
7374
# Install PHP_CodeSniffer if it's requested for this test

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: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
11
{
2-
"name": "syntaxhighlighter",
3-
"version": "3.6.0",
4-
"description": "Easily post syntax-highlighted code to your WordPress site without having to modify the code at all.",
5-
"homepage": "https://alex.blog/wordpress-plugins/syntaxhighlighter/",
6-
"author": "Alex Mills (Viper007Bond)",
7-
"license": "GPL-2.0-or-later",
8-
"repository": {
9-
"type": "git",
10-
"url": "git+https://github.com/Viper007Bond/syntaxhighlighter.git"
11-
},
12-
"bugs": {
13-
"url": "https://github.com/Viper007Bond/syntaxhighlighter/issues"
14-
},
15-
"scripts": {
16-
"start": "cgb-scripts start",
17-
"build": "cgb-scripts build",
18-
"distclean": "rm -rf node_modules && rm -rf dist",
19-
"preinstall": "npx npm-force-resolutions"
20-
},
21-
"dependencies": {
22-
"@wordpress/escape-html": "1.9.0",
23-
"cgb-scripts": "1.23.0",
24-
"classnames": "2.2.6",
25-
"lodash.unescape": "4.0.1",
26-
"npm-force-resolutions": "0.0.3"
27-
},
28-
"resolutions": {
29-
"mem": "4.0.0"
30-
}
2+
"name": "syntaxhighlighter",
3+
"version": "3.6.0",
4+
"description": "Easily post syntax-highlighted code to your WordPress site without having to modify the code at all.",
5+
"homepage": "https://alex.blog/wordpress-plugins/syntaxhighlighter/",
6+
"author": "Alex Mills (Viper007Bond)",
7+
"license": "GPL-2.0-or-later",
8+
"repository": {
9+
"type": "git",
10+
"url": "git+https://github.com/Viper007Bond/syntaxhighlighter.git"
11+
},
12+
"bugs": {
13+
"url": "https://github.com/Viper007Bond/syntaxhighlighter/issues"
14+
},
15+
"scripts": {
16+
"start": "cgb-scripts start",
17+
"build": "npm run build:assets && npm run archive",
18+
"build:assets": "cgb-scripts build",
19+
"distclean": "rm -rf node_modules && rm -rf dist",
20+
"preinstall": "npx npm-force-resolutions",
21+
"archive": "composer archive --file=$npm_package_name --format=zip"
22+
},
23+
"dependencies": {
24+
"@wordpress/escape-html": "1.9.0",
25+
"cgb-scripts": "1.23.0",
26+
"classnames": "2.2.6",
27+
"lodash.unescape": "4.0.1",
28+
"npm-force-resolutions": "0.0.3"
29+
},
30+
"resolutions": {
31+
"mem": "4.0.0"
32+
}
3133
}

0 commit comments

Comments
 (0)