Skip to content

Commit

Permalink
Update to ES module and webpack build
Browse files Browse the repository at this point in the history
  • Loading branch information
Xotic750 committed Jul 10, 2019
1 parent 3ce09b5 commit 0ef3f45
Show file tree
Hide file tree
Showing 30 changed files with 7,520 additions and 5,847 deletions.
26 changes: 26 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"presets": [
[
"@babel/preset-env",
{
"loose": false,
"modules": "commonjs",
"spec": true,
"useBuiltIns": false,
"debug": false
}
]
],
"plugins": [
"@babel/plugin-transform-property-mutators",
[
"@babel/plugin-transform-runtime",
{
"corejs": false,
"helpers": false,
"regenerator": false,
"useESModules": false
}
]
]
}
1 change: 0 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ trim_trailing_whitespace = true

# 4 space indentation
[*.py]
indent_style = space
indent_size = 4

# Tab indentation (no size specified)
Expand Down
5 changes: 4 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
lib/*
!.eslintrc.js
!jest.config.js
dist/
__tests__/coverage/
59 changes: 59 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/**
* @file Manages the root configuration settings for project wide eslint.
* @module eslint/root/configuration
* @see {@link https://eslint.org} for further information.
*/

module.exports = {
/**
* @see {@link https://eslint.org/docs/user-guide/configuring#specifying-environments}
*/
env: {},

/**
* @see {@link https://eslint.org/docs/user-guide/configuring#extending-configuration-files}
*/
extends: ['@prorenata/eslint-config-vue'],

/**
* You can define global variables here.
*
* @see {@link https://eslint.org/docs/user-guide/configuring#specifying-globals}
*/
globals: {},

/**
* Sometimes a more fine-controlled configuration is necessary, for example if the configuration
* for files within the same directory has to be different.
*
* @see {@link https://eslint.org/docs/user-guide/configuring#configuration-based-on-glob-patterns}
*/
overrides: [],

/**
* @see {@link https://eslint.org/docs/user-guide/configuring#specifying-parser-options}
*/
parserOptions: {},

/**
* @see {@link https://eslint.org/docs/user-guide/configuring#configuring-plugins}
*/
plugins: [],

/**
* @see {@link https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy}
*/
root: true,

/**
* @see {@link https://eslint.org/docs/user-guide/configuring#configuring-rules}
*/
rules: {},

/**
* Webpack-literate module resolution plugin for eslint-plugin-import.
*
* @see {@link https://www.npmjs.com/package/eslint-import-resolver-webpack}
*/
settings: {},
};
6 changes: 0 additions & 6 deletions .eslintrc.json

This file was deleted.

34 changes: 10 additions & 24 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Created by .ignore support plugin (hsz.mobi)
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio

*.iml

## Directory-based project format:
Expand Down Expand Up @@ -28,7 +30,6 @@
## File-based project format:
*.ipr
*.iws
*.komodoproject

## Plugin-specific files:

Expand All @@ -49,32 +50,17 @@ crashlytics-build.properties
# NodeJS modules folder
node_modules

# Logs
logs
*.log

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
# npm debug log
npm-debug.log

# 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
# yarn error log
yarn-error.log

# vs code
.vscode

# OSX
# Apple macOS
.DS_Store

# coverage results
__tests__/coverage/
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/*
lts/carbon
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
dist/
__tests__/coverage/
14 changes: 14 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"arrowParens": "always",
"bracketSpacing": false,
"insertPragma": false,
"jsxBracketSameLine": false,
"printWidth": 130,
"proseWrap": "preserve",
"requirePragma": false,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"useTabs": false
}
103 changes: 4 additions & 99 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,105 +7,10 @@ branches:
notifications:
email: false
node_js:
- "9.6"
- "9.5"
- "9.4"
- "9.3"
- "9.2"
- "9.1"
- "9.0"
- "8.9"
- "8.8"
- "8.7"
- "8.6"
- "8.5"
- "8.4"
- "8.3"
- "8.2"
- "8.1"
- "8.0"
- "7.10"
- "7.9"
- "7.8"
- "7.7"
- "7.6"
- "7.5"
- "7.4"
- "7.3"
- "7.2"
- "7.1"
- "7.0"
- "6.11"
- "6.10"
- "6.9"
- "6.8"
- "6.7"
- "6.6"
- "6.5"
- "6.4"
- "6.3"
- "6.2"
- "6.1"
- "6.0"
- "5.12"
- "5.11"
- "5.10"
- "5.9"
- "5.8"
- "5.7"
- "5.6"
- "5.5"
- "5.4"
- "5.3"
- "5.2"
- "5.1"
- "5.0"
- "4.8"
- "4.7"
- "4.6"
- "4.5"
- "4.4"
- "4.3"
- "4.2"
- "4.1"
- "4.0"
- "iojs-v3.3"
- "iojs-v3.2"
- "iojs-v3.1"
- "iojs-v3.0"
- "iojs-v2.5"
- "iojs-v2.4"
- "iojs-v2.3"
- "iojs-v2.2"
- "iojs-v2.1"
- "iojs-v2.0"
- "iojs-v1.8"
- "iojs-v1.7"
- "iojs-v1.6"
- "iojs-v1.5"
- "iojs-v1.4"
- "iojs-v1.3"
- "iojs-v1.2"
- "iojs-v1.1"
- "iojs-v1.0"
- "0.12"
- "0.11"
- "0.10"
- "0.9"
- "0.8"
- "0.6"
- "0.4"
before_install:
- 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ; esac ; fi'
- 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then if [ "${TRAVIS_NODE_VERSION%${TRAVIS_NODE_VERSION#[0-9]}}" = "0" ] || [ "${TRAVIS_NODE_VERSION:0:4}" = "iojs" ]; then npm install -g npm@4.5; elif [[ "${TRAVIS_NODE_VERSION%${TRAVIS_NODE_VERSION#[0-9]}}" =~ ^[4-5]+$ ]]; then npm install -g npm@5.3; else npm install -g npm; fi; fi'
install:
- 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use --delete-prefix "${TRAVIS_NODE_VERSION}"; else npm install; fi;'
- "10"
- "9"
- "8"
script:
- 'npm test'
- npm run test:ci
matrix:
fast_finish: true
allow_failures:
- node_js: "0.11"
- node_js: "0.9"
- node_js: "0.6"
- node_js: "0.4"
17 changes: 0 additions & 17 deletions .uglifyjsrc.json

This file was deleted.

23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,29 @@
<a name="module_attempt-x"></a>

## attempt-x

Invokes function, returning an object of the results.

**Version**: 1.1.3
**Author**: Xotic750 <Xotic750@gmail.com>
**License**: [MIT](&lt;https://opensource.org/licenses/MIT&gt;)
**Copyright**: Xotic750
<a name="exp_module_attempt-x--module.exports"></a>

### `module.exports(fn, [...args])` ⇒ <code>Object</code> ⏏

This method attempts to invoke the function, returning either the result or
the caught error object. Any additional arguments are provided to the
function when it's invoked.

**Kind**: Exported function
**Returns**: <code>Object</code> - Returns an object of the result.
**Returns**: <code>Object</code> - Returns an object of the result.

| Param | Type | Description |
| --------- | --------------------- | ------------------------------------------ |
| fn | <code>function</code> | The function to attempt. |
| [...args] | <code>\*</code> | The arguments to invoke the function with. |

| Param | Type | Description |
| --- | --- | --- |
| fn | <code>function</code> | The function to attempt. |
| [...args] | <code>\*</code> | The arguments to invoke the function with. |
**Example**

**Example**
```js
var attempt = require('attempt-x');
import attempt from 'attempt-x';

function thrower() {
throw new Error('Threw');
Expand All @@ -66,7 +65,7 @@ attempt(sumArgs, 1, 2);
// value: 3
// }

var thisArg = [];
const thisArg = [];
function pusher(a, b) {
return this.push(a, b);
}
Expand Down
Loading

0 comments on commit 0ef3f45

Please sign in to comment.