Skip to content

Commit

Permalink
Swap toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhammerl committed Nov 19, 2017
1 parent 350dc5b commit 2c5e8aa
Show file tree
Hide file tree
Showing 10 changed files with 76 additions and 63 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["es2015"]
}
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
max_line_length = null
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
node_modules/
npm-debug.log
.DS_Store
.DS_Store
package-lock.json

# VIM Swap Files
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-v][a-z]
[._]sw[a-p]
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
language: node_js
sudo: false
node_js:
- 4.1
before_install:
- npm install -g grunt-cli
- lts/*
notifications:
email:
recipients:
Expand Down
23 changes: 23 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Run ES6 Tests",
"type": "node",
"request": "launch",
"cwd": "${workspaceRoot}",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"stopOnEntry": false,
"args": [
"./src/*-unit.js",
"--require", "babel-register", "testutils.js",
"--reporter", "spec",
"--no-timeouts"
],
"runtimeArgs": [
"--nolazy"
],
"sourceMaps": true
}
]
}
59 changes: 0 additions & 59 deletions Gruntfile.js

This file was deleted.

7 changes: 7 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

rm -rf $PWD/dist
babel src --out-dir dist --ignore '**/*-unit.js' --source-maps inline
git reset
git add $PWD/dist
git commit -m 'Updating dist files' -n
20 changes: 20 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

json_value() {
KEY=$1
num=$2
awk -F"[,:}]" '{for(i=1;i<=NF;i++){if($i~/'$KEY'\042/){print $(i+1)}}}' | tr -d '"' | sed -n ${num}p
}

# read version from package.json and trim leading/trailing whitespace
version=`less package.json | json_value version 1 | sed -e 's/^ *//' -e 's/ *$//'`
prefix="v"
# tag, push, publish
echo -e "\n> tagging $prefix$version"
git tag "$prefix$version"
echo -e "\n> pushing commits to origin"
git push
echo -e "\n> pushing tags to origin"
git push --tags
echo -e "\n> publishing on npm"
npm publish
3 changes: 3 additions & 0 deletions testutils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { expect } from 'chai'

global.expect = expect

0 comments on commit 2c5e8aa

Please sign in to comment.