Skip to content

Commit 9559669

Browse files
committed
Switch toolchain
1 parent 6edf67f commit 9559669

15 files changed

+105
-713
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["es2015"]
3+
}

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
end_of_line = lf
10+
max_line_length = null

.gitignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
1+
node_modules/
2+
npm-debug.log
13
.DS_Store
2-
node_modules
4+
package-lock.json
5+
6+
# VIM Swap Files
7+
[._]*.s[a-v][a-z]
8+
[._]*.sw[a-p]
9+
[._]s[a-v][a-z]
10+
[._]sw[a-p]

.jshintrc

Lines changed: 0 additions & 40 deletions
This file was deleted.

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

.travis.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
language: node_js
22
sudo: false
33
node_js:
4-
- 8
5-
dist: trusty # Chrome needs Ubuntu Trusty
6-
addons:
7-
chrome: stable
8-
before_install:
9-
- npm install -g grunt-cli
4+
- lts/*
105
notifications:
116
email:
127
recipients:

.vscode/launch.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Run ES6 Tests",
6+
"type": "node",
7+
"request": "launch",
8+
"cwd": "${workspaceRoot}",
9+
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
10+
"stopOnEntry": false,
11+
"args": [
12+
"./src/*-unit.js",
13+
"--require", "babel-register", "testutils.js",
14+
"--reporter", "spec",
15+
"--no-timeouts"
16+
],
17+
"runtimeArgs": [
18+
"--nolazy"
19+
],
20+
"sourceMaps": true
21+
}
22+
]
23+
}

Gruntfile.js

Lines changed: 0 additions & 28 deletions
This file was deleted.

package.json

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "emailjs-mime-codec",
33
"description": "Encode and decode quoted printable and base64 strings",
4-
"version": "1.0.4",
5-
"main": "src/emailjs-mime-codec",
4+
"version": "2.0.0",
5+
"main": "src/mimecodec",
66
"homepage": "https://github.com/emailjs/emailjs-mime-codec",
77
"repository": {
88
"type": "git",
@@ -16,19 +16,38 @@
1616
],
1717
"author": "Andris Reinman <[email protected]>",
1818
"scripts": {
19-
"test": "grunt && mocha-chrome test/index.html"
19+
"build": "./scripts/build.sh",
20+
"release": "./scripts/release.sh",
21+
"lint": "$(npm bin)/standard",
22+
"test": "npm run lint && npm run unit",
23+
"unit": "$(npm bin)/mocha './src/*-unit.js' --reporter spec --require babel-register testutils.js",
24+
"test-watch": "$(npm bin)/mocha './src/*-unit.js' --reporter spec --require babel-register testutils.js --watch"
2025
},
2126
"dependencies": {
22-
"emailjs-stringencoding": "~1.0.1"
27+
"emailjs-base64": "^1.1.1",
28+
"text-encoding": "^0.6.4"
2329
},
2430
"devDependencies": {
25-
"amdefine": "^1.0.1",
26-
"chai": "^4.1.1",
27-
"grunt": "^1.0.1",
28-
"grunt-contrib-jshint": "^1.1.0",
29-
"grunt-mocha-test": "^0.13.2",
30-
"mocha": "^3.5.0",
31-
"mocha-chrome": "^0.1.1",
32-
"requirejs": "^2.3.5"
31+
"babel-preset-es2015": "^6.24.1",
32+
"babel-register": "^6.26.0",
33+
"chai": "^4.1.2",
34+
"mocha": "^4.0.1",
35+
"nodemon": "^1.12.1",
36+
"pre-commit": "^1.2.2",
37+
"standard": "^10.0.3"
38+
},
39+
"standard": {
40+
"globals": [
41+
"describe",
42+
"it",
43+
"before",
44+
"beforeAll",
45+
"afterAll",
46+
"after",
47+
"expect"
48+
],
49+
"ignore": [
50+
"dist"
51+
]
3352
}
3453
}

scripts/build.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
rm -rf $PWD/dist
4+
babel src --out-dir dist --ignore '**/*-unit.js' --source-maps inline
5+
git reset
6+
git add $PWD/dist
7+
git commit -m 'Updating dist files' -n

0 commit comments

Comments
 (0)