Skip to content

Commit

Permalink
(build): update build step
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo4815162342 committed Dec 23, 2020
1 parent 0a433d6 commit 5c0ec42
Show file tree
Hide file tree
Showing 31 changed files with 17,601 additions and 9,927 deletions.
12 changes: 9 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
node_modules
**/node_modules/*
**/lib/*
**/bin/*
**/coverage/*
**/build/*

lib
build
bin
bin
coverage
node_modules
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
],
"@typescript-eslint/camelcase": 0
}
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
lib
bin
download
.vscode
.cache/
### Node ###
# Logs
Expand Down
12 changes: 11 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
README.md
README.md
coverage
lib
bin
build

**/node_modules/*
**/lib/*
**/bin/*
**/coverage/*
**/build/*
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"printWidth": 100,
"useTabs": false,
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "none",
"arrowParens": "avoid"
}
6 changes: 0 additions & 6 deletions .prettierrc.js

This file was deleted.

21 changes: 2 additions & 19 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,11 @@
"typescript.tsdk": "node_modules/typescript/lib",
"editor.formatOnSave": true,
"[javascript]": {
"editor.formatOnSave": false
},
"[javascriptreact]": {
"editor.formatOnSave": false
"editor.formatOnSave": true
},
"[typescript]": {
"editor.formatOnSave": false
},
"[typescriptreact]": {
"editor.formatOnSave": false
"editor.formatOnSave": true
},
"eslint.validate": [
{
"language": "typescript",
"autoFix": true
},
{
"language": "typescriptreact",
"autoFix": true
}
],
"eslint.autoFixOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ module.exports = {
testRegex: '(/__tests__/.*|\\.(test|spec))\\.(ts|js)$',
moduleFileExtensions: ['ts', 'js'],
testPathIgnorePatterns: ['<rootDir>[/\\\\](node_modules|bin|lib|build)[/\\\\]'],
transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\].+\\.(js|ts)$'],
transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\].+\\.(js|ts)$']
};
10 changes: 2 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"husky": "^4.3.6",
"jest": "^26.6.3",
"lerna": "^3.20.2",
"lint-staged": "^10.5.3",
"prettier": "^2.2.1",
"rollup": "^2.35.1",
"ts-jest": "^26.4.4",
Expand All @@ -27,13 +26,8 @@
},
"husky": {
"hooks": {
"pre-commit": "yarn workspaces run pre-commit"
"pre-push": "lerna run --concurrency 1 --stream prepush --since HEAD --exclude-dependents",
"pre-commit": "lerna run --concurrency 1 --stream precommit --since HEAD --exclude-dependents"
}
},
"lint-staged": {
"*.{js,ts}": [
"yarn eslint --fix",
"git add"
]
}
}
17 changes: 13 additions & 4 deletions packages/dukascopy-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
"dukascopy-cli": "./bin/index.js"
},
"scripts": {
"type-check": "yarn tsc src/index.ts --noEmit",
"lint": "yarn eslint 'src/**/*.{js,ts}'",
"build": "rollup -c",
"pre-commit": "yarn type-check && yarn lint",
"test": "echo 'tests for CLI go here'",
"test:call": "yarn ts-node src/index.ts -i eurusd -from 2019-02-01 -to 2020-02-09 -t d1 -f csv -v -fl"
"test:call": "yarn ts-node src/index.ts -i eurusd -from 2019-02-01 -to 2020-02-09 -t d1 -f csv -v -fl",
"precommit": "lint-staged",
"prepush": "yarn type-check",
"type-check": "tsc --pretty --noEmit",
"format": "prettier --write .",
"lint": "eslint . --ext ts --ext tsx --ext js"
},
"keywords": [
"cli",
Expand All @@ -39,6 +41,13 @@
"devDependencies": {
"@types/cli-progress": "^1.8.1",
"@types/fs-extra": "^8.0.1",
"lint-staged": "^10.5.3",
"rollup-plugin-preserve-shebangs": "^0.2.0"
},
"lint-staged": {
"src/**/*.{ts,js,json}": [
"yarn lint",
"yarn format"
]
}
}
2 changes: 1 addition & 1 deletion packages/dukascopy-cli/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "./../../tsconfig.json",
"compilerOptions": {
"outDir": "./bin",
"outDir": "./",
"rootDir": "./src"
},
"include": ["./src/**/*"],
Expand Down
19 changes: 14 additions & 5 deletions packages/dukascopy-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@
"scripts": {
"test": "yarn jest",
"test:call": "yarn ts-node dev-utils/test-call.ts",
"type-check": "yarn tsc src/index.ts --noEmit",
"lint": "yarn eslint 'src/**/*.{js,ts}'",
"build": "yarn rollup -c",
"pre-commit": "yarn type-check && yarn lint",
"build-instruments": "yarn ts-node dev-utils/generate-instruments.ts"
"build-instruments": "yarn ts-node dev-utils/generate-instruments.ts",
"precommit": "lint-staged",
"prepush": "yarn type-check",
"type-check": "tsc --pretty --noEmit",
"format": "prettier --write .",
"lint": "eslint . --ext ts --ext tsx --ext js"
},
"author": "leonid.pyrlia",
"license": "MIT",
Expand Down Expand Up @@ -43,7 +45,14 @@
},
"devDependencies": {
"@types/node-fetch": "^2.1.7",
"jest-date-mock": "^1.0.8"
"jest-date-mock": "^1.0.8",
"lint-staged": "^10.5.3"
},
"lint-staged": {
"src/**/*.{ts,js,json}": [
"yarn lint",
"yarn format"
]
},
"jest": {
"automock": false,
Expand Down
1 change: 1 addition & 0 deletions packages/dukascopy-node/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const typescript = require('@rollup/plugin-typescript');
const commonjs = require('@rollup/plugin-commonjs');
const { nodeResolve } = require('@rollup/plugin-node-resolve');
const pkg = require('./package.json');

module.exports = {
input: 'src/index.ts',
output: [
Expand Down
2 changes: 0 additions & 2 deletions packages/dukascopy-node/src/buffer-fetcher/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { splitArrayInChunks, wait } from '../utils/general';
import fetch from 'node-fetch';
import { NotifyFn, BufferFetcherInput, BufferObject } from './types';

const a = 12;

export class BufferFetcher {
batchSize: number;
pauseBetweenBatchesMs: number;
Expand Down
Loading

0 comments on commit 5c0ec42

Please sign in to comment.