├── .babelrc ├── .editorconfig ├── .eslintrc ├── .gitignore ├── .npmignore ├── .nvmrc ├── .travis.yml ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── karma.config.js ├── logo.png ├── package-lock.json ├── package.json └── src ├── Helmet.js ├── HelmetConstants.js └── test └── HelmetTest.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "latest", 5 | { 6 | "es2015": { 7 | "modules": false 8 | } 9 | } 10 | ], 11 | "stage-0" 12 | ], 13 | "plugins": [ 14 | [ 15 | "transform-react-jsx", { 16 | "pragma": "h" 17 | } 18 | ] 19 | ], 20 | "env": { 21 | "commonjs": { 22 | "plugins": [ 23 | "add-module-exports", 24 | [ 25 | "transform-es2015-modules-commonjs", 26 | { 27 | "loose": true, 28 | "strict": false 29 | } 30 | ] 31 | ] 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 4 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [package.json] 13 | indent_style = space 14 | indent_size = 2 15 | 16 | [.travis.yml] 17 | indent_style = space 18 | indent_size = 2 19 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "nfl", 3 | "env": { 4 | "browser": true, 5 | "mocha": true, 6 | "es6": true 7 | }, 8 | "globals": { 9 | "expect": false, 10 | "sinon": false 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | lib 3 | build 4 | npm-debug.log 5 | .DS_Store 6 | 7 | .idea 8 | .eslintcache 9 | es 10 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | src 3 | build 4 | .arcconfig 5 | *.yml 6 | .editorconfig 7 | karma.config.js 8 | travis.yml 9 | CHANGELOG.md 10 | CONTRIBUTING.md 11 | lib/test 12 | .nvmrc 13 | .babelrc 14 | .eslintrc 15 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | v6.6.0 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | node_js: 4 | - 'node' 5 | - 6 6 | - 5 7 | - 4 8 | 9 | install: 10 | - npm i -g npm@latest 11 | - npm install 12 | 13 | before_install: 14 | - export CHROME_BIN=chromium-browser 15 | - export DISPLAY=:99.0 16 | - sh -e /etc/init.d/xvfb start 17 | 18 | cache: 19 | directories: 20 | - node_modules 21 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* 4 | 5 | - [4.0.0](#400) 6 | - [3.3.2](#332) 7 | - [3.3.1 [BROKEN]](#331-broken) 8 | - [3.3.0](#330) 9 | - [3.2.3](#323) 10 | - [3.2.2](#322) 11 | - [3.2.1 [BROKEN]](#321-broken) 12 | - [3.2.0 [BROKEN]](#320-broken) 13 | - [3.1.0](#310) 14 | - [3.0.2](#302) 15 | - [3.0.1](#301) 16 | - [3.0.0](#300) 17 | - [2.3.1](#231) 18 | - [2.3.0](#230) 19 | - [2.2.0](#220) 20 | - [2.1.1](#211) 21 | - [2.1.0](#210) 22 | - [2.0.0](#200) 23 | - [1.1.5](#115) 24 | - [1.1.4](#114) 25 | - [1.1.3](#113) 26 | - [1.1.2](#112) 27 | - [1.1.1](#111) 28 | - [1.1.0](#110) 29 | - [1.0.1](#101) 30 | - [1.0.0](#100) 31 | 32 | 33 | ## 4.0.0 34 | 35 | Features: 36 | 37 | - Replacing PlainComponent with stateless functional component `NullComponent`, with a hard requirement to use React 15 or higher. 38 | 39 | ## 3.3.2 40 | 41 | Bugfixes: 42 | 43 | - Removed stateless functional component `NullComponent` because of it's incompatibility with React 14 and reverted back to PlainComponent. 44 | 45 | ## 3.3.1 [BROKEN] 46 | 47 | Bugfixes: 48 | 49 | - README updates - npm badge and helmet image 50 | - Bump react-side-effect to 1.1.0 51 | - Removing PlainComponent, replaced with NullComponent defined within Helmet.js 52 | - Refactored code - cut lines of code and used `reduce` to simplify functions 53 | - Replaced PlainComponent with NullComponent (now within Helmet.js) 54 | 55 | ## 3.3.0 56 | 57 | Features: 58 | 59 | - `itemprop` available in meta tags 60 | - New API - `titleAttributes` to add attributes to the title tag 61 | - `class` support for html tag 62 | 63 | ## 3.2.3 64 | 65 | Bugfixes: 66 | 67 | - applied previous fix (undefined value for primary attribute key) to base tag 68 | - fix htmlAttributes fallback value when calling rewind() on blank Helmet 69 | - Removed unneeded dependencies - shallowequal, warning 70 | - babel configuration moved into .babelrc 71 | - eslint configuration moved into .eslintrc 72 | 73 | ## 3.2.2 74 | 75 | Bugfixes: 76 | 77 | - Removed breaking changes `jsnext:main` and `module` from package.json. `es` version required special babel configuration for end users and needs to be re-thought for major release. 78 | - Reverted `canUseDOM` setter in `Helmet.js`, as this was a breaking change for some users. 79 | - [fix] runtime error when providing undefined value for primary attribute key (applies to meta, link, script, noscript, style) 80 | 81 | ## 3.2.1 [BROKEN] 82 | 83 | Bugfixes: 84 | 85 | - Removing "engines" field in package.json. 86 | 87 | ## 3.2.0 [BROKEN] 88 | 89 | Features: 90 | 91 | - `