Skip to content

Commit

Permalink
upgrade babel
Browse files Browse the repository at this point in the history
  • Loading branch information
Raxvis committed Oct 6, 2018
1 parent 0cfcfd7 commit c439836
Show file tree
Hide file tree
Showing 6 changed files with 869 additions and 697 deletions.
18 changes: 0 additions & 18 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,19 @@
"array-bracket-newline": "off",
"array-element-newline": "off",
"brace-style": "off",
"camelcase": "off",
"capitalized-comments": "off",
"class-methods-use-this": "off",
"comma-dangle": ["error", "always-multiline"],
"dot-location": ["error", "property"],
"eol-last": "off",
"global-require": "off",
"id-length": "off",
"indent": ["error", "tab"],
"init-declarations": "off",
"max-len": ["error", 180],
"max-statements-per-line": [
"error",
{
"max": 2
}
],
"multiline-ternary": "off",
"newline-per-chained-call": [
"error",
{
"ignoreChainWithDepth": 3
}
],
"no-confusing-arrow": [
"error",
{
"allowParens": true
}
],
"no-console": "off",
"no-extra-parens": "off",
"no-magic-numbers": "off",
Expand All @@ -50,7 +33,6 @@
"no-tabs": "off",
"no-ternary": "off",
"no-undefined": "off",
"object-curly-spacing": ["error", "always"],
"one-var": "off",
"padded-blocks": "off",
"padding-line-between-statements": [
Expand Down
17 changes: 17 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = (api) => {
api.cache(false);

return {
plugins: ['@babel/plugin-proposal-object-rest-spread'],
presets: [
[
'@babel/preset-env',
{
targets: {
node: '8',
},
},
],
],
};
};
6 changes: 1 addition & 5 deletions loader.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#! /usr/local/bin/node

require('babel-register')({
plugins: ['transform-object-rest-spread'],
presets: [['env', { targets: { node: 'current' } }]],
});

require('@babel/register');
require('./src/loader.js');
34 changes: 20 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"url": "https://prefinem.com"
},
"dependencies": {
"@babel/register": "^7.0.0",
"bencode": "^0.7.0",
"bitfield": "^1.1.2",
"bittorrent-tracker": "^9.10.1",
Expand All @@ -16,15 +17,21 @@
},
"description": "DHT Torrent Scraper",
"devDependencies": {
"babel-core": "^6.26.0",
"babel-eslint": "^9.0.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-env": "^1.6.1",
"eslint": "^5.3.0",
"@babel/cli": "^7.1.0",
"@babel/core": "^7.1.0",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@babel/preset-env": "^7.1.0",
"babel-eslint": "^10.0.0",
"eslint": "^5.6.0",
"eslint-config-prettier": "^3.0.1",
"husky": "^1.0.0",
"lint-staged": "^7.3.0",
"prettify": "^0.1.7"
"prettier": "^1.14.3"
},
"husky": {
"hooks": {
"pre-commit": "yarn staged"
}
},
"keywords": [],
"license": "MIT",
Expand All @@ -40,14 +47,13 @@
"scripts": {
"clean": "yarn lint && yarn prettify",
"lint": "eslint src/*.js --fix",
"precommit": "lint-staged",
"loader": "node ./loader.js",
"migrate": "./node_modules/.bin/knex migrate:latest",
"pm2": "./node_modules/.bin/pm2 start ecosystem.config.js",
"prettify": "prettier --config ./.prettierrc.json --write \"src/*.js\"",
"scraper": "node ./scraper.js",
"staged": "lint-staged",
"start": "node ./index.js",
"old": "node ./old.js",
"migrate": "./node_modules/.bin/knex migrate:latest",
"upgrade": "yarn migrate",
"pm2": "./node_modules/.bin/pm2 start ecosystem.config.js"
"upgrade": "yarn migrate"
},
"version": "1.0.1"
"version": "2.0.0"
}
6 changes: 1 addition & 5 deletions scraper.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#! /usr/local/bin/node

require('babel-register')({
plugins: ['transform-object-rest-spread'],
presets: [['env', { targets: { node: 'current' } }]],
});

require('@babel/register');
require('./src/scraper.js');
Loading

0 comments on commit c439836

Please sign in to comment.