Skip to content

Commit

Permalink
Refactor to ES6
Browse files Browse the repository at this point in the history
Compile/Prepublish scripts
  • Loading branch information
Avraam Mavridis authored and AvraamMavridis committed Apr 4, 2016
1 parent dc3ea6c commit 4a66e07
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 17 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["es2015","stage-0"]
}
36 changes: 36 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"rules": {
"quotes": [
2,
"single"
],
"linebreak-style": [
2,
"unix"
],
"semi": [
2,
"always"
],
"no-console": 0,
"max-len": [1, 160],
"quote-props": [1, "consistent-as-needed"],
"no-cond-assign": [2, "except-parens"],
"radix": 0,
"func-names": 0,
"padded-blocks": 0,
"computed-property-spacing": [2, "always"],
"space-infix-ops": 0,
"no-unused-vars": [1, {"vars": "local", "args": "none"}],
"space-before-function-paren": 2,
"space-in-parens": [2, "always"],
"key-spacing": [2, { "align": "colon", "beforeColon": false, "afterColon": true }],
"brace-style": [2, "allman", { "allowSingleLine": true }]
},
"env": {
"es6": true,
"browser": true,
"node": true
},
"extends": "airbnb/base"
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
components
build
node_modules
lib
15 changes: 0 additions & 15 deletions Makefile

This file was deleted.

25 changes: 23 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
{
"name": "unique-selector",
"version": "0.0.4",
"version": "0.0.5",
"description": "Given a DOM node, return a unique CSS selector matching only that element",
"main": "index.js",
"directories": {
"test": "test"
},
"scripts": {
"test": "make"
"test": "npm run compile && mocha --compilers js:babel-register --require babel-polyfill",
"compile": "babel --presets es2015,stage-0,stage-1,stage-2 --require babel-polyfill -d lib/ src/",
"prepublish": "npm run compile",
"watch": "npm-scripts-watcher"
},
"watch": {
"src/**/*.js": [
"compile"
]
},
"repository": {
"type": "git",
Expand All @@ -21,9 +29,22 @@
"event"
],
"author": "Eric Clemmons <eric@smarterspam.com>",
"contributors":[{
"name": "Avraam Mavridis",
"email": "avr.mav@gmail.com"
}],
"license": "MIT",
"devDependencies": {
"babel-cli": "^6.1.18",
"babel-core": "^6.1.18",
"babel-preset-es2015": "^6.1.18",
"babel-preset-stage-0": "^6.1.18",
"babel-register": "^6.3.13",
"component": "~0.10.1",
"eslint": "^2.6.0",
"eslint-config-airbnb": "^6.2.0",
"eslint-config-airbnb-lite": "^1.0.4",
"eslint-plugin-react": "^4.2.3",
"mocha": "~1.7.4",
"mocha-phantomjs": "~1.1.1"
}
Expand Down
File renamed without changes.

0 comments on commit 4a66e07

Please sign in to comment.