Skip to content

Commit

Permalink
add banner to bundle; add bundle upon versioning; use p-s
Browse files Browse the repository at this point in the history
  • Loading branch information
boneskull committed Jul 8, 2016
1 parent a90f9b5 commit 9e7853a
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions .banner.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/*! <%= pkg.name %> | <%= pkg.version %> | <%= pkg.homepage %> */
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ indent_style = tab

[*.md]
trim_trailing_whitespace = false

[.banner.ejs]
insert_final_newline = false
7 changes: 7 additions & 0 deletions .package-scripts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"scripts": {
"build": "make mocha.js",
"add-build": "git add mocha.js"
}
}

2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
BROWSERIFY := "node_modules/.bin/browserify"
ESLINT := "node_modules/.bin/eslint"
KARMA := "node_modules/.bin/karma"
BANNERIZE := "node_modules/.bin/bannerize"

REPORTER ?= spec
TM_BUNDLE = JavaScript\ mocha.tmbundle
Expand All @@ -17,6 +18,7 @@ mocha.js: $(SRC) $(SUPPORT)
--ignore 'glob' \
--ignore 'path' \
--ignore 'supports-color' > $@
@$(BANNERIZE) -b .banner.ejs mocha.js

clean:
@printf "==> [Clean]\n"
Expand Down
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,10 @@
"npm": ">= 1.4.x"
},
"scripts": {
"test": "make test"
"test": "make test",
"start": "package-scripts --config .package-scripts.json",
"preversion": "npm test",
"version": "npm start build,add-build"
},
"dependencies": {
"commander": "2.9.0",
Expand All @@ -314,6 +317,7 @@
"to-iso-string": "0.0.2"
},
"devDependencies": {
"bannerize": "^1.0.2",
"browser-stdout": "^1.2.0",
"browserify": "^13.0.0",
"coffee-script": "^1.10.0",
Expand All @@ -326,6 +330,7 @@
"karma-phantomjs-launcher": "^0.2.3",
"karma-sauce-launcher": "^1.0.0",
"karma-spec-reporter": "0.0.26",
"p-s": "^1.0.2",
"phantomjs": "1.9.8",
"rimraf": "^2.5.2",
"should": "^9.0.2",
Expand All @@ -351,5 +356,6 @@
"glob": false,
"path": false,
"supports-color": false
}
},
"homepage": "https://mochajs.org"
}

0 comments on commit 9e7853a

Please sign in to comment.