From 43eae8ff6d0f8b9f61aefa1d406cfefd97237e00 Mon Sep 17 00:00:00 2001 From: Kristofer Sommestad Date: Tue, 23 Jun 2015 15:08:50 +0200 Subject: [PATCH 01/12] Removed .gjslintrc since no longer used --- generators/app/index.js | 1 - generators/app/templates/gjslintrc | 4 ---- test/private-project-test.js | 1 - 3 files changed, 6 deletions(-) delete mode 100644 generators/app/templates/gjslintrc diff --git a/generators/app/index.js b/generators/app/index.js index 24cca4e..e95b02d 100644 --- a/generators/app/index.js +++ b/generators/app/index.js @@ -97,7 +97,6 @@ module.exports = yeoman.generators.Base.extend({ this.copy('eslintignore', '.eslintignore'); this.copy('eslintrc', '.eslintrc'); this.copy('test/eslintrc', 'test/.eslintrc'); - this.copy('gjslintrc', '.gjslintrc'); // Skoog specific ;) }, npmFiles: function() { diff --git a/generators/app/templates/gjslintrc b/generators/app/templates/gjslintrc deleted file mode 100644 index 973cb20..0000000 --- a/generators/app/templates/gjslintrc +++ /dev/null @@ -1,4 +0,0 @@ ---strict ---max_line_length=100 ---disable=0002, 0006 ---exclude_directories='.idea, coverage, node_modules, scripts' diff --git a/test/private-project-test.js b/test/private-project-test.js index e269959..1d0d2e9 100644 --- a/test/private-project-test.js +++ b/test/private-project-test.js @@ -23,7 +23,6 @@ describe('springworks:app (private)', function() { '.gitattributes', '.eslintignore', '.eslintrc', - '.gjslintrc', '.npmignore', 'README.md' ]; From b24448151bea09309ef7f92d0149fd2a5c286188 Mon Sep 17 00:00:00 2001 From: Kristofer Sommestad Date: Tue, 23 Jun 2015 15:19:40 +0200 Subject: [PATCH 02/12] Added more test files in generation --- generators/app/index.js | 5 ++++ generators/app/templates/.istanbul.yml | 8 ++++++ generators/app/templates/_package.json | 35 ++++++++++-------------- generators/app/templates/test/mocha.opts | 6 ++++ test/private-project-test.js | 3 ++ test/public-project-test.js | 1 - 6 files changed, 36 insertions(+), 22 deletions(-) create mode 100644 generators/app/templates/.istanbul.yml create mode 100644 generators/app/templates/test/mocha.opts diff --git a/generators/app/index.js b/generators/app/index.js index e95b02d..b62158a 100644 --- a/generators/app/index.js +++ b/generators/app/index.js @@ -93,6 +93,11 @@ module.exports = yeoman.generators.Base.extend({ } }, + testFiles: function() { + this.copy('.istanbul.yml', '.istanbul.yml'); + this.copy('test/mocha.opts', 'test/mocha.opts'); + }, + lintFiles: function() { this.copy('eslintignore', '.eslintignore'); this.copy('eslintrc', '.eslintrc'); diff --git a/generators/app/templates/.istanbul.yml b/generators/app/templates/.istanbul.yml new file mode 100644 index 0000000..0801504 --- /dev/null +++ b/generators/app/templates/.istanbul.yml @@ -0,0 +1,8 @@ +instrumentation: + include-all-sources: true + +reporting: + print: summary + reports: + - lcov + - teamcity diff --git a/generators/app/templates/_package.json b/generators/app/templates/_package.json index b0827ac..d7dfc17 100644 --- a/generators/app/templates/_package.json +++ b/generators/app/templates/_package.json @@ -4,21 +4,15 @@ "description": "<%= projectDescription %>", "private": <%= privateProject %>,<% if (!privateProject) { %> "license": "MIT",<% } %> - "engines": { - "node": ">=0.10.33" - }, "scripts": { - "test": "NODE_ENV=test istanbul cover --report teamcity --report lcov _mocha -- --ui bdd --check-leaks --recursive --slow 200 --reporter spec --globals 'Intl,IntlPolyfill' test", + "test": "NODE_ENV=test istanbul cover _mocha", "lint": "eslint .",<% if (!privateProject) { %> - "coveralls": "NODE_ENV=test istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- --recursive -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"<% } else { %> - "inspectjs": "jsinspect --threshold 30 ./lib", - "buddyjs": "buddy ./lib", - "quality": "npm run buddyjs && npm run inspectjs && npm run lint", - "test-acceptance": "NODE_ENV=test istanbul cover --report teamcity --report lcov _mocha -- --ui bdd --check-leaks --recursive --slow 200 --reporter spec --globals 'Intl,IntlPolyfill' $(find test/**/acceptance test/acceptance -name '*.js' 2>/dev/null)", - "test-changed": "NODE_ENV=test mocha --ui bdd --check-leaks --recursive --slow 200 --reporter spec --globals 'Intl,IntlPolyfill' $(git diff --name-only test | grep -E '(\\.js)$')", - "test-component": "NODE_ENV=test istanbul cover --report teamcity --report lcov _mocha -- --ui bdd --check-leaks --recursive --slow 200 --reporter spec --globals 'Intl,IntlPolyfill' $(find test/**/component test/component -name *.js 2>/dev/null)", - "test-no-cov": "NODE_ENV=test mocha --ui bdd --check-leaks --recursive --slow 200 --reporter spec --globals 'Intl,IntlPolyfill' test", - "test-unit": "NODE_ENV=test istanbul cover --report teamcity --report lcov _mocha -- --ui bdd --check-leaks --recursive --slow 200 --reporter spec --globals 'Intl,IntlPolyfill' $(find test/**/unit test/unit -name '*.js' 2>/dev/null)"<% } %> + "coveralls": "cat ./coverage/lcov.info | coveralls"<% } else { %> + "test-acceptance": "NODE_ENV=test istanbul cover _mocha -- $(find test/**/acceptance test/acceptance -name '*.js' 2>/dev/null)", + "test-changed": "NODE_ENV=test istanbul cover _mocha -- $(git diff --name-only test | grep -E '(\\.js)$')", + "test-component": "NODE_ENV=test istanbul cover _mocha -- $(find test/**/component test/component -name *.js 2>/dev/null)", + "test-no-cov": "NODE_ENV=test mocha", + "test-unit": "NODE_ENV=test istanbul cover _mocha -- $(find test/**/unit test/unit -name '*.js' 2>/dev/null)"<% } %> }, "repository": { "type": "git", @@ -31,14 +25,13 @@ "dependencies": { }, "devDependencies": { - "buddy.js": "^0.8.0",<% if (!privateProject) { %> + <% if (!privateProject) { %> "coveralls": "^2.11.2",<% } %> - "istanbul": "^0.3.13", - "eslint": "^0.21.2", - "eslint-config-springworks": "^1.0.1", - "eslint-plugin-mocha": "^0.2.2", - "jsinspect": "^0.5.0", - "mocha": "^2.2.1", - "chai": "^2.2.0" + "eslint": "0.23.0", + "eslint-config-springworks": "2.1.2", + "eslint-plugin-mocha": "0.2.2", + "istanbul": "^0.3.15", + "mocha": "^2.2.5", + "@springworks/test-harness": "^1.0.0" } } diff --git a/generators/app/templates/test/mocha.opts b/generators/app/templates/test/mocha.opts new file mode 100644 index 0000000..7f35bf3 --- /dev/null +++ b/generators/app/templates/test/mocha.opts @@ -0,0 +1,6 @@ +--ui bdd +--check-leaks +--recursive +--slow 200 +--reporter spec +--require @springworks/test-harness diff --git a/test/private-project-test.js b/test/private-project-test.js index 1d0d2e9..e9d4ffb 100644 --- a/test/private-project-test.js +++ b/test/private-project-test.js @@ -24,6 +24,9 @@ describe('springworks:app (private)', function() { '.eslintignore', '.eslintrc', '.npmignore', + 'test/.eslintrc', + 'test/mocha.opts', + '.istanbul.yml', 'README.md' ]; assert.file(expected); diff --git a/test/public-project-test.js b/test/public-project-test.js index 651915d..56822d6 100644 --- a/test/public-project-test.js +++ b/test/public-project-test.js @@ -24,7 +24,6 @@ describe('springworks:app (public)', function() { 'LICENSE', '.eslintignore', '.eslintrc', - '.gjslintrc', '.npmignore', 'README.md' ]; From bfa9fd57c402ca4762ba683e1740c4cc08588aca Mon Sep 17 00:00:00 2001 From: Kristofer Sommestad Date: Tue, 23 Jun 2015 15:20:56 +0200 Subject: [PATCH 03/12] Removed npmignore file --- generators/app/index.js | 4 ---- generators/app/templates/npmignore | 2 -- test/private-project-test.js | 1 - test/public-project-test.js | 1 - 4 files changed, 8 deletions(-) delete mode 100644 generators/app/templates/npmignore diff --git a/generators/app/index.js b/generators/app/index.js index b62158a..e6ca846 100644 --- a/generators/app/index.js +++ b/generators/app/index.js @@ -102,10 +102,6 @@ module.exports = yeoman.generators.Base.extend({ this.copy('eslintignore', '.eslintignore'); this.copy('eslintrc', '.eslintrc'); this.copy('test/eslintrc', 'test/.eslintrc'); - }, - - npmFiles: function() { - this.copy('npmignore', '.npmignore'); } }, diff --git a/generators/app/templates/npmignore b/generators/app/templates/npmignore deleted file mode 100644 index c4c50d9..0000000 --- a/generators/app/templates/npmignore +++ /dev/null @@ -1,2 +0,0 @@ -test/** -test-util/** diff --git a/test/private-project-test.js b/test/private-project-test.js index e9d4ffb..15d10b7 100644 --- a/test/private-project-test.js +++ b/test/private-project-test.js @@ -23,7 +23,6 @@ describe('springworks:app (private)', function() { '.gitattributes', '.eslintignore', '.eslintrc', - '.npmignore', 'test/.eslintrc', 'test/mocha.opts', '.istanbul.yml', diff --git a/test/public-project-test.js b/test/public-project-test.js index 56822d6..07d0021 100644 --- a/test/public-project-test.js +++ b/test/public-project-test.js @@ -24,7 +24,6 @@ describe('springworks:app (public)', function() { 'LICENSE', '.eslintignore', '.eslintrc', - '.npmignore', 'README.md' ]; assert.file(expected); From eb431acbb24bb05121db4c36d323a77b9da3d424 Mon Sep 17 00:00:00 2001 From: Kristofer Sommestad Date: Tue, 23 Jun 2015 15:21:08 +0200 Subject: [PATCH 04/12] Ignoring "temp" dir in this project --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e2b1220..6744d0f 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ results npm-debug.log node_modules +temp # IntelliJ .idea From 41e9877a5d0a2a8a0157846e9765368f1ea60063 Mon Sep 17 00:00:00 2001 From: Kristofer Sommestad Date: Tue, 23 Jun 2015 15:24:12 +0200 Subject: [PATCH 05/12] Added more node versions to travis yml --- generators/app/templates/travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/generators/app/templates/travis.yml b/generators/app/templates/travis.yml index a54cebe..f251edc 100644 --- a/generators/app/templates/travis.yml +++ b/generators/app/templates/travis.yml @@ -1,6 +1,8 @@ language: node_js node_js: - "0.10" + - "0.12" + - "iojs" script: - npm run lint - npm test From cc2f0f13a5a5c535cc9775374140396fe6ffa333 Mon Sep 17 00:00:00 2001 From: Kristofer Sommestad Date: Tue, 23 Jun 2015 15:24:21 +0200 Subject: [PATCH 06/12] Removed email notifs from travis yml --- generators/app/templates/travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/generators/app/templates/travis.yml b/generators/app/templates/travis.yml index f251edc..17754be 100644 --- a/generators/app/templates/travis.yml +++ b/generators/app/templates/travis.yml @@ -8,3 +8,5 @@ script: - npm test after_success: - npm run coveralls +notifications: + email: false From 6dd97c3faaafe84dcc0a913c1a1c0cb5c9df8d6f Mon Sep 17 00:00:00 2001 From: Kristofer Sommestad Date: Tue, 23 Jun 2015 15:24:31 +0200 Subject: [PATCH 07/12] Running travis without sudo, for faster tests --- generators/app/templates/travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/generators/app/templates/travis.yml b/generators/app/templates/travis.yml index 17754be..0a509d9 100644 --- a/generators/app/templates/travis.yml +++ b/generators/app/templates/travis.yml @@ -10,3 +10,4 @@ after_success: - npm run coveralls notifications: email: false +sudo: false From 1a217219fe6ee1719dd59e92c3823ad067561816 Mon Sep 17 00:00:00 2001 From: Kristofer Sommestad Date: Tue, 23 Jun 2015 15:25:39 +0200 Subject: [PATCH 08/12] Ignoring all IDEA files in gitignore --- generators/app/templates/gitignore | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/generators/app/templates/gitignore b/generators/app/templates/gitignore index f80fd95..f1f7070 100644 --- a/generators/app/templates/gitignore +++ b/generators/app/templates/gitignore @@ -23,13 +23,11 @@ pids logs results -npm-debug.log node_modules # IntelliJ -.idea/workspace.xml -.idea/tasks.xml -/.idea/misc.xml +.idea +*.iml coverage From cd1cbef22302988982eef618ef4832146d77b8c6 Mon Sep 17 00:00:00 2001 From: Kristofer Sommestad Date: Tue, 23 Jun 2015 15:27:03 +0200 Subject: [PATCH 09/12] Updated generator travis file with newer versions and no sudo --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 760c7a8..ad204ac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,8 @@ language: node_js node_js: - - '0.12' + - "0.10" + - "0.12" + - "iojs" script: - npm run lint - npm test @@ -10,3 +12,4 @@ notifications: email: false slack: secure: V3v+RTLnSF0V1cXRvQTsluiBusOIp2pR/54uD6CjQhv16GCjd2iB7orhbCcynMeaDR5e1eiJLybCKGeXFcfg/M/cZUk+H93nIGvK2jzj0xHAEB6cCOjEAf3BCqD9F3kX/EnMO7TgXO+5ZNK7SvcUw7qhJhYcjPgjdP9ihIwXChU= +sudo: false From 4d4b05443d4f157c58d16440caab03c0e70ea1ae Mon Sep 17 00:00:00 2001 From: Kristofer Sommestad Date: Tue, 23 Jun 2015 15:48:38 +0200 Subject: [PATCH 10/12] Updated to latest ESLint dependencies --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 11457b1..21a4779 100644 --- a/package.json +++ b/package.json @@ -36,9 +36,9 @@ "devDependencies": { "chai": "^2.2.0", "coveralls": "^2.11.2", - "eslint": "^0.21.2", - "eslint-config-springworks": "^1.0.1", - "eslint-plugin-mocha": "^0.2.2", + "eslint": "0.23.0", + "eslint-config-springworks": "2.1.2", + "eslint-plugin-mocha": "0.3.0", "istanbul": "^0.3.13", "mocha": "^2.2.1", "mocha-lcov-reporter": "0.0.1" From 18824fc47bff4956ebab83106aa95b238668cc09 Mon Sep 17 00:00:00 2001 From: Kristofer Sommestad Date: Tue, 23 Jun 2015 15:49:45 +0200 Subject: [PATCH 11/12] Ignoring "temp" dir --- .eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintignore b/.eslintignore index bf7da6a..fa72a74 100644 --- a/.eslintignore +++ b/.eslintignore @@ -5,3 +5,4 @@ scripts/** submodules/** generators/app/templates/** generators/web/templates/** +temp \ No newline at end of file From 2238a6fc4d1ee4ee7de786263dd782002076cab6 Mon Sep 17 00:00:00 2001 From: Kristofer Sommestad Date: Tue, 23 Jun 2015 15:54:08 +0200 Subject: [PATCH 12/12] Only warning about "object-curly-spacing" --- .eslintrc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.eslintrc b/.eslintrc index e5e02dd..7302faa 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,8 +2,9 @@ "extends": "springworks", "rules": { "no-sync": 0, - "dot-location": 0, + "dot-location": 1, "no-console": 0, - "no-process-exit": 0 + "no-process-exit": 0, + "object-curly-spacing": 1 } }