-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
10,705 additions
and
3,831 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
node_modules | ||
/node_modules/ | ||
|
||
cjs | ||
esm | ||
umd | ||
/cjs/ | ||
/esm/ | ||
/umd/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
message="Version %s" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"esm/react-media.js": { | ||
"bundled": 3965, | ||
"minified": 2402, | ||
"gzipped": 918, | ||
"treeshaked": { | ||
"rollup": { | ||
"code": 1653, | ||
"import_statements": 265 | ||
}, | ||
"webpack": { | ||
"code": 2885 | ||
} | ||
} | ||
}, | ||
"umd/react-media.js": { | ||
"bundled": 34833, | ||
"minified": 10982, | ||
"gzipped": 3944 | ||
}, | ||
"umd/react-media.min.js": { | ||
"bundled": 11106, | ||
"minified": 4014, | ||
"gzipped": 1837 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,27 @@ | ||
language: node_js | ||
node_js: node | ||
cache: | ||
directories: | ||
- "$HOME/.cache/yarn" | ||
- node_modules | ||
cache: npm | ||
env: | ||
global: | ||
- secure: J/xT+f4cyBtvmi1rNbwNOQcP/dnheS6Ydi0pHlf7PaEPYVauHWVOYt/aANwdkW4mZP/dlTpvG+J56DkDypvj6U7Q8xL+66PCWpP7geFkwz0kAzD0Els+zSdzpjSoAf4b7d+k8m+3hcjO+BePsDashnx4kLXtRAMbfPMsEaKyAyhMhod/dpBV69vXOTIeJMjPDoScl9LMDOoYGmwAYGRwqRmnH8twGfCknvqfns937r8bHXp6CwMVNhFi82nbGFcO5YDwQNjsp0yg0tzK1xXcIRwG86IABAIBlxvahmi6lsLeGnn21VwoAbYuc6zMj4jlhwjnj0Ko4faV1cQrUVAg5H2C6EdLHij/ufdcG9dwdNGpj9oEiUY97lZrBrmj9RDqGSN/ajA+CZqfjM0ohWXXytieMaCM6ldNF2alYRFaEcoGmHAOUW0Vw5NtUtpvA+cWwwGbxwWhEM+ZBL1/McdWJbH9M6FRj0M6LEB2AzjbtVpU7e74uRcgiwa5BeZYrZ+De9PpTK5XIS5yUTO6xxQ1hH1R6mtslfZTG9hQW/f4gmC/jUEn2OHJ+ZUTXU436zM8g7Q/Iz3DSADhvMFZ3G7ppCOF9csqYMm70lcH3vvMw4uWh/cyVCW70PFou7OMZju11rXxA2C+rzAmmiTqqjEoyDI1dSKi2fImIX2wMZaTOJY= | ||
- NPM_TAG=$([[ "$TRAVIS_TAG" == *-* ]] && echo "next" || echo "latest") | ||
- TEST_ENV=cjs BUILD_ENV=cjs | ||
- TEST_ENV=umd BUILD_ENV=umd | ||
- TEST_ENV=source | ||
before_script: | ||
- ([[ -z "$BUILD_ENV" ]] || npm run build) | ||
script: | ||
- npm run lint | ||
- npm test | ||
deploy: | ||
provider: npm | ||
email: npm@mjackson.me | ||
api_key: "$NPM_TOKEN" | ||
tag: "$NPM_TAG" | ||
skip_cleanup: true | ||
on: | ||
all_branches: true | ||
condition: '"$TRAVIS_TAG" =~ ^v[0-9]' | ||
jobs: | ||
include: | ||
- stage: Release | ||
if: tag =~ ^v[0-9] | ||
env: NPM_TAG=$([[ "$TRAVIS_TAG" == *-* ]] && echo "next" || echo "latest") | ||
script: echo "Releasing $TRAVIS_TAG to npm with tag \"$NPM_TAG\" ..." | ||
deploy: | ||
provider: npm | ||
skip_cleanup: true | ||
tag: "$NPM_TAG" | ||
email: npm@mjackson.me | ||
api_key: | ||
secure: Vh46fcq28yrIrhg4I72kPX1B+iZ6/b+2kZVtgYOvZLIpEGB0rsWgfIUqKAfmLX3oh9R72Vfu70mwdEZ4nkql2Qr+c5PaFXHUfTlSeuCiVaEriw2NK4iDRZ8fhMa0VpMd5Jm86Y3RyLUGr4AfAmikGzeijhH70ooZ+EGql39AwdIIktw7OtqopB3WxkMuV6UVmlG68067p65H/V4cf+Kzhy4XlxsGkKgxQ3jm1NgtEG5x9SrpYnOkfwcHo+GaoEvSXXY88WHkFA/YEj0fkeLbodeT2NFKx9cboo2rMB0n55khbfqgTnsUtSPRj1LJQDGMU7fuycC+/Xmb1sZmsKh39bDKgW1Qyw254j3ICMOp+5LGRlQRwzGFLlKup8fEnNevv1jo0znT0TtuNfdw9OENrCZeIHtZmf4dm+uSbpGIfG6T9UfoBhG6ya3O08J5eJCBVUoeHZZaxZ+ufRko2ucfFUx7m755TIsmP74RwF5FOBDTnZY6Hip11rpD32vNPfwAOQe0ra04QpYp5P4jSDUG9/194BKIUnOgFDq5C1JOXsNgOxQuQMiYD7jNkUWNPr1UidScaPhYTwvH+Yi7GkKb/oo49uuhuvOwojAMRpHrsfOKV3eb/vYRxR7tiyVRyYzw4JAkmBtNQEZ9ipqsM31YPIIek/bwKvLkn94+499P/Ks= | ||
on: | ||
tags: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
'use strict'; | ||
|
||
if (process.env.NODE_ENV === 'production') { | ||
module.exports = require('./cjs/react-media.min.js'); | ||
} else { | ||
module.exports = require('./cjs/react-media.js'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
let mappedModule; | ||
switch (process.env.TEST_ENV) { | ||
case 'cjs': | ||
mappedModule = '<rootDir>/cjs/react-media.js'; | ||
break; | ||
case 'umd': | ||
mappedModule = '<rootDir>/umd/react-media.js'; | ||
break; | ||
case 'source': | ||
default: | ||
mappedModule = '<rootDir>/modules/index.js'; | ||
} | ||
|
||
module.exports = { | ||
globals: { | ||
__DEV__: true | ||
}, | ||
moduleNameMapper: { | ||
'^react-media$': mappedModule | ||
}, | ||
testMatch: ['**/__tests__/**/*-test.js'], | ||
testURL: 'http://localhost/' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
{ | ||
"presets": [["env", { "loose": true }], "stage-1", "react"] | ||
"presets": [["@babel/env", { "loose": true }], "@babel/react"], | ||
"plugins": [ | ||
"@babel/proposal-class-properties", | ||
"@babel/proposal-export-default-from", | ||
"dev-expression" | ||
] | ||
} |
Oops, something went wrong.