From 4ef616adba0f70d7ad3b444544bc44a32bfe0f6d Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Thu, 10 Aug 2017 20:24:17 +0100 Subject: [PATCH] Initial commit --- .gitignore | 75 +++++++++++++++++++++++++++++++++++++++++++++ .travis.yml | 10 ++++++ LICENSE | 21 +++++++++++++ README.md | 17 ++++++++++ package.json | 38 +++++++++++++++++++++++ src/index.js | 5 +++ test/react-jsdom.js | 6 ++++ 7 files changed, 172 insertions(+) create mode 100644 .gitignore create mode 100644 .travis.yml create mode 100644 LICENSE create mode 100644 README.md create mode 100644 package.json create mode 100644 src/index.js create mode 100644 test/react-jsdom.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c501f33 --- /dev/null +++ b/.gitignore @@ -0,0 +1,75 @@ +## Node + +#npm5 +package-lock.json + +# Logs +logs +*.log +npm-debug.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules +jspm_packages + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +## OS X + +*.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..fa8f913 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,10 @@ +language: node_js +node_js: + - '8' + - '6' + - '4' +script: npm test +after_success: npm run coverage +notifications: + email: + on_success: never diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f27ee9b --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Luke Childs + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..934abd2 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# react-jsdom + +> Render actual DOM nodes in Node.js + +[![Build Status](https://travis-ci.org/lukechilds/react-jsdom.svg?branch=master)](https://travis-ci.org/lukechilds/react-jsdom) +[![Coverage Status](https://coveralls.io/repos/github/lukechilds/react-jsdom/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/react-jsdom?branch=master) +[![npm](https://img.shields.io/npm/v/react-jsdom.svg)](https://www.npmjs.com/package/react-jsdom) + +## Install + +``` +npm install --save-dev react-jsdom +``` + +## License + +MIT © Luke Childs diff --git a/package.json b/package.json new file mode 100644 index 0000000..1154367 --- /dev/null +++ b/package.json @@ -0,0 +1,38 @@ +{ + "name": "react-jsdom", + "version": "2.0.0", + "description": "Render actual DOM nodes in Node.js", + "main": "src/index.js", + "scripts": { + "test": "xo && nyc ava", + "coverage": "nyc report --reporter=text-lcov | coveralls" + }, + "xo": { + "extends": "xo-lukechilds" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/lukechilds/react-jsdom.git" + }, + "keywords": [ + "react", + "dom", + "jsdom", + "test" + ], + "author": "Luke Childs (http://lukechilds.co.uk)", + "license": "MIT", + "bugs": { + "url": "https://github.com/lukechilds/react-jsdom/issues" + }, + "homepage": "https://github.com/lukechilds/react-jsdom", + "dependencies": {}, + "devDependencies": { + "ava": "^0.20.0", + "coveralls": "^2.13.1", + "eslint-config-xo-lukechilds": "^1.0.0", + "nyc": "^11.0.3", + "this": "^1.0.2", + "xo": "^0.19.0" + } +} diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..bbd35e5 --- /dev/null +++ b/src/index.js @@ -0,0 +1,5 @@ +'use strict'; + +const ReactJSDOM = () => {}; + +module.exports = ReactJSDOM; diff --git a/test/react-jsdom.js b/test/react-jsdom.js new file mode 100644 index 0000000..9c425fc --- /dev/null +++ b/test/react-jsdom.js @@ -0,0 +1,6 @@ +import test from 'ava'; +import ReactJSDOM from 'this'; + +test('ReactJSDOM is a function', t => { + t.is(typeof ReactJSDOM, 'function'); +});