Skip to content
This repository was archived by the owner on May 4, 2019. It is now read-only.

Commit c6f9161

Browse files
committed
Implement transpilation
1 parent 7a8df18 commit c6f9161

File tree

5 files changed

+23
-37
lines changed

5 files changed

+23
-37
lines changed

.babelrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"presets": ["es2015", "stage-0"],
3+
"plugins": [
4+
"add-module-exports",
5+
]
6+
}

.gitignore

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,3 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
6-
# Runtime data
7-
pids
8-
*.pid
9-
*.seed
10-
11-
# Directory for instrumented libs generated by jscoverage/JSCover
12-
lib-cov
13-
14-
# Coverage directory used by tools like istanbul
15-
coverage
16-
17-
# nyc test coverage
18-
.nyc_output
19-
20-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
21-
.grunt
22-
23-
# node-waf configuration
24-
.lock-wscript
25-
26-
# Compiled binary addons (http://nodejs.org/api/addons.html)
27-
build/Release
28-
29-
# Dependency directories
1+
lib
302
node_modules
31-
jspm_packages
32-
33-
# Optional npm cache directory
343
.npm
35-
36-
# Optional REPL history
37-
.node_repl_history

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.PHONY: build help
2+
3+
help:
4+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
5+
6+
install: package.json ## install dependencies
7+
@npm install
8+
9+
build: ## compile ES6 files to JS
10+
@NODE_ENV=production ./node_modules/.bin/babel ./src -d lib --ignore '*.spec.js'

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "aor-json-rest-client",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"description": "A local REST client for admin-on-rest",
5-
"main": "index.js",
5+
"main": "lib/index.js",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1"
88
},
@@ -24,6 +24,10 @@
2424
},
2525
"homepage": "https://github.com/marmelab/aor-json-rest-client#readme",
2626
"devDependencies": {
27+
"babel-cli": "^6.18.0",
28+
"babel-plugin-add-module-exports": "^0.2.1",
29+
"babel-preset-es2015": "^6.18.0",
30+
"babel-preset-stage-0": "^6.16.0",
2731
"fakerest": "~1.2.1"
2832
}
2933
}

index.js renamed to src/index.js

File renamed without changes.

0 commit comments

Comments
 (0)