Skip to content

Commit

Permalink
added babel transpilation
Browse files Browse the repository at this point in the history
  • Loading branch information
0xADADA authored and 0xadada committed Oct 25, 2019
1 parent 0dc200b commit 842c53a
Show file tree
Hide file tree
Showing 9 changed files with 1,591 additions and 29 deletions.
18 changes: 18 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"chrome": "58",
"edge": "17",
"ie": "10",
"firefox": "60",
"safari": "10",
"node": "8.16.2"
}
}
]
]
}

4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- run:
name: Lint
command: yarn lint
command: npm run lint
- run:
name: Test
command: yarn test && yarn coverage
command: npm run test && npm run coverage
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# compiled output
/dist/
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# dependencies
/node_modules


# misc
.env
.tool-versions
Expand All @@ -12,3 +13,5 @@ npm-debug.log*
package-lock.json
yarn-error.log

# built assets
/dist
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
registry=https://npm.pkg.github.com/0xadada
@0xadada:registry=https://npm.pkg.github.com/0xadada
15 changes: 10 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@0xadada/random-emoji",
"version": "1.0.0",
"description": "random emoji function with zero dependencies",
"main": "random-emoji.js",
"main": "dist/index.js",
"repository": "git@github.com:0xadada/random-emoji.git",
"author": "0xADADA <0xadada.pub@0xadada.pub>",
"license": "MIT",
Expand All @@ -11,12 +11,17 @@
"registry": "https://npm.pkg.github.com/"
},
"scripts": {
"coverage": "yarn nyc report --reporter=text-lcov | yarn coveralls",
"lint": "yarn eslint .",
"lint:fix": "yarn eslint . --fix",
"test": "yarn nyc ava"
"coverage": "npx nyc report --reporter=text-lcov | yarn coveralls",
"build": "npx babel src/ --out-dir dist/",
"lint": "npx eslint .",
"lint:fix": "npx eslint . --fix",
"test": "npx nyc ava",
"prepublish": "npm run lint && npm run test && npm run build"
},
"devDependencies": {
"@babel/cli": "^7.6.4",
"@babel/core": "^7.6.4",
"@babel/preset-env": "^7.6.3",
"ava": "^2.4.0",
"coveralls": "^3.0.6",
"eslint": "^6.5.1",
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import random from './random-emoji';
import random from './src/index';

test('without arguments it shows an emoticon', t => {
const a = random();
Expand Down
Loading

0 comments on commit 842c53a

Please sign in to comment.