Commit 0284b210 authored by 2breakegg's avatar 2breakegg

Merge remote-tracking branch 'origin/master'

parents 0ac2d4ec 14110e7c
import { ApplicationRef, EventEmitter, Injectable, NgZone } from '@angular/core';
import { Http } from '@angular/http';
import * as crypto from 'crypto';
import { Action, App, AppStatus } from './app';
import { SettingsService } from './settings.sevices';
import * as fs from 'fs';
import { createReadStream, createWriteStream } from 'fs';
import * as path from 'path';
import * as child_process from 'child_process';
import { ChildProcess } from 'child_process';
import * as crypto from 'crypto';
import { remote } from 'electron';
import 'rxjs/Rx';
import * as readline from 'readline';
import { AppLocal } from './app-local';
import * as fs from 'fs';
import * as glob from 'glob';
import * as ini from 'ini';
import * as path from 'path';
import * as readline from 'readline';
import 'rxjs/Rx';
import { Observable, Observer } from 'rxjs/Rx';
import { Action, App, AppStatus } from './app';
import { AppLocal } from './app-local';
import { DownloadService, DownloadStatus } from './download.service';
import { InstallOption } from './install-option';
import { ComparableSet } from './shared/ComparableSet';
import { Observable, Observer } from 'rxjs/Rx';
import { LoginService } from './login.service';
import { SettingsService } from './settings.sevices';
import { ComparableSet } from './shared/ComparableSet';
import Timer = NodeJS.Timer;
import ReadableStream = NodeJS.ReadableStream;
const sudo = require('electron-sudo');
import * as sudo from 'electron-sudo';
const Logger = {
info: (...message: any[]) => {
console.log('AppService [INFO]: ', ...message);
......@@ -345,9 +344,9 @@ export class AppsService {
async copyFile(src: string, dst: string): Promise<any> {
return new Promise((resolve, reject) => {
let readable = createReadStream(src);
let readable = fs.createReadStream(src);
readable.on('open', () => {
let writable = createWriteStream(dst);
let writable = fs.createWriteStream(dst);
writable.on('error', reject);
writable.on('close', resolve);
readable.pipe(writable);
......
......@@ -15,7 +15,7 @@
"release": "tsc && build",
"build:aot": "ngc -p tsconfig-aot.json && rollup -c rollup-config.js",
"tsc": "tsc",
"i18n": "ng-xi18n && sed -i.bak 's/source-language=\"en\"/source-language=\"zh-CN\"/' messages.xlf",
"i18n": "ng-xi18n --i18nFormat 'xlf2' && sed -i.bak 's/source-language=\"en\"/source-language=\"zh-CN\"/' messages.xlf",
"i18n:upload": "npm run i18n && curl --location --user ${TRANSIFEX_USERNAME}:${TRANSIFEX_PASSWORD} --request PUT --header 'Content-type: multipart/form-data' --form content=@messages.xlf https://www.transifex.com/api/2/project/moecube/resource/messages/content/",
"i18n:translate": "open https://www.transifex.com/moecube/moecube/translate/#en_US/messages/108367258?translated=no",
"i18n:download": "curl --output locale/messages.en-US.xlf --retry 5 --location --user ${TRANSIFEX_USERNAME}:${TRANSIFEX_PASSWORD} https://www.transifex.com/api/2/project/moecube/resource/messages/translation/en_US/?file && sed -i.bak 's/\\&amp;/\\&/g; s/\\&lt;/</g; s/\\&gt;/>/g; s/\\&quot;/\"/g;' locale/messages.en-US.xlf"
......@@ -59,12 +59,12 @@
"devDependencies": {
"@angular/compiler-cli": "latest",
"@angular/platform-server": "latest",
"@types/bootstrap": "latest",
"@types/glob": "latest",
"@types/ini": "latest",
"@types/node": "latest",
"@types/bootstrap": "latest",
"@types/jquery": "latest",
"@types/marked": "latest",
"@types/node": "latest",
"@types/raven-js": "latest",
"@types/tether": "latest",
"@types/typeahead": "latest",
......@@ -75,8 +75,8 @@
"rollup-plugin-commonjs": "latest",
"rollup-plugin-node-resolve": "latest",
"rollup-plugin-uglify": "latest",
"typescript": "latest",
"tslint": "^3.15.1"
"tslint": "^3.15.1",
"typescript": "latest"
},
"build": {
"productName": "MyCard",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment