Skip to content

Commit

Permalink
Update dependencies (#2)
Browse files Browse the repository at this point in the history
* update babel and other dependencies, add ES build

* allow tree-shaking with ES modules for ramda

* fix import of placeholder
  • Loading branch information
haveyaseen authored Mar 15, 2019
1 parent 2d701cd commit 558ffca
Show file tree
Hide file tree
Showing 8 changed files with 6,070 additions and 45 deletions.
41 changes: 38 additions & 3 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,39 @@
{
"presets": ["es2015", "stage-2"],
"plugins": ["transform-runtime"]
}
"presets": [
"@babel/preset-env"
],
"plugins": [
"@babel/plugin-transform-runtime",
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-syntax-import-meta",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-json-strings",
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
"@babel/plugin-proposal-function-sent",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-throw-expressions"
],
"env": {
"es": {
"presets": [
[
"@babel/preset-env",
{
"modules": false
}
]
]
},
"cjs": {
"presets": [
"@babel/preset-env"
]
},
}
}
15 changes: 10 additions & 5 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,16 @@
],
"no-plusplus": 0,
"arrow-parens": 0,
"import/no-extraneous-dependencies": 0
"import/no-extraneous-dependencies": 0,
"comma-dangle": ["error", {
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "ignore",
}]
},
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true
}
"ecmaVersion": 6
}
}
}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ node_modules
*.sublime-workspace
.DS_Store
lib
es
.publish
dist
min
*.log
*.log
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
BIN=node_modules/.bin

MOCHA_ARGS= --compilers js:babel-register
MOCHA_ARGS= --require @babel/register
MOCHA_TARGET=src/**/test*.js

clean:
rm -rf lib
rm -rf lib es

build: clean
$(BIN)/babel src --out-dir lib
BABEL_ENV=cjs $(BIN)/babel src --out-dir lib
BABEL_ENV=es $(BIN)/babel src --out-dir es

test: lint
NODE_ENV=test $(BIN)/mocha $(MOCHA_ARGS) $(MOCHA_TARGET)
Expand Down
Loading

0 comments on commit 558ffca

Please sign in to comment.