diff --git a/.gitignore b/.gitignore index 76e0985..3e29d1f 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,6 @@ coverage/ dist/ node_modules/ +remark-autolink-headings.js +remark-autolink-headings.min.js yarn.lock diff --git a/.prettierignore b/.prettierignore index 009af54..53f9c24 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,4 @@ -dist -coverage +coverage/ +dist/ +remark-autolink-headings.js +remark-autolink-headings.min.js diff --git a/.travis.yml b/.travis.yml index e108609..52560ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,3 +3,13 @@ node_js: - lts/dubnium - node after_script: bash <(curl -s https://codecov.io/bash) +deploy: + provider: releases + skip_cleanup: true + api_key: + secure: AVEbMSkXqiotV4eI7EaWMw0EF6lleyTUPoPDV0o6VYQN7N0iuujjt7RvGOET6Hbk6EkMhJ/HIthNNqFBZlcntBJFXt9HiK8jIl/qI+UNp4e+viD5EQ8ZoA7OHnXadQuT0Xkft7q96wsrTne1xWNC8Psv1iLA4TpKKXZBYjYg4q692Gm0qDhuwqJXCSLSUxEE40+5UbuuZ15cPvxqaXhobhiWay2yNuvvLtDZrSMWXTKw5KTCiNS5LbC3XQm9peMqm+Yt94SvpNpUqok8SMi23ktwJxQRLLbqaksJQBFG+88Ek7zY03yJa7Gpn1IqJgw8+eHfwDJRpJlusvFClrDEtMQc2AVtYSnlXZ9jmW7s+D34/9jby1eW3vXUNnmCBvk4VXGx8lktDNthtpNOM6ZMsqlrblVoLDE17kMZkEZkkX9Zl8JPvTmN2id925qBl4Lyo/VjDyVxwOSayQOz5NgTyfagru/amnobTPupU04oEqHS1iiRHXd337sAEXS4wiWAmNVyeM7uh3QGBqUPab8LblHgcVW6KQXv7bI2AOr7RKdloCmmHIDMrk1kpd8gA6QEvq91+gFVmqnmGTIdD0cHffcV+TgROstypo0FHr1s5tseq7oD1+aDOtjYqCLJz/4LmHdwACWtkPf7DmPj/8AqttipPhTbbRHj0fd2mCs/9r4= + file: + - 'remark-autolink-headings.js' + - 'remark-autolink-headings.min.js' + on: + tags: true diff --git a/package.json b/package.json index e2c1d04..5a1532b 100644 --- a/package.json +++ b/package.json @@ -37,22 +37,27 @@ "@babel/register": "^7.0.0", "ava": "2.0.0", "babel-plugin-add-module-exports": "^1.0.0", + "browserify": "^16.0.0", "nyc": "^14.0.0", "prettier": "^1.0.0", "remark": "^10.0.0", "remark-cli": "^6.0.0", "remark-html": "^9.0.0", - "remark-slug": "^5.0.0", "remark-preset-wooorm": "^5.0.0", + "remark-slug": "^5.0.0", + "tinyify": "^2.0.0", "xo": "^0.24.0" }, "scripts": { - "prepublishOnly": "npm run build", - "build": "babel src --out-dir dist --ignore src/**/__tests__", + "prepublishOnly": "npm run compile", "format": "remark . -qfo && prettier \"**/*.js\" --write && xo --fix", + "compile": "babel src --out-dir dist --ignore src/**/__tests__", + "build-bundle": "browserify . -s remarkAutolinkHeadings -o remark-autolink-headings.js", + "build-mangle": "browserify . -s remarkAutolinkHeadings -p tinyify -o remark-autolink-headings.min.js", + "bundle": "npm run build-bundle && npm run build-mangle", "test-api": "ava", "test-coverage": "nyc --reporter lcov ava", - "test": "npm run build && npm run format && npm run test-coverage" + "test": "npm run compile && npm run format && npm run bundle && npm run test-coverage" }, "browserslist": "> 2.5%, node 6", "babel": {