From 1ba0346811ab235b6dfeb52949ae3e8939fbd675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillaume=20G=C3=A9rard?= Date: Sat, 17 Mar 2018 12:42:45 +0100 Subject: [PATCH] Setup jsonlint tests and configuration for TravisCI --- .gitignore | 18 ++++++++++++++++++ .travis.yml | 16 ++++++++++++++++ Makefile | 2 +- package.json | 13 +++++++++++-- 4 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 .travis.yml diff --git a/.gitignore b/.gitignore index e43b0f9..392fc0d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,19 @@ +# dependencies +node_modules + +# Only apps should have lockfiles +yarn.lock +package-lock.json + +# misc +npm-debug.log* +yarn-error.log + +# OS generated files .DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..12d843e --- /dev/null +++ b/.travis.yml @@ -0,0 +1,16 @@ +--- +language: node_js +node_js: + # we recommend testing addons with the same minimum supported node version as Ember CLI + # so that your addon works for all apps + - "4" + +sudo: false +dist: trusty + +cache: + directories: + - $HOME/.npm + +before_install: + - npm config set spin false diff --git a/Makefile b/Makefile index b5a172c..8182123 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,6 @@ update: node scripts/importer $(REGISTRY_CACHE) data/json test: - jshint data/json/*.json + find ./data/json/*.json -exec ./node_modules/.bin/jsonlint -q {} \; .PHONY: update test diff --git a/package.json b/package.json index 5420ca2..cbd2482 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,9 @@ { "name": "language-subtag-registry", "version": "0.3.18", - "implements": ["CommonJS/Modules/1.0"], + "implements": [ + "CommonJS/Modules/1.0" + ], "description": "Full BCP 47 language subtag data from the official IANA repository, in JSON format with multiple indices.", "homepage": "https://github.com/mattcg/language-subtag-registry", "repository": { @@ -12,6 +14,10 @@ { "name": "Matthew Caruana Galizia", "email": "m@m.cg" + }, + { + "name": "Guillaume GĂ©rard", + "email": "guillaume.gerard88@gmail.com" } ], "licenses": [ @@ -29,5 +35,8 @@ "subtags", "rfc5646", "language" - ] + ], + "devDependencies": { + "jsonlint": "1.x.x" + } }