trackler 2.0.8.46 → 2.0.8.47

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/tracks/ecmascript/.travis.yml +1 -1
  4. data/tracks/ecmascript/README.md +9 -4
  5. data/tracks/ecmascript/exercises/accumulate/gulpfile.js +41 -38
  6. data/tracks/ecmascript/exercises/accumulate/package.json +7 -2
  7. data/tracks/ecmascript/exercises/acronym/gulpfile.js +41 -38
  8. data/tracks/ecmascript/exercises/acronym/package.json +7 -2
  9. data/tracks/ecmascript/exercises/all-your-base/gulpfile.js +41 -38
  10. data/tracks/ecmascript/exercises/all-your-base/package.json +7 -2
  11. data/tracks/ecmascript/exercises/allergies/allergies.spec.js +1 -1
  12. data/tracks/ecmascript/exercises/allergies/gulpfile.js +41 -38
  13. data/tracks/ecmascript/exercises/allergies/package.json +7 -2
  14. data/tracks/ecmascript/exercises/anagram/gulpfile.js +41 -38
  15. data/tracks/ecmascript/exercises/anagram/package.json +7 -2
  16. data/tracks/ecmascript/exercises/atbash-cipher/gulpfile.js +41 -38
  17. data/tracks/ecmascript/exercises/atbash-cipher/package.json +7 -2
  18. data/tracks/ecmascript/exercises/beer-song/gulpfile.js +41 -38
  19. data/tracks/ecmascript/exercises/beer-song/package.json +7 -2
  20. data/tracks/ecmascript/exercises/binary-search-tree/gulpfile.js +41 -38
  21. data/tracks/ecmascript/exercises/binary-search-tree/package.json +7 -2
  22. data/tracks/ecmascript/exercises/binary-search/gulpfile.js +41 -38
  23. data/tracks/ecmascript/exercises/binary-search/package.json +7 -2
  24. data/tracks/ecmascript/exercises/binary/gulpfile.js +41 -38
  25. data/tracks/ecmascript/exercises/binary/package.json +7 -2
  26. data/tracks/ecmascript/exercises/bob/gulpfile.js +41 -38
  27. data/tracks/ecmascript/exercises/bob/package.json +7 -2
  28. data/tracks/ecmascript/exercises/bracket-push/gulpfile.js +41 -38
  29. data/tracks/ecmascript/exercises/bracket-push/package.json +7 -2
  30. data/tracks/ecmascript/exercises/circular-buffer/gulpfile.js +41 -38
  31. data/tracks/ecmascript/exercises/circular-buffer/package.json +7 -2
  32. data/tracks/ecmascript/exercises/clock/gulpfile.js +41 -38
  33. data/tracks/ecmascript/exercises/clock/package.json +7 -2
  34. data/tracks/ecmascript/exercises/crypto-square/gulpfile.js +41 -38
  35. data/tracks/ecmascript/exercises/crypto-square/package.json +7 -2
  36. data/tracks/ecmascript/exercises/custom-set/gulpfile.js +41 -38
  37. data/tracks/ecmascript/exercises/custom-set/package.json +7 -2
  38. data/tracks/ecmascript/exercises/diamond/gulpfile.js +41 -38
  39. data/tracks/ecmascript/exercises/diamond/package.json +7 -2
  40. data/tracks/ecmascript/exercises/difference-of-squares/gulpfile.js +41 -38
  41. data/tracks/ecmascript/exercises/difference-of-squares/package.json +7 -2
  42. data/tracks/ecmascript/exercises/etl/gulpfile.js +41 -38
  43. data/tracks/ecmascript/exercises/etl/package.json +7 -2
  44. data/tracks/ecmascript/exercises/food-chain/gulpfile.js +41 -38
  45. data/tracks/ecmascript/exercises/food-chain/package.json +7 -2
  46. data/tracks/ecmascript/exercises/gigasecond/gulpfile.js +41 -38
  47. data/tracks/ecmascript/exercises/gigasecond/package.json +7 -2
  48. data/tracks/ecmascript/exercises/grade-school/gulpfile.js +41 -38
  49. data/tracks/ecmascript/exercises/grade-school/package.json +7 -2
  50. data/tracks/ecmascript/exercises/grains/gulpfile.js +41 -38
  51. data/tracks/ecmascript/exercises/grains/package.json +7 -2
  52. data/tracks/ecmascript/exercises/gulpfile.js +89 -0
  53. data/tracks/ecmascript/exercises/hamming/gulpfile.js +41 -38
  54. data/tracks/ecmascript/exercises/hamming/package.json +7 -2
  55. data/tracks/ecmascript/exercises/hello-world/gulpfile.js +41 -38
  56. data/tracks/ecmascript/exercises/hello-world/package.json +7 -2
  57. data/tracks/ecmascript/exercises/hexadecimal/gulpfile.js +41 -38
  58. data/tracks/ecmascript/exercises/hexadecimal/package.json +7 -2
  59. data/tracks/ecmascript/exercises/isogram/gulpfile.js +41 -38
  60. data/tracks/ecmascript/exercises/isogram/package.json +7 -2
  61. data/tracks/ecmascript/exercises/kindergarten-garden/gulpfile.js +41 -38
  62. data/tracks/ecmascript/exercises/kindergarten-garden/package.json +7 -2
  63. data/tracks/ecmascript/exercises/largest-series-product/gulpfile.js +41 -38
  64. data/tracks/ecmascript/exercises/largest-series-product/package.json +7 -2
  65. data/tracks/ecmascript/exercises/leap/gulpfile.js +41 -38
  66. data/tracks/ecmascript/exercises/leap/package.json +7 -2
  67. data/tracks/ecmascript/exercises/linked-list/gulpfile.js +41 -38
  68. data/tracks/ecmascript/exercises/linked-list/package.json +7 -2
  69. data/tracks/ecmascript/exercises/luhn/gulpfile.js +41 -38
  70. data/tracks/ecmascript/exercises/luhn/package.json +7 -2
  71. data/tracks/ecmascript/exercises/matrix/gulpfile.js +41 -38
  72. data/tracks/ecmascript/exercises/matrix/package.json +7 -2
  73. data/tracks/ecmascript/exercises/meetup/gulpfile.js +41 -38
  74. data/tracks/ecmascript/exercises/meetup/package.json +7 -2
  75. data/tracks/ecmascript/exercises/nth-prime/gulpfile.js +41 -38
  76. data/tracks/ecmascript/exercises/nth-prime/package.json +7 -2
  77. data/tracks/ecmascript/exercises/ocr-numbers/gulpfile.js +41 -38
  78. data/tracks/ecmascript/exercises/ocr-numbers/package.json +7 -2
  79. data/tracks/ecmascript/exercises/octal/gulpfile.js +41 -38
  80. data/tracks/ecmascript/exercises/octal/package.json +7 -2
  81. data/tracks/ecmascript/exercises/package.json +28 -0
  82. data/tracks/ecmascript/exercises/palindrome-products/gulpfile.js +41 -38
  83. data/tracks/ecmascript/exercises/palindrome-products/package.json +7 -2
  84. data/tracks/ecmascript/exercises/pangram/gulpfile.js +41 -38
  85. data/tracks/ecmascript/exercises/pangram/package.json +7 -2
  86. data/tracks/ecmascript/exercises/pascals-triangle/gulpfile.js +41 -38
  87. data/tracks/ecmascript/exercises/pascals-triangle/package.json +7 -2
  88. data/tracks/ecmascript/exercises/perfect-numbers/gulpfile.js +41 -38
  89. data/tracks/ecmascript/exercises/perfect-numbers/package.json +7 -2
  90. data/tracks/ecmascript/exercises/phone-number/gulpfile.js +41 -38
  91. data/tracks/ecmascript/exercises/phone-number/package.json +7 -2
  92. data/tracks/ecmascript/exercises/pig-latin/gulpfile.js +41 -38
  93. data/tracks/ecmascript/exercises/pig-latin/package.json +7 -2
  94. data/tracks/ecmascript/exercises/prime-factors/gulpfile.js +41 -38
  95. data/tracks/ecmascript/exercises/prime-factors/package.json +7 -2
  96. data/tracks/ecmascript/exercises/pythagorean-triplet/gulpfile.js +41 -38
  97. data/tracks/ecmascript/exercises/pythagorean-triplet/package.json +7 -2
  98. data/tracks/ecmascript/exercises/queen-attack/gulpfile.js +41 -38
  99. data/tracks/ecmascript/exercises/queen-attack/package.json +7 -2
  100. data/tracks/ecmascript/exercises/raindrops/gulpfile.js +41 -38
  101. data/tracks/ecmascript/exercises/raindrops/package.json +7 -2
  102. data/tracks/ecmascript/exercises/rna-transcription/gulpfile.js +41 -38
  103. data/tracks/ecmascript/exercises/rna-transcription/package.json +7 -2
  104. data/tracks/ecmascript/exercises/robot-name/gulpfile.js +41 -38
  105. data/tracks/ecmascript/exercises/robot-name/package.json +7 -2
  106. data/tracks/ecmascript/exercises/robot-simulator/gulpfile.js +41 -38
  107. data/tracks/ecmascript/exercises/robot-simulator/package.json +7 -2
  108. data/tracks/ecmascript/exercises/roman-numerals/gulpfile.js +41 -38
  109. data/tracks/ecmascript/exercises/roman-numerals/package.json +7 -2
  110. data/tracks/ecmascript/exercises/saddle-points/gulpfile.js +41 -38
  111. data/tracks/ecmascript/exercises/saddle-points/package.json +7 -2
  112. data/tracks/ecmascript/exercises/say/gulpfile.js +41 -38
  113. data/tracks/ecmascript/exercises/say/package.json +7 -2
  114. data/tracks/ecmascript/exercises/scrabble-score/gulpfile.js +41 -38
  115. data/tracks/ecmascript/exercises/scrabble-score/package.json +7 -2
  116. data/tracks/ecmascript/exercises/secret-handshake/gulpfile.js +41 -38
  117. data/tracks/ecmascript/exercises/secret-handshake/package.json +7 -2
  118. data/tracks/ecmascript/exercises/series/gulpfile.js +41 -38
  119. data/tracks/ecmascript/exercises/series/package.json +7 -2
  120. data/tracks/ecmascript/exercises/sieve/gulpfile.js +41 -38
  121. data/tracks/ecmascript/exercises/sieve/package.json +7 -2
  122. data/tracks/ecmascript/exercises/simple-cipher/gulpfile.js +41 -38
  123. data/tracks/ecmascript/exercises/simple-cipher/package.json +7 -2
  124. data/tracks/ecmascript/exercises/space-age/gulpfile.js +41 -38
  125. data/tracks/ecmascript/exercises/space-age/package.json +7 -2
  126. data/tracks/ecmascript/exercises/strain/gulpfile.js +41 -38
  127. data/tracks/ecmascript/exercises/strain/package.json +7 -2
  128. data/tracks/ecmascript/exercises/sum-of-multiples/gulpfile.js +41 -38
  129. data/tracks/ecmascript/exercises/sum-of-multiples/package.json +7 -2
  130. data/tracks/ecmascript/exercises/triangle/gulpfile.js +41 -38
  131. data/tracks/ecmascript/exercises/triangle/package.json +7 -2
  132. data/tracks/ecmascript/exercises/triangle/triangle.spec.js +1 -1
  133. data/tracks/ecmascript/exercises/trinary/gulpfile.js +41 -38
  134. data/tracks/ecmascript/exercises/trinary/package.json +7 -2
  135. data/tracks/ecmascript/exercises/two-bucket/gulpfile.js +41 -38
  136. data/tracks/ecmascript/exercises/two-bucket/package.json +7 -2
  137. data/tracks/ecmascript/exercises/word-count/gulpfile.js +41 -38
  138. data/tracks/ecmascript/exercises/word-count/package.json +7 -2
  139. data/tracks/ecmascript/exercises/wordy/gulpfile.js +41 -38
  140. data/tracks/ecmascript/exercises/wordy/package.json +7 -2
  141. data/tracks/ecmascript/gulpfile.js +41 -38
  142. data/tracks/ecmascript/package.json +7 -2
  143. data/tracks/julia/exercises/difference-of-squares/difference-of-squares.jl +4 -4
  144. data/tracks/lfe/docs/INSTALLATION.md +10 -2
  145. data/tracks/objective-c/config.json +9 -0
  146. data/tracks/objective-c/exercises/pascals-triangle/PascalsTriangleExample.h +9 -0
  147. data/tracks/objective-c/exercises/pascals-triangle/PascalsTriangleExample.m +54 -0
  148. data/tracks/objective-c/exercises/pascals-triangle/PascalsTriangleTest.m +53 -0
  149. data/tracks/objective-c/xcodeProject/ObjectiveC.xcodeproj/project.pbxproj +18 -0
  150. data/tracks/python/exercises/grains/example.py +13 -2
  151. data/tracks/python/exercises/grains/grains_test.py +22 -1
  152. data/tracks/swift/.travis.yml +9 -2
  153. data/tracks/swift/exercises/binary-search-tree/Sources/BinarySearchTreeExample.swift +1 -1
  154. data/tracks/swift/exercises/minesweeper/Sources/MinesweeperExample.swift +4 -0
  155. data/tracks/swift/exercises/robot-name/Tests/RobotNameTests/RobotNameTests.swift +5 -1
  156. metadata +7 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0664612a2c6494dfb75ebb60db6f61357dde82d6
4
- data.tar.gz: b1fbbd71516be8dcf8e04e2f220dd7cad02b0d59
3
+ metadata.gz: 952f55c26f09c47e065bae940250443aa338caa5
4
+ data.tar.gz: ab450f413d7342ba47eb60048efde44918814552
5
5
  SHA512:
6
- metadata.gz: 6ea409c79b1ba96197968f519d5f32eaab9cb0a214a72e7c070a9dc59d8f37bb239cd9dcb41e4f472bba51783d8b6ce2455dbb2adcb82d09329a7ac1bec5b0bf
7
- data.tar.gz: 6116b6972c2ab97d31b50480b285f2feb9939c78608608fd9b50340083b2f25c7f37ffc2834c8e06d4593d952e80e513ad3141c74e38e90f50dd83c47932adb0
6
+ metadata.gz: 24df99ec1af4b91b936cce80f9cf4b43c06c3706d1248884cee2bfee11a0ac5eb4c6a48dd8e1977801c227dc2baf80d192373b04ad3d5ddc08ca1c333cd2c73a
7
+ data.tar.gz: aaa21ebe1d97c2f6e3b7fc851c3e8e3d32909d0fad0ac4d6eda312f7976133605e9eb7d19ecb5b741cf5515518f4ae5870b7ab6797ca8e4d1641350a5c3f82b3
@@ -1,3 +1,3 @@
1
1
  module Trackler
2
- VERSION = "2.0.8.46"
2
+ VERSION = "2.0.8.47"
3
3
  end
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  language: node_js
3
3
  node_js:
4
- - '5.7'
4
+ - '7.8'
5
5
  sudo: false
6
6
  script:
7
7
  - bin/fetch-configlet
@@ -2,16 +2,21 @@
2
2
 
3
3
  Exercism exercises in ECMAScript 6
4
4
 
5
- ## Running Unit Test Suite
5
+ ## Running the Unit Test Suite
6
6
 
7
- [Node.js](https://nodejs.org) must be installed. Tests are run with
8
- a [Gulp](http://gulpjs.com) task so `gulp-cli` tool must be installed
9
- via `npm`
7
+ [Node.js](https://nodejs.org) must be installed. We recommend using the latest stable version. Tests are run with
8
+ a [Gulp](http://gulpjs.com) task so the `gulp-cli` tool must be installed via `npm`
10
9
 
11
10
  % npm install -g gulp-cli
12
11
 
13
12
  Then, `make` commands will install other dependencies as needed.
14
13
 
14
+ ### Linting Your Code
15
+ This project uses [eslint](https://github.com/eslint/eslint) to help you write quality JavaScript code by checking for common formatting errors, enforcing style rules, and suggesting changes that conform to best practices.
16
+
17
+ % npm run lint-test
18
+
19
+
15
20
  ### All Assignments
16
21
 
17
22
  % make
@@ -16,65 +16,68 @@ const gulp = require('gulp'),
16
16
  eslint = require('gulp-eslint'),
17
17
  jasmine = require('gulp-jasmine'),
18
18
  babel = require('gulp-babel'),
19
- polyfill = require('babel/polyfill'),
19
+ polyfill = require('babel-polyfill'),
20
20
  del = require('del'),
21
- argv = require('yargs').argv,
21
+ argv = require('yargs').argv,
22
22
  inputDir = getInputDirectory(argv),
23
23
  outputDir = getOutputDirectory(argv);
24
24
 
25
25
  // Gulp tasks definition
26
26
 
27
- gulp.task('default', [ 'test' ]);
27
+ gulp.task('default', ['test']);
28
28
 
29
- gulp.task('test', [ 'babel' ], function () {
30
- return gulp.src([ outputDir + '/*.spec.js' ])
29
+ gulp.task('test', ['babel'], function () {
30
+ return gulp.src([outputDir + '/*.spec.js'])
31
31
  .pipe(jasmine());
32
32
  });
33
33
 
34
34
  gulp.task('babel', function () {
35
- return gulp.src([ inputDir + '/*.js', inputDir + '/lib/*.js' ])
36
- .pipe(babel())
35
+ return gulp.src([inputDir + '/*.js', inputDir + '/lib/*.js'])
36
+ .pipe(babel({
37
+ plugins: ["babel-plugin-transform-object-rest-spread"].map(require.resolve),
38
+ presets: ['babel-preset-env'].map(require.resolve)
39
+ }))
37
40
  .pipe(gulp.dest(outputDir));
38
41
  });
39
42
 
40
43
  gulp.task('lint', function () {
41
- return gulp.src([ inputDir + '/*.js' ])
44
+ return gulp.src([inputDir + '/*.js'])
42
45
  .pipe(eslint({
43
- envs: [
46
+ envs: [
44
47
  'es6' //turns on all es6 features except modules
45
48
  ],
46
- rules: {
49
+ rules: {
47
50
  // full documentation here : http://eslint.org/docs/rules
48
51
 
49
52
  // Possible errors
50
- 'comma-dangle': [2, 'never'], // don't let a comma at the end of object properties or array element
51
- 'no-cond-assign': [2, 'always'], // no assignments in conditional statements
52
- 'no-console': 2, // no console.log() statements in production code
53
- 'no-constant-condition': 2, // no constants in conditional statements
54
- 'no-control-regex': 2, // no control characters in regex's
55
- 'no-debugger': 2, // no debugger in productin code
56
- 'no-dupe-args': 2, // no duplicated arguments in functions
57
- 'no-dupe-keys': 2, // no duplicated keys when creating object literals
58
- 'no-duplicate-case': 2, // no duplicated `case` in `switch` statements
53
+ 'comma-dangle': [2, 'never'], // don't let a comma at the end of object properties or array element
54
+ 'no-cond-assign': [2, 'always'], // no assignments in conditional statements
55
+ 'no-console': 2, // no console.log() statements in production code
56
+ 'no-constant-condition': 2, // no constants in conditional statements
57
+ 'no-control-regex': 2, // no control characters in regex's
58
+ 'no-debugger': 2, // no debugger in productin code
59
+ 'no-dupe-args': 2, // no duplicated arguments in functions
60
+ 'no-dupe-keys': 2, // no duplicated keys when creating object literals
61
+ 'no-duplicate-case': 2, // no duplicated `case` in `switch` statements
59
62
  'no-empty-character-class': 2, // disallow the use of empty character classes in regular expressions
60
- 'no-empty': 2, // no empty blocks
61
- 'no-ex-assign': 2, // do not assign any value to an Exception raised
62
- 'no-extra-boolean-cast': 2, // do not use !!falseExpression to cast to boolean
63
- 'no-extra-parens': 2, // do not use extra parenthesis
64
- 'no-extra-semi': 2, // do not use extra semicolons
65
- 'no-func-assign': 2, // do not overwrite variables declared as functions
66
- 'no-inner-declarations': [2, 'both'], // only declare var's and funct's on function scope
67
- 'no-invalid-regexp': 2, // validates string arguments passed to RegExp constructor
68
- 'no-irregular-whitespace': 2, // detects special characters used as spaces
69
- 'no-negated-in-lhs': 2, // do not use negation in the left operand in an `in` expression
70
- 'no-obj-calls': 2, // prevent calling global objects as if they were functions
71
- 'no-regex-spaces': 2, // do not use multiple spaces in regex's
72
- 'no-sparse-arrays': 2, // do not use sparse arrays (empty elements)
73
- 'no-unexpected-multiline': 2, // Avoid code that looks like two expressions but is actually one
74
- 'no-unreachable': 2, // detects unreachable statements (after return, throw,...)
75
- 'use-isnan': 2, // do not compare with `NaN` value, use isNan() instead
76
- 'valid-jsdoc': 2, // ensure JSDoc comments are valid
77
- 'valid-typeof': 2 // ensure that the results of typeof are compared against a valid string
63
+ 'no-empty': 2, // no empty blocks
64
+ 'no-ex-assign': 2, // do not assign any value to an Exception raised
65
+ 'no-extra-boolean-cast': 2, // do not use !!falseExpression to cast to boolean
66
+ 'no-extra-parens': 2, // do not use extra parenthesis
67
+ 'no-extra-semi': 2, // do not use extra semicolons
68
+ 'no-func-assign': 2, // do not overwrite variables declared as functions
69
+ 'no-inner-declarations': [2, 'both'], // only declare var's and funct's on function scope
70
+ 'no-invalid-regexp': 2, // validates string arguments passed to RegExp constructor
71
+ 'no-irregular-whitespace': 2, // detects special characters used as spaces
72
+ 'no-negated-in-lhs': 2, // do not use negation in the left operand in an `in` expression
73
+ 'no-obj-calls': 2, // prevent calling global objects as if they were functions
74
+ 'no-regex-spaces': 2, // do not use multiple spaces in regex's
75
+ 'no-sparse-arrays': 2, // do not use sparse arrays (empty elements)
76
+ 'no-unexpected-multiline': 2, // Avoid code that looks like two expressions but is actually one
77
+ 'no-unreachable': 2, // detects unreachable statements (after return, throw,...)
78
+ 'use-isnan': 2, // do not compare with `NaN` value, use isNan() instead
79
+ 'valid-jsdoc': 2, // ensure JSDoc comments are valid
80
+ 'valid-typeof': 2 // ensure that the results of typeof are compared against a valid string
78
81
  },
79
82
  ecmaFeatures: {
80
83
  'modules': true //this gives us modules :)
@@ -85,5 +88,5 @@ gulp.task('lint', function () {
85
88
  });
86
89
 
87
90
  gulp.task('clean', function (cb) {
88
- del([ outputDir ], cb);
91
+ del([outputDir], cb);
89
92
  });
@@ -9,10 +9,15 @@
9
9
  "url": "https://github.com/exercism/xecmascript"
10
10
  },
11
11
  "devDependencies": {
12
- "babel": "~5.8.29",
12
+ "babel-cli": "^6.24.1",
13
+ "babel-core": "^6.24.1",
14
+ "babel-plugin-transform-object-rest-spread": "^6.23.0",
15
+ "babel-polyfill": "^6.23.0",
16
+ "babel-preset-env": "^1.3.3",
17
+ "babel-preset-es2015": "^6.24.1",
13
18
  "del": "~2.0.2",
14
19
  "gulp": "~3.9.0",
15
- "gulp-babel": "~5.3.0",
20
+ "gulp-babel": "^6.1.2",
16
21
  "gulp-eslint": "^1.1.0",
17
22
  "gulp-jasmine": "~2.4.2",
18
23
  "yargs": "~3.27.0"
@@ -16,65 +16,68 @@ const gulp = require('gulp'),
16
16
  eslint = require('gulp-eslint'),
17
17
  jasmine = require('gulp-jasmine'),
18
18
  babel = require('gulp-babel'),
19
- polyfill = require('babel/polyfill'),
19
+ polyfill = require('babel-polyfill'),
20
20
  del = require('del'),
21
- argv = require('yargs').argv,
21
+ argv = require('yargs').argv,
22
22
  inputDir = getInputDirectory(argv),
23
23
  outputDir = getOutputDirectory(argv);
24
24
 
25
25
  // Gulp tasks definition
26
26
 
27
- gulp.task('default', [ 'test' ]);
27
+ gulp.task('default', ['test']);
28
28
 
29
- gulp.task('test', [ 'babel' ], function () {
30
- return gulp.src([ outputDir + '/*.spec.js' ])
29
+ gulp.task('test', ['babel'], function () {
30
+ return gulp.src([outputDir + '/*.spec.js'])
31
31
  .pipe(jasmine());
32
32
  });
33
33
 
34
34
  gulp.task('babel', function () {
35
- return gulp.src([ inputDir + '/*.js', inputDir + '/lib/*.js' ])
36
- .pipe(babel())
35
+ return gulp.src([inputDir + '/*.js', inputDir + '/lib/*.js'])
36
+ .pipe(babel({
37
+ plugins: ["babel-plugin-transform-object-rest-spread"].map(require.resolve),
38
+ presets: ['babel-preset-env'].map(require.resolve)
39
+ }))
37
40
  .pipe(gulp.dest(outputDir));
38
41
  });
39
42
 
40
43
  gulp.task('lint', function () {
41
- return gulp.src([ inputDir + '/*.js' ])
44
+ return gulp.src([inputDir + '/*.js'])
42
45
  .pipe(eslint({
43
- envs: [
46
+ envs: [
44
47
  'es6' //turns on all es6 features except modules
45
48
  ],
46
- rules: {
49
+ rules: {
47
50
  // full documentation here : http://eslint.org/docs/rules
48
51
 
49
52
  // Possible errors
50
- 'comma-dangle': [2, 'never'], // don't let a comma at the end of object properties or array element
51
- 'no-cond-assign': [2, 'always'], // no assignments in conditional statements
52
- 'no-console': 2, // no console.log() statements in production code
53
- 'no-constant-condition': 2, // no constants in conditional statements
54
- 'no-control-regex': 2, // no control characters in regex's
55
- 'no-debugger': 2, // no debugger in productin code
56
- 'no-dupe-args': 2, // no duplicated arguments in functions
57
- 'no-dupe-keys': 2, // no duplicated keys when creating object literals
58
- 'no-duplicate-case': 2, // no duplicated `case` in `switch` statements
53
+ 'comma-dangle': [2, 'never'], // don't let a comma at the end of object properties or array element
54
+ 'no-cond-assign': [2, 'always'], // no assignments in conditional statements
55
+ 'no-console': 2, // no console.log() statements in production code
56
+ 'no-constant-condition': 2, // no constants in conditional statements
57
+ 'no-control-regex': 2, // no control characters in regex's
58
+ 'no-debugger': 2, // no debugger in productin code
59
+ 'no-dupe-args': 2, // no duplicated arguments in functions
60
+ 'no-dupe-keys': 2, // no duplicated keys when creating object literals
61
+ 'no-duplicate-case': 2, // no duplicated `case` in `switch` statements
59
62
  'no-empty-character-class': 2, // disallow the use of empty character classes in regular expressions
60
- 'no-empty': 2, // no empty blocks
61
- 'no-ex-assign': 2, // do not assign any value to an Exception raised
62
- 'no-extra-boolean-cast': 2, // do not use !!falseExpression to cast to boolean
63
- 'no-extra-parens': 2, // do not use extra parenthesis
64
- 'no-extra-semi': 2, // do not use extra semicolons
65
- 'no-func-assign': 2, // do not overwrite variables declared as functions
66
- 'no-inner-declarations': [2, 'both'], // only declare var's and funct's on function scope
67
- 'no-invalid-regexp': 2, // validates string arguments passed to RegExp constructor
68
- 'no-irregular-whitespace': 2, // detects special characters used as spaces
69
- 'no-negated-in-lhs': 2, // do not use negation in the left operand in an `in` expression
70
- 'no-obj-calls': 2, // prevent calling global objects as if they were functions
71
- 'no-regex-spaces': 2, // do not use multiple spaces in regex's
72
- 'no-sparse-arrays': 2, // do not use sparse arrays (empty elements)
73
- 'no-unexpected-multiline': 2, // Avoid code that looks like two expressions but is actually one
74
- 'no-unreachable': 2, // detects unreachable statements (after return, throw,...)
75
- 'use-isnan': 2, // do not compare with `NaN` value, use isNan() instead
76
- 'valid-jsdoc': 2, // ensure JSDoc comments are valid
77
- 'valid-typeof': 2 // ensure that the results of typeof are compared against a valid string
63
+ 'no-empty': 2, // no empty blocks
64
+ 'no-ex-assign': 2, // do not assign any value to an Exception raised
65
+ 'no-extra-boolean-cast': 2, // do not use !!falseExpression to cast to boolean
66
+ 'no-extra-parens': 2, // do not use extra parenthesis
67
+ 'no-extra-semi': 2, // do not use extra semicolons
68
+ 'no-func-assign': 2, // do not overwrite variables declared as functions
69
+ 'no-inner-declarations': [2, 'both'], // only declare var's and funct's on function scope
70
+ 'no-invalid-regexp': 2, // validates string arguments passed to RegExp constructor
71
+ 'no-irregular-whitespace': 2, // detects special characters used as spaces
72
+ 'no-negated-in-lhs': 2, // do not use negation in the left operand in an `in` expression
73
+ 'no-obj-calls': 2, // prevent calling global objects as if they were functions
74
+ 'no-regex-spaces': 2, // do not use multiple spaces in regex's
75
+ 'no-sparse-arrays': 2, // do not use sparse arrays (empty elements)
76
+ 'no-unexpected-multiline': 2, // Avoid code that looks like two expressions but is actually one
77
+ 'no-unreachable': 2, // detects unreachable statements (after return, throw,...)
78
+ 'use-isnan': 2, // do not compare with `NaN` value, use isNan() instead
79
+ 'valid-jsdoc': 2, // ensure JSDoc comments are valid
80
+ 'valid-typeof': 2 // ensure that the results of typeof are compared against a valid string
78
81
  },
79
82
  ecmaFeatures: {
80
83
  'modules': true //this gives us modules :)
@@ -85,5 +88,5 @@ gulp.task('lint', function () {
85
88
  });
86
89
 
87
90
  gulp.task('clean', function (cb) {
88
- del([ outputDir ], cb);
91
+ del([outputDir], cb);
89
92
  });
@@ -9,10 +9,15 @@
9
9
  "url": "https://github.com/exercism/xecmascript"
10
10
  },
11
11
  "devDependencies": {
12
- "babel": "~5.8.29",
12
+ "babel-cli": "^6.24.1",
13
+ "babel-core": "^6.24.1",
14
+ "babel-plugin-transform-object-rest-spread": "^6.23.0",
15
+ "babel-polyfill": "^6.23.0",
16
+ "babel-preset-env": "^1.3.3",
17
+ "babel-preset-es2015": "^6.24.1",
13
18
  "del": "~2.0.2",
14
19
  "gulp": "~3.9.0",
15
- "gulp-babel": "~5.3.0",
20
+ "gulp-babel": "^6.1.2",
16
21
  "gulp-eslint": "^1.1.0",
17
22
  "gulp-jasmine": "~2.4.2",
18
23
  "yargs": "~3.27.0"
@@ -16,65 +16,68 @@ const gulp = require('gulp'),
16
16
  eslint = require('gulp-eslint'),
17
17
  jasmine = require('gulp-jasmine'),
18
18
  babel = require('gulp-babel'),
19
- polyfill = require('babel/polyfill'),
19
+ polyfill = require('babel-polyfill'),
20
20
  del = require('del'),
21
- argv = require('yargs').argv,
21
+ argv = require('yargs').argv,
22
22
  inputDir = getInputDirectory(argv),
23
23
  outputDir = getOutputDirectory(argv);
24
24
 
25
25
  // Gulp tasks definition
26
26
 
27
- gulp.task('default', [ 'test' ]);
27
+ gulp.task('default', ['test']);
28
28
 
29
- gulp.task('test', [ 'babel' ], function () {
30
- return gulp.src([ outputDir + '/*.spec.js' ])
29
+ gulp.task('test', ['babel'], function () {
30
+ return gulp.src([outputDir + '/*.spec.js'])
31
31
  .pipe(jasmine());
32
32
  });
33
33
 
34
34
  gulp.task('babel', function () {
35
- return gulp.src([ inputDir + '/*.js', inputDir + '/lib/*.js' ])
36
- .pipe(babel())
35
+ return gulp.src([inputDir + '/*.js', inputDir + '/lib/*.js'])
36
+ .pipe(babel({
37
+ plugins: ["babel-plugin-transform-object-rest-spread"].map(require.resolve),
38
+ presets: ['babel-preset-env'].map(require.resolve)
39
+ }))
37
40
  .pipe(gulp.dest(outputDir));
38
41
  });
39
42
 
40
43
  gulp.task('lint', function () {
41
- return gulp.src([ inputDir + '/*.js' ])
44
+ return gulp.src([inputDir + '/*.js'])
42
45
  .pipe(eslint({
43
- envs: [
46
+ envs: [
44
47
  'es6' //turns on all es6 features except modules
45
48
  ],
46
- rules: {
49
+ rules: {
47
50
  // full documentation here : http://eslint.org/docs/rules
48
51
 
49
52
  // Possible errors
50
- 'comma-dangle': [2, 'never'], // don't let a comma at the end of object properties or array element
51
- 'no-cond-assign': [2, 'always'], // no assignments in conditional statements
52
- 'no-console': 2, // no console.log() statements in production code
53
- 'no-constant-condition': 2, // no constants in conditional statements
54
- 'no-control-regex': 2, // no control characters in regex's
55
- 'no-debugger': 2, // no debugger in productin code
56
- 'no-dupe-args': 2, // no duplicated arguments in functions
57
- 'no-dupe-keys': 2, // no duplicated keys when creating object literals
58
- 'no-duplicate-case': 2, // no duplicated `case` in `switch` statements
53
+ 'comma-dangle': [2, 'never'], // don't let a comma at the end of object properties or array element
54
+ 'no-cond-assign': [2, 'always'], // no assignments in conditional statements
55
+ 'no-console': 2, // no console.log() statements in production code
56
+ 'no-constant-condition': 2, // no constants in conditional statements
57
+ 'no-control-regex': 2, // no control characters in regex's
58
+ 'no-debugger': 2, // no debugger in productin code
59
+ 'no-dupe-args': 2, // no duplicated arguments in functions
60
+ 'no-dupe-keys': 2, // no duplicated keys when creating object literals
61
+ 'no-duplicate-case': 2, // no duplicated `case` in `switch` statements
59
62
  'no-empty-character-class': 2, // disallow the use of empty character classes in regular expressions
60
- 'no-empty': 2, // no empty blocks
61
- 'no-ex-assign': 2, // do not assign any value to an Exception raised
62
- 'no-extra-boolean-cast': 2, // do not use !!falseExpression to cast to boolean
63
- 'no-extra-parens': 2, // do not use extra parenthesis
64
- 'no-extra-semi': 2, // do not use extra semicolons
65
- 'no-func-assign': 2, // do not overwrite variables declared as functions
66
- 'no-inner-declarations': [2, 'both'], // only declare var's and funct's on function scope
67
- 'no-invalid-regexp': 2, // validates string arguments passed to RegExp constructor
68
- 'no-irregular-whitespace': 2, // detects special characters used as spaces
69
- 'no-negated-in-lhs': 2, // do not use negation in the left operand in an `in` expression
70
- 'no-obj-calls': 2, // prevent calling global objects as if they were functions
71
- 'no-regex-spaces': 2, // do not use multiple spaces in regex's
72
- 'no-sparse-arrays': 2, // do not use sparse arrays (empty elements)
73
- 'no-unexpected-multiline': 2, // Avoid code that looks like two expressions but is actually one
74
- 'no-unreachable': 2, // detects unreachable statements (after return, throw,...)
75
- 'use-isnan': 2, // do not compare with `NaN` value, use isNan() instead
76
- 'valid-jsdoc': 2, // ensure JSDoc comments are valid
77
- 'valid-typeof': 2 // ensure that the results of typeof are compared against a valid string
63
+ 'no-empty': 2, // no empty blocks
64
+ 'no-ex-assign': 2, // do not assign any value to an Exception raised
65
+ 'no-extra-boolean-cast': 2, // do not use !!falseExpression to cast to boolean
66
+ 'no-extra-parens': 2, // do not use extra parenthesis
67
+ 'no-extra-semi': 2, // do not use extra semicolons
68
+ 'no-func-assign': 2, // do not overwrite variables declared as functions
69
+ 'no-inner-declarations': [2, 'both'], // only declare var's and funct's on function scope
70
+ 'no-invalid-regexp': 2, // validates string arguments passed to RegExp constructor
71
+ 'no-irregular-whitespace': 2, // detects special characters used as spaces
72
+ 'no-negated-in-lhs': 2, // do not use negation in the left operand in an `in` expression
73
+ 'no-obj-calls': 2, // prevent calling global objects as if they were functions
74
+ 'no-regex-spaces': 2, // do not use multiple spaces in regex's
75
+ 'no-sparse-arrays': 2, // do not use sparse arrays (empty elements)
76
+ 'no-unexpected-multiline': 2, // Avoid code that looks like two expressions but is actually one
77
+ 'no-unreachable': 2, // detects unreachable statements (after return, throw,...)
78
+ 'use-isnan': 2, // do not compare with `NaN` value, use isNan() instead
79
+ 'valid-jsdoc': 2, // ensure JSDoc comments are valid
80
+ 'valid-typeof': 2 // ensure that the results of typeof are compared against a valid string
78
81
  },
79
82
  ecmaFeatures: {
80
83
  'modules': true //this gives us modules :)
@@ -85,5 +88,5 @@ gulp.task('lint', function () {
85
88
  });
86
89
 
87
90
  gulp.task('clean', function (cb) {
88
- del([ outputDir ], cb);
91
+ del([outputDir], cb);
89
92
  });
@@ -9,10 +9,15 @@
9
9
  "url": "https://github.com/exercism/xecmascript"
10
10
  },
11
11
  "devDependencies": {
12
- "babel": "~5.8.29",
12
+ "babel-cli": "^6.24.1",
13
+ "babel-core": "^6.24.1",
14
+ "babel-plugin-transform-object-rest-spread": "^6.23.0",
15
+ "babel-polyfill": "^6.23.0",
16
+ "babel-preset-env": "^1.3.3",
17
+ "babel-preset-es2015": "^6.24.1",
13
18
  "del": "~2.0.2",
14
19
  "gulp": "~3.9.0",
15
- "gulp-babel": "~5.3.0",
20
+ "gulp-babel": "^6.1.2",
16
21
  "gulp-eslint": "^1.1.0",
17
22
  "gulp-jasmine": "~2.4.2",
18
23
  "yargs": "~3.27.0"