Permalink
Browse files

Don't use babel-node, compile to lib

  • Loading branch information...
exogen committed Dec 13, 2015
1 parent 11ccf04 commit 63d8de626682a47b8a63a97ac875b8b5c178a548
View
@@ -1,3 +1,4 @@
node_modules
npm-debug.log*
Verdana.ttf
+lib
View
@@ -0,0 +1,7 @@
+.eslintrc
+.buildpacks
+.babelrc
+src
+Verdana.ttf
+Procfile
+test.html
View
@@ -2,25 +2,25 @@
"name": "travis-matrix",
"version": "1.1.0",
"description": "More advanced badges for your projects using Travis or Sauce Labs.",
- "main": "server/index.js",
+ "main": "lib/index.js",
"engines": {
"node": "4.2.x",
"npm": "3.4.x"
},
"scripts": {
"add-font": "./scripts/add-font.sh",
+ "build": "babel src -d lib",
"check-font": "./scripts/check-font.sh",
+ "clean": "rimraf lib",
"deploy": "./scripts/deploy.sh",
"lint": "eslint .",
- "start": "babel-node server/index.js",
- "start-dev": "nodemon --exec babel-node server/index.js"
+ "prepublish": "npm run clean && npm run build",
+ "start": "node lib/index.js",
+ "start-dev": "nodemon --exec babel-node src/index.js"
},
"author": "Brian Beck",
"license": "MIT",
"dependencies": {
- "babel-cli": "^6.2.0",
- "babel-preset-es2015": "^6.1.18",
- "babel-preset-stage-2": "^6.1.18",
"bluebird": "^3.0.5",
"canvas": "^1.3.4",
"compression": "^1.6.0",
@@ -35,7 +35,10 @@
"svgo": "^0.6.1"
},
"devDependencies": {
+ "babel-cli": "^6.2.0",
"babel-eslint": "^4.1.6",
+ "babel-preset-es2015": "^6.1.18",
+ "babel-preset-stage-2": "^6.1.18",
"eslint": "^1.10.1",
"nodemon": "^1.8.1"
},
View
@@ -6,9 +6,7 @@ set -e
# distributing it via GitHub that's the problem. So, inspired by shields.io,
# this script makes a special temporary branch for Heroku and pushes that.
-# `npm run check-font` would be better, but the resulting double huge npm error
-# message is really annoying.
-./scripts/check-font.sh
+npm run check-font
# Fail if the `heroku` remote isn't there.
git remote show heroku
@@ -18,11 +16,12 @@ heroku buildpacks:set https://github.com/ddollar/heroku-buildpack-multi.git || t
git stash # Stash uncommitted changes.
git checkout -B deploy # Force branch creation/reset.
-git add -f ./Verdana.ttf # Force add ignored font file.
+npm run build
+git add -f Verdana.ttf lib # Force add ignored files.
# Use the same commit message, but add a little note.
git commit -m "$(git log -1 --pretty=%B) [deploy branch: do NOT push to GitHub]"
git push -f heroku deploy:master
-git rm --cached ./Verdana.ttf # Otherwise, switching branches will remove it.
+git rm -r --cached Verdana.ttf lib # Otherwise switching branches will remove them.
git checkout - # Switch back to whatever branch we came from.
git branch -D deploy # Just to prevent someone accidentally pushing to GitHub.
git stash pop --index || true # Restore uncommitted changes, OK if none.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -122,13 +122,13 @@
<img src="/size/npm/victory-bar?gzip=true">
<br>
<img src="/size/npm/victory-label">
- <img src="/size/npm/victory-bar?gzip=true">
+ <img src="/size/npm/victory-label?gzip=true">
<br>
<img src="/size/npm/victory-line">
- <img src="/size/npm/victory-bar?gzip=true">
+ <img src="/size/npm/victory-line?gzip=true">
<br>
<img src="/size/npm/victory-scatter">
- <img src="/size/npm/victory-bar?gzip=true">
+ <img src="/size/npm/victory-scatter?gzip=true">
<br>
</body>
</html>

0 comments on commit 63d8de6

Please sign in to comment.