This repository has been archived by the owner on Nov 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Set package.json defaults; init tslint, tsconfig, webpack, src,…
… test Squashed commit of the following: commit 63c485f Author: Arturas <a.molcanovas@gmail.com> Date: Tue Sep 25 01:31:05 2018 +0100 Merge remote-tracking branch 'origin/master' into staging # Conflicts: # yarn.lock commit 1b36960 Merge: 1ad96b5 0a91c09 Author: Arturas <a.molcanovas@gmail.com> Date: Tue Sep 25 01:30:11 2018 +0100 Merge branch 'staging' into pkg-json-defaults # Conflicts: # yarn.lock commit 1ad96b5 Author: Arturas <a.molcanovas@gmail.com> Date: Tue Sep 25 01:27:26 2018 +0100 init tests commit 7e03a9e Author: Arturas <a.molcanovas@gmail.com> Date: Tue Sep 25 00:30:06 2018 +0100 remote getter tests commit ee7edd3 Author: Arturas <a.molcanovas@gmail.com> Date: Mon Sep 24 23:51:23 2018 +0100 increase init test timeout & add alobuild to travis cache commit efc393b Author: Arturas <a.molcanovas@gmail.com> Date: Mon Sep 24 23:00:37 2018 +0100 webpack config commit 0b5b54b Author: Arturas <a.molcanovas@gmail.com> Date: Mon Sep 24 22:40:26 2018 +0100 fix exec local TS_NODE_TRANSPILE_ONLY env var commit 3869141 Author: Arturas <a.molcanovas@gmail.com> Date: Mon Sep 24 22:40:13 2018 +0100 ensure no duplicates are set in default deps commit 447dc16 Author: Arturas <a.molcanovas@gmail.com> Date: Mon Sep 24 22:34:21 2018 +0100 add test:watch script commit 79c3c46 Author: Arturas <a.molcanovas@gmail.com> Date: Mon Sep 24 22:28:46 2018 +0100 add typecheck scripts commit 3689731 Author: Arturas <a.molcanovas@gmail.com> Date: Mon Sep 24 22:26:54 2018 +0100 tslint commit a132767 Author: Arturas <a.molcanovas@gmail.com> Date: Mon Sep 24 22:24:07 2018 +0100 build scripts + tsc config commit f212578 Author: Arturas <a.molcanovas@gmail.com> Date: Mon Sep 24 21:45:03 2018 +0100 set typescript version to exact commit a6ba7f4 Author: Arturas <a.molcanovas@gmail.com> Date: Mon Sep 24 21:37:27 2018 +0100 add basic logging commit 0bb8fc4 Author: Arturas <a.molcanovas@gmail.com> Date: Mon Sep 24 20:36:36 2018 +0100 add tslib & types/node to default deps commit f6ffa81 Author: Arturas <a.molcanovas@gmail.com> Date: Sat Sep 22 17:52:57 2018 +0100 stub test case generation commit ec30056 Author: Arturas <a.molcanovas@gmail.com> Date: Sat Sep 22 16:19:22 2018 +0100 default scripts, deps commit 78b49ee Author: Arturas <a.molcanovas@gmail.com> Date: Sat Sep 22 15:58:01 2018 +0100 pkg-version sync impl commit ab6103e Author: Arturas <a.molcanovas@gmail.com> Date: Sat Sep 22 15:46:03 2018 +0100 get npm package version commit aaffbf8 Merge: 1459cc1 a1e0916 Author: Arturas <a.molcanovas@gmail.com> Date: Sat Sep 22 11:45:31 2018 +0100 Merge branch 'staging' into pkg-json-defaults commit 1459cc1 Author: Arturas <a.molcanovas@gmail.com> Date: Wed Sep 19 21:48:12 2018 +0100 base project init commit 956a832 Merge: 0e4bc48 9d63a78 Author: Arturas <a.molcanovas@gmail.com> Date: Tue Sep 18 00:32:00 2018 +0100 Merge branch 'staging' into pkg-json-defaults commit 0e4bc48 Author: Arturas <a.molcanovas@gmail.com> Date: Tue Sep 18 00:31:41 2018 +0100 tmp
- Loading branch information
Showing
37 changed files
with
1,420 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import {Options} from 'yargs'; | ||
import {Obj} from '../interfaces/OptionsObject'; | ||
|
||
export interface HasUmd { | ||
umd: string; | ||
} | ||
|
||
export function addUmd(opts: Obj<Options> = {}): Obj<Options> { | ||
opts.umd = { | ||
describe: 'UMD name of the library', | ||
type: 'string' | ||
}; | ||
|
||
return opts; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import {mkdirpSync} from 'fs-extra'; | ||
import {homedir} from 'os'; | ||
import {join} from 'path'; | ||
|
||
export const CACHE_DIR = join(homedir(), '.cache', 'alobuild'); | ||
|
||
try { | ||
mkdirpSync(CACHE_DIR); | ||
} catch { | ||
//noop | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import {SpawnSyncOptions, SpawnSyncOptionsWithStringEncoding, SpawnSyncReturns} from 'child_process'; | ||
import {sync as xSpawn} from 'cross-spawn'; | ||
import {merge} from 'lodash'; | ||
import {ext} from '../const/ext'; | ||
import {getBin} from './getBin'; | ||
|
||
export function execLocal(path: string, | ||
args: string[] = [], | ||
opts?: SpawnSyncOptions): SpawnSyncReturns<string> { | ||
args = [path].concat(args); | ||
if (ext === 'ts') { | ||
args = [getBin('ts-node', 'ts-node')].concat(args); | ||
} | ||
|
||
const defaultOpts: SpawnSyncOptionsWithStringEncoding = { | ||
encoding: 'utf8', | ||
env: Object.assign({}, process.env, { | ||
TS_NODE_TRANSPILE_ONLY: '1' | ||
}) | ||
}; | ||
const options: SpawnSyncOptionsWithStringEncoding = merge(defaultOpts, opts || {}); | ||
|
||
return xSpawn(process.execPath, args, options); | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import {noop} from 'lodash'; | ||
import * as symbols from 'log-symbols'; | ||
|
||
export class Log { | ||
public static err(txt: string): void { | ||
process.stderr.write(`${symbols.error} ${txt}\n`); | ||
} | ||
|
||
public static info(txt: string): void { | ||
process.stdout.write(`${symbols.info} ${txt}\n`); | ||
} | ||
|
||
public static success(txt: string): void { | ||
process.stdout.write(`${symbols.success} ${txt}\n`); | ||
} | ||
|
||
public static warn(txt: string): void { | ||
process.stdout.write(`${symbols.warning} ${txt}\n`); | ||
} | ||
} | ||
|
||
if (process.env.CI) { | ||
for (const k of ['err', 'info', 'success', 'warn']) { | ||
Log[k] = noop; | ||
} | ||
} |
Oops, something went wrong.