diff --git a/.editorconfig b/.editorconfig index a541e47..7b01f6b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -13,7 +13,7 @@ insert_final_newline = true trim_trailing_whitespace = true indent_style = tab -[*.yml] +[*.{yml,json}] indent_style = space indent_size = 2 diff --git a/.gitignore b/.gitignore index f81709a..ee2f24c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ .idea dist/ node_modules +/vendor/ +/*.zip diff --git a/.travis.yml b/.travis.yml index f6725de..486948d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -68,6 +68,7 @@ before_script: exit 1 ;; esac + composer global require "yoast/phpunit-polyfills:^1.0" fi - | # Install PHP_CodeSniffer if it's requested for this test diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..a93c4c7 --- /dev/null +++ b/composer.json @@ -0,0 +1,24 @@ +{ + "name": "automattic/syntaxhighlighter", + "description": "Easily post syntax-highlighted code to your WordPress site without having to modify the code at all.", + "type": "wordpress-plugin", + "license": "GPL-2.0-or-later", + "require": {}, + "archive": { + "exclude": [ + "/*", + "!/dist", + "!/syntaxhighlighter2", + "!/syntaxhighlighter3", + "!/third-party-brushes", + "!/syntaxhighlighter_mce-4.js", + "!/syntaxhighlighter_mce.js", + "!/syntaxhighlighter.js", + "!/syntaxhighlighter.php", + "!/readme.txt", + ".DS_Store", + ".*", + "*.test.js" + ] + } +} diff --git a/package.json b/package.json index 89f80ed..62e5867 100644 --- a/package.json +++ b/package.json @@ -1,31 +1,33 @@ { - "name": "syntaxhighlighter", - "version": "3.6.0", - "description": "Easily post syntax-highlighted code to your WordPress site without having to modify the code at all.", - "homepage": "https://alex.blog/wordpress-plugins/syntaxhighlighter/", - "author": "Alex Mills (Viper007Bond)", - "license": "GPL-2.0-or-later", - "repository": { - "type": "git", - "url": "git+https://github.com/Viper007Bond/syntaxhighlighter.git" - }, - "bugs": { - "url": "https://github.com/Viper007Bond/syntaxhighlighter/issues" - }, - "scripts": { - "start": "cgb-scripts start", - "build": "cgb-scripts build", - "distclean": "rm -rf node_modules && rm -rf dist", - "preinstall": "npx npm-force-resolutions" - }, - "dependencies": { - "@wordpress/escape-html": "1.9.0", - "cgb-scripts": "1.23.0", - "classnames": "2.2.6", - "lodash.unescape": "4.0.1", - "npm-force-resolutions": "0.0.3" - }, - "resolutions": { - "mem": "4.0.0" - } + "name": "syntaxhighlighter", + "version": "3.6.0", + "description": "Easily post syntax-highlighted code to your WordPress site without having to modify the code at all.", + "homepage": "https://alex.blog/wordpress-plugins/syntaxhighlighter/", + "author": "Alex Mills (Viper007Bond)", + "license": "GPL-2.0-or-later", + "repository": { + "type": "git", + "url": "git+https://github.com/Viper007Bond/syntaxhighlighter.git" + }, + "bugs": { + "url": "https://github.com/Viper007Bond/syntaxhighlighter/issues" + }, + "scripts": { + "start": "cgb-scripts start", + "build": "npm run build:assets && npm run archive", + "build:assets": "cgb-scripts build", + "distclean": "rm -rf node_modules && rm -rf dist", + "preinstall": "npx npm-force-resolutions", + "archive": "composer archive --file=$npm_package_name --format=zip" + }, + "dependencies": { + "@wordpress/escape-html": "1.9.0", + "cgb-scripts": "1.23.0", + "classnames": "2.2.6", + "lodash.unescape": "4.0.1", + "npm-force-resolutions": "0.0.3" + }, + "resolutions": { + "mem": "4.0.0" + } }