Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
Spring clean
Browse files Browse the repository at this point in the history
  • Loading branch information
Darren Hurley committed Feb 28, 2017
1 parent 51b5a04 commit 2d1b3cf
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/.gitignore
/circle.yml
/ft.yml
/n.Makefile
/Makefile

/.idea/
Expand Down
18 changes: 14 additions & 4 deletions n.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ NPM_INSTALL = npm prune --production=false && npm install
BOWER_INSTALL = bower prune && bower install --config.registry.search=http://registry.origami.ft.com --config.registry.search=https://bower.herokuapp.com
JSON_GET_VALUE = grep $1 | head -n 1 | sed 's/[," ]//g' | cut -d : -f 2
IS_GIT_IGNORED = grep -q $(if $1, $1, $@) .gitignore
VERSION = v1.5.5
VERSION = v14
APP_NAME = $(shell cat package.json 2>/dev/null | $(call JSON_GET_VALUE,name))
DONE = echo ✓ $@ done
CONFIG_VARS = curl -fsL https://ft-next-config-vars.herokuapp.com/$1/$(call APP_NAME)$(if $2,.$2,) -H "Authorization: `heroku config:get APIKEY --app ft-next-config-vars`"
Expand Down Expand Up @@ -92,7 +92,7 @@ ifneq ($(CIRCLE_BUILD_NUM),)
# The app is using n-ui
ifneq ($(shell grep -s -Fim 1 n-ui bower.json),)
# versions in package.json and bower.json are not equal
ifneq ($(shell grep -s -Fim 1 \"version\" bower_components/n-ui/.bower.json | sed s/,//),$(shell grep -s -Fim 1 \"version\" node_modules/@financial-times/n-ui/package.json | sed s/,//))
ifneq ($(shell awk '$$1 == "\"version\":" {print $$2}' bower_components/n-ui/.bower.json | sed s/,//),$(shell awk '$$1 == "\"version\":" {print $$2}' node_modules/@financial-times/n-ui/package.json | sed s/,//))
$(error 'Projects using n-ui must maintain parity between versions. Rebuild without cache and update your bower.json and package.json if necessary')
endif
endif
Expand Down Expand Up @@ -157,7 +157,7 @@ heroku-cli:
# VERIFY SUB-TASKS

_verify_eslint:
@if [ -e .eslintrc.js ]; then $(call GLOB,'*.js') | xargs eslint && $(DONE); fi
@if [ -e .eslintrc.js ]; then $(call GLOB,'*.js') | xargs eslint --ignore-pattern '!' && $(DONE); fi

_verify_lintspaces:
@if [ -e .editorconfig ] && [ -e package.json ]; then $(call GLOB) | xargs lintspaces -e .editorconfig -i js-comments -i html-comments && $(DONE); fi
Expand All @@ -175,7 +175,9 @@ _verify_pa11y_testable:
_run_pa11y:
echo $(CIRCLE_BRANCH)
ifneq ($(CIRCLE_BRANCH),)
@export TEST_URL=http://${TEST_APP}.herokuapp.com; pa11y-ci;
@export TEST_URL=${TEST_APP}; \
echo ${TEST_APP} | grep http -s || export TEST_URL=http://${TEST_APP}.herokuapp.com; \
pa11y-ci;
else
@export TEST_URL=http://local.ft.com:3002; pa11y-ci;
endif
Expand Down Expand Up @@ -211,3 +213,11 @@ hel%: ## help: Show this help message.
@echo ""
@echo "targets:"
@grep -Eh '^.+:\ ##\ .+' ${MAKEFILE_LIST} | cut -d ' ' -f '3-' | column -t -s ':'

# Wrapper for make deploy which prevents it running when build is a nightly
deploy-by-day:
ifeq ($(FT_NIGHTLY_BUILD),)
$(MAKE) deploy
else
echo "Nightly build - exiting before deploy"
endif
13 changes: 5 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
{
"name": "@financial-times/n-logger",
"version": "0.0.0",
"main": "dist/main.js",
"repository": {
"type": "git",
"url": "git://github.com/Financial-Times/next-logger.git"
},
"license": "MIT",
"main": "dist/main.js",
"repository": "Financial-Times/next-logger.git",
"scripts": {
"prepublish": "make build"
},
"dependencies": {
"request": "^2.67.0",
"winston": "^1.1.1"
"winston": "^2.3.1"
},
"devDependencies": {
"babel-cli": "^6.5.1",
Expand All @@ -21,8 +18,8 @@
"chai": "^3.4.0",
"chai-string": "^1.1.6",
"eslint": "^3.0.1",
"lintspaces-cli": "^0.3.0",
"mocha": "^2.2.1",
"lintspaces-cli": "^0.6.0",
"mocha": "^3.2.0",
"npm-prepublish": "^1.2.1",
"sinon": "^1.17.0",
"sinon-chai": "^2.8.0"
Expand Down

0 comments on commit 2d1b3cf

Please sign in to comment.