Skip to content

Instantly share code, notes, and snippets.

View vschoener's full-sized avatar
💭
New Year's resolution coming :)

Vincent Schoener vschoener

💭
New Year's resolution coming :)
View GitHub Profile
@vschoener
vschoener / main.ts
Last active August 12, 2020 14:37
medium say-bye-to-relative-path
import { GoogleService } from '@src/services/google.service';
import { AwsService } from '@services/aws.service';
import { AwsService as AWS } from '@/services/aws.service';
new AwsService().log('aws service using @services/aws.service');
new GoogleService().call('google service using @src/services/google.service');
new AWS().log('aws service alias using @/services/aws.service');
@vschoener
vschoener / google.service.test.ts
Created August 11, 2020 14:34
medium say-bye-to-relative-path
// This is just use to demonstrated the path alias import
import { GoogleService } from '@src/services/google.service';
console.log(new GoogleService().call('test'));
@vschoener
vschoener / aws.service.ts
Created August 11, 2020 14:33
medium say-bye-to-relative-path
// This is just use to demonstrated the path alias import
import { AwsService } from '@services/aws.service';
console.log(new AwsService().log('test'));
@vschoener
vschoener / .eslintrc
Created August 11, 2020 14:26
eslintrc medium say-bye-to-relative-path
{
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended",
"plugin:import/errors",
@vschoener
vschoener / tsconfig.json
Last active August 12, 2020 14:34
tsconfig medium say-bye-to-relative-path
{
"compilerOptions": {
"module": "commonjs",
"declaration": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"target": "es2019",
@vschoener
vschoener / gist:0252b74b6835541d8b1be14bfe3571b3
Last active August 11, 2020 08:15
fixed main example Setup TypeScript project with art
import * as fs from 'fs';
import { GoogleService } from './services/google.service';
import { AwsService } from './services/aws.service';
const user = {
name: 'john',
lastname: 'doe',
};
@vschoener
vschoener / gist:681939478675c395c8dbdd6331165124
Last active August 11, 2020 08:00
main example Setup TypeScript project with art
import {GoogleService } from './services/google.service'
import {AwsService} from './services/aws.service'
import * as fs from 'fs'
const user = {
name: "john",
"lastname": "doe",}
console.log(new AwsService().log("test"))
@vschoener
vschoener / .eslintrc
Last active August 10, 2020 13:05
eslintrc Medium Setup TypeScript project with art
{
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended",
"plugin:import/errors",
@vschoener
vschoener / .prettierc
Created August 10, 2020 12:10
prettierc Medium Setup TypeScript project with art
{
"singleQuote": true,
"trailingComma": "all"
}
@vschoener
vschoener / tsconfig
Created August 10, 2020 11:59
tsconfig for Medium Setup TypeScript project with art
{
"compilerOptions": {
"module": "commonjs",
"declaration": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"target": "es2019",