Skip to content

Commit

Permalink
code style - standard (reformat commit)
Browse files Browse the repository at this point in the history
  • Loading branch information
qvantor committed Sep 13, 2017
1 parent 16db919 commit e4b7eb5
Show file tree
Hide file tree
Showing 28 changed files with 4,542 additions and 4,581 deletions.
18 changes: 9 additions & 9 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"presets": [
"es2015"
],
"env": {
"test": {
"plugins": [
"istanbul"
]
}
"presets": [
"es2015"
],
"env": {
"test": {
"plugins": [
"istanbul"
]
}
}
}
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ root = true

# change these settings to your own preference
indent_style = space
indent_size = 4
indent_size = 2

# we recommend you to keep these unchanged
end_of_line = lf
Expand Down
24 changes: 11 additions & 13 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
{
"env": {
"node": true,
"es6": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"rules": {
"quotes": ["error", "single"],
"indent": ["error", 4]
}
"env": {
"node": true,
"es6": true
},
"extends": "standard",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"rules": {
}
}
108 changes: 54 additions & 54 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
require('load-grunt-tasks')(grunt)

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
eslint: {
dist: {
src: ['./src/**/*.js']
},
tests: {
src: ['./test/**/*.js']
}
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
eslint: {
dist: {
src: ['./src/**/*.js']
},
tests: {
src: ['./test/**/*.js']
}
},
clean: {
dist: {
src: ['./dist', './lib']
}
},
babel: {
options: {
presets: ['babel-preset-es2015']
},
dist: {
expand: true,
cwd: './src/',
src: ['**/*.js'],
dest: './lib/'
}
},
browserify: {
dist: {
options: {
browserifyOptions: {debug: false, standalone: 'Exonum'},
transform: [['babelify', {'presets': ['es2015']}]]
},
clean: {
dist: {
src: ['./dist', './lib']
}
},
babel: {
options: {
presets: ['babel-preset-es2015']
},
dist: {
expand: true,
cwd: './src/',
src: ['**/*.js'],
dest: './lib/'
}
},
browserify: {
dist: {
options: {
browserifyOptions: {debug: false, standalone: 'Exonum'},
transform: [["babelify", {"presets": ["es2015"]}]]
},
src: './src/index.js',
dest: './dist/<%= pkg.name %>.js'
}
},
uglify: {
dist: {
src: './dist/<%= pkg.name %>.js',
dest: './dist/<%= pkg.name %>.min.js'
}
},
mochaTest: {
options: {
reporter: 'spec',
require: ['babel-register']
},
src: ['./test/**/*.js']
}
});
src: './src/index.js',
dest: './dist/<%= pkg.name %>.js'
}
},
uglify: {
dist: {
src: './dist/<%= pkg.name %>.js',
dest: './dist/<%= pkg.name %>.min.js'
}
},
mochaTest: {
options: {
reporter: 'spec',
require: ['babel-register']
},
src: ['./test/**/*.js']
}
})

grunt.registerTask('compile', ['eslint', 'clean', 'babel', 'browserify', 'uglify']);
grunt.registerTask('test', ['eslint:tests', 'mochaTest']);
grunt.registerTask('default', ['compile', 'test']);
};
grunt.registerTask('compile', ['eslint', 'clean', 'babel', 'browserify', 'uglify'])
grunt.registerTask('test', ['eslint:tests', 'mochaTest'])
grunt.registerTask('default', ['compile', 'test'])
}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@

[![Build status][travis-image]][travis-url]
[![Coverage Status][coveralls-image]][coveralls-url]
[![js-standard-style][codestyle-image]][codestyle-url]
[![License][license-image]][license-url]

[travis-image]: https://img.shields.io/travis/exonum/exonum-client/master.svg
[travis-url]: https://travis-ci.org/exonum/exonum-client
[coveralls-image]: https://coveralls.io/repos/github/exonum/exonum-client/badge.svg?branch=master
[coveralls-url]: https://coveralls.io/github/exonum/exonum-client?branch=master
[codestyle-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg
[codestyle-url]: http://standardjs.com
[license-image]: https://img.shields.io/github/license/exonum/exonum-client.svg?style=flat-square
[license-url]: https://opensource.org/licenses/Apache-2.0

Expand Down
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
"chai": "^3.5.0",
"coveralls": "^2.13.1",
"cross-env": "^5.0.5",
"eslint-config-standard": "^10.2.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-node": "^5.1.1",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-standard": "^3.0.1",
"grunt": "^1.0.1",
"grunt-babel": "^6.0.0",
"grunt-browserify": "^5.0.0",
Expand All @@ -44,7 +49,9 @@
"scripts": {
"test": "grunt test",
"coveralls": "cross-env NODE_ENV=test nyc mocha && cat ./coverage/lcov.info | coveralls",
"prepare": "grunt compile"
"prepare": "grunt compile",
"lint": "node_modules/.bin/eslint ./src ./test",
"lint:fix": "npm run lint -- --fix"
},
"repository": {
"type": "git",
Expand Down
Loading

0 comments on commit e4b7eb5

Please sign in to comment.