Skip to content

Commit

Permalink
Use @polkadot/dev for common tasks (#8)
Browse files Browse the repository at this point in the history
* Link to docs in README

* Use @polkadot/dev for common tasks

* 0.5.0 since docs added
  • Loading branch information
jacogr authored Nov 20, 2017
1 parent 4ec391e commit 1216968
Show file tree
Hide file tree
Showing 38 changed files with 2,506 additions and 384 deletions.
11 changes: 1 addition & 10 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
{
"presets": [
"env",
"stage-0"
],
"plugins": [
"transform-flow-strip-types",
"transform-class-properties",
"transform-object-rest-spread",
"transform-runtime"
]
"extends": "@polkadot/dev/.babelrc"
}
34 changes: 2 additions & 32 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,5 @@
{
"env": {
"browser": true,
"mocha": true,
"node": true
},
"extends": [
"semistandard",
"plugin:flowtype/recommended"
],
"globals": {
"expect": true
},
"parser": "babel-eslint",
"plugins": [
"flowtype"
],
"rules": {
"curly": ["error", "all"],
"newline-after-var": ["error", "always"],
"no-alert": "error",
"no-debugger": "error",
"no-duplicate-imports": ["error", {
"includeExports": true
}],
"object-curly-spacing": ["error", "always"],
"object-property-newline": 0,
"one-var-declaration-per-line": ["error", "always"],
"padded-blocks": ["error", {
"blocks": "never",
"classes": "never",
"switches": "never"
}]
}
"./node_modules/@polkadot/dev/.eslintrc.json"
]
}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
build/
coverage/
lib/
docs/
node_modules/
tmp/
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
coverage
docs
scripts
src
test
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
language: node_js
node_js:
- "8"
script: ./scripts/travis.sh
script: node_modules/.bin/polkadot-dev-build-travis build check coveralls npm test
15 changes: 12 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
ISC License (ISC)
Copyright 2017 Jaco Greeff

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
Copyright 2017 Jaco Greeff <[email protected]>

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,19 @@ Installation -
```
npm install --save @polkadot/util
```

Functions can be imported directly from the package, e.g.

```js
import { isHex } from '@polkadot/util';
```

Alternatively the function can be accessed directly,

```js
import isHex from '@polkadot/util/is/hex';
```

## Available Utilities

For a list of currently exposed methods, see the [library documentation](docs/README.md).
Empty file added docs/.keep
Empty file.
Loading

0 comments on commit 1216968

Please sign in to comment.