Add react

This commit is contained in:
2020-12-30 18:08:01 -05:00
parent 2a36f20a4c
commit 8a6e029f83
5268 changed files with 296765 additions and 12 deletions

View File

@ -0,0 +1,5 @@
{
"presets": [
"airbnb"
],
}

View File

@ -0,0 +1,20 @@
root = true
[*]
indent_style = tab
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120
[CHANGELOG.md]
indent_style = space
indent_size = 2
[*.json]
max_line_length = off
[Makefile]
max_line_length = off

View File

@ -0,0 +1,2 @@
test/fixtures
lib/

View File

@ -0,0 +1,5 @@
{
"parser": "babel-eslint",
"extends": "airbnb-base",
"root": true
}

View File

@ -0,0 +1,2 @@
src/
test/

View File

@ -0,0 +1,39 @@
language: node_js
os:
- linux
node_js:
- "8"
- "7"
- "6"
- "5"
- "4"
- "iojs-v3"
- "iojs-v2"
- "iojs-v1"
- "0.12"
before_install:
- 'nvm install-latest-npm'
install:
- 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;'
script:
- 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi'
- 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi'
- 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi'
- 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi'
sudo: false
env:
- TEST=true
matrix:
fast_finish: true
include:
- node_js: "node"
env: PRETEST=true
allow_failures:
- node_js: "7"
- node_js: "5"
- node_js: "iojs-v3"
- node_js: "iojs-v2"
- node_js: "iojs-v1"
- node_js: "0.12"
- env: TEST=true ALLOW_FAILURE=true
- env: COVERAGE=true

View File

@ -0,0 +1,25 @@
## Unreleased
## v1.1.0
- Visit Import nodes instead of CallExpressions (#30)
- [Deps] update `babel-template`, `babel-types`
- [Dev Deps] update `airbnb-js-shims`, `babel-cli`, `babel-core`, `babel-preset-airbnb`, `babel-register`, `chai`, `eslint`, `eslint-config-airbnb-base`, `eslint-plugin-import`, `mocha`
- [Tests] on `node` `v8`
- [Tests] use `nvm install-latest-npm` so newer npm doesnt break older node
## v1.0.2
- [Fix] Ensure it works with the ES2015 preset too (#12, #16)
- [Deps] update `babel-template`, `babel-types`
- [Dev Deps] update `babel-cli`, `babel-core`, `babel-eslint`, `babel-register`, `eslint`, `eslint-config-airbnb-base`, `mocha`
## v1.0.1
- [Fix] Move `in-publish` to devDeps (#11)
- [Fix] ensure dynamic `import()` input is properly stringified (#2)
- [Fix] async timing of dynamic import to match spec (#3)
- [Fix] Remove spaces in template strings and update Babel (#10)
- [Deps] update `babel-template`, `babel-types`
- [Deps] update `babel-types` (#4, #5, #6)
- [Dev Deps] update `babel-cli`, `babel-core`, `babel-eslint`, `babel-register`, `eslint`, `eslint-config-airbnb-base`, `eslint-plugin-import`, `mocha`, `rimraf`
## v1.0.0
- Initial full release.

21
node_modules/babel-plugin-dynamic-import-node/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2016 Airbnb
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.

View File

@ -0,0 +1,37 @@
# babel-plugin-dynamic-import-node
Babel plugin to transpile `import()` to a deferred `require()`, for node. Matches the [proposed spec](https://github.com/domenic/proposal-import-function).
**NOTE:** Babylon >= v6.12.0 is required to correct parse dynamic imports.
## Installation
```sh
$ npm install babel-plugin-dynamic-import-node --save-dev
```
## Usage
### Via `.babelrc` (Recommended)
**.babelrc**
```json
{
"plugins": ["dynamic-import-node"]
}
```
### Via CLI
```sh
$ babel --plugins dynamic-import-node script.js
```
### Via Node API
```javascript
require('babel-core').transform('code', {
plugins: ['dynamic-import-node']
});
```

View File

@ -0,0 +1,41 @@
Object.defineProperty(exports, "__esModule", {
value: true
});
var _babelTemplate = require('babel-template');
var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
var _babelPluginSyntaxDynamicImport = require('babel-plugin-syntax-dynamic-import');
var _babelPluginSyntaxDynamicImport2 = _interopRequireDefault(_babelPluginSyntaxDynamicImport);
var _babelTypes = require('babel-types');
var t = _interopRequireWildcard(_babelTypes);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var buildImport = (0, _babelTemplate2['default'])('\n Promise.resolve().then(() => require(SOURCE))\n');
exports['default'] = function () {
return {
inherits: _babelPluginSyntaxDynamicImport2['default'],
visitor: {
Import: function () {
function Import(path) {
var importArguments = path.parentPath.node.arguments;
var newImport = buildImport({
SOURCE: t.isStringLiteral(importArguments[0]) || t.isTemplateLiteral(importArguments[0]) ? importArguments : t.templateLiteral([t.templateElement({ raw: '', cooked: '' }), t.templateElement({ raw: '', cooked: '' }, true)], importArguments)
});
path.parentPath.replaceWith(newImport);
}
return Import;
}()
}
};
};

View File

@ -0,0 +1,95 @@
{
"_from": "babel-plugin-dynamic-import-node@1.1.0",
"_id": "babel-plugin-dynamic-import-node@1.1.0",
"_inBundle": false,
"_integrity": "sha512-tTfZbM9Ecwj3GK50mnPrUpinTwA4xXmDiQGCk/aBYbvl1+X8YqldK86wZ1owVJ4u3mrKbRlXMma80J18qwiaTQ==",
"_location": "/babel-plugin-dynamic-import-node",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "babel-plugin-dynamic-import-node@1.1.0",
"name": "babel-plugin-dynamic-import-node",
"escapedName": "babel-plugin-dynamic-import-node",
"rawSpec": "1.1.0",
"saveSpec": null,
"fetchSpec": "1.1.0"
},
"_requiredBy": [
"/babel-preset-react-app"
],
"_resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-1.1.0.tgz",
"_shasum": "bd1d88ac7aaf98df4917c384373b04d971a2b37a",
"_spec": "babel-plugin-dynamic-import-node@1.1.0",
"_where": "/home/rudi/Personal/disgord-Thanos/node_modules/babel-preset-react-app",
"author": {
"name": "Jordan Gensler",
"email": "jordan.gensler@airbnb.com"
},
"bugs": {
"url": "https://github.com/airbnb/babel-plugin-dynamic-import-node/issues"
},
"bundleDependencies": false,
"dependencies": {
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-template": "^6.26.0",
"babel-types": "^6.26.0"
},
"deprecated": false,
"description": "Babel plugin to transpile import() to a deferred require(), for node",
"devDependencies": {
"airbnb-js-shims": "^1.3.0",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-eslint": "^7.2.3",
"babel-plugin-transform-es2015-template-literals": "^6.22.0",
"babel-preset-airbnb": "^2.4.0",
"babel-preset-es2015": "^6.24.1",
"babel-register": "^6.26.0",
"chai": "^4.1.2",
"eslint": "^4.6.1",
"eslint-config-airbnb-base": "^12.0.0",
"eslint-plugin-import": "^2.7.0",
"in-publish": "^2.0.0",
"mocha": "^3.5.2",
"rimraf": "^2.6.1",
"safe-publish-latest": "^1.1.1"
},
"directories": {
"test": "test"
},
"homepage": "https://github.com/airbnb/babel-plugin-dynamic-import-node#readme",
"keywords": [
"babel",
"plugin",
"dynamic",
"import",
"node"
],
"license": "MIT",
"main": "lib/index.js",
"name": "babel-plugin-dynamic-import-node",
"repository": {
"type": "git",
"url": "git+https://github.com/airbnb/babel-plugin-dynamic-import-node.git"
},
"scripts": {
"build": "babel src --out-dir lib",
"check-changelog": "expr $(git status --porcelain 2>/dev/null| grep \"^\\s*M.*CHANGELOG.md\" | wc -l) >/dev/null || (echo 'Please edit CHANGELOG.md' && exit 1)",
"check-only-changelog-changed": "(expr $(git status --porcelain 2>/dev/null| grep -v \"CHANGELOG.md\" | wc -l) >/dev/null && echo 'Only CHANGELOG.md may have uncommitted changes' && exit 1) || exit 0",
"clean": "rimraf lib",
"lint": "eslint .",
"postversion": "git commit package.json CHANGELOG.md -m \"v$npm_package_version\" && npm run tag && git push && git push --tags",
"prebuild": "npm run clean",
"prepublish": "not-in-publish || (safe-publish-latest && npm run build)",
"pretest": "npm run lint",
"preversion": "npm run test && npm run check-changelog && npm run check-only-changelog-changed",
"tag": "git tag v$npm_package_version",
"test": "npm run tests-only",
"tests-only": "mocha",
"version:major": "npm --no-git-tag-version version major",
"version:minor": "npm --no-git-tag-version version minor",
"version:patch": "npm --no-git-tag-version version patch"
},
"version": "1.1.0"
}