Skip to content

Commit

Permalink
fix build. circular deps which confused flow and bundler. add cache a…
Browse files Browse the repository at this point in the history
…nd parallel flags to make build faster
  • Loading branch information
chrisnojima committed May 15, 2018
1 parent a56b477 commit 94ba3f9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
6 changes: 4 additions & 2 deletions shared/actions/fs/platform-specific.desktop.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ import {spawn, execFileSync} from 'child_process'
import path from 'path'
import {putActionIfOnPath, navigateTo, navigateAppend, navigateUp} from '../route-tree'

import {copyToDownloadDir} from './platform-specific'

type pathType = 'file' | 'directory'

// pathToURL takes path and converts to (file://) url.
Expand Down Expand Up @@ -284,6 +282,10 @@ function openFinderPopup(action: FsGen.OpenFinderPopupPayload) {
)
}

function copyToDownloadDir(path: string, mime: string) {
return new Promise((resolve, reject) => resolve())
}

function* platformSpecificSaga(): Saga.SagaGenerator<any, any> {
yield Saga.safeTakeEveryPure(FsGen.openInFileUI, openInFileUISaga)
yield Saga.safeTakeEvery(FsGen.fuseStatus, fuseStatusSaga)
Expand Down
5 changes: 4 additions & 1 deletion shared/actions/fs/platform-specific.ios.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
// @flow
import * as Saga from '../../util/saga'
import * as FsGen from '../fs-gen'
import {copyToDownloadDir} from './platform-specific'
import {share, save} from './common.native'

function copyToDownloadDir(path: string, mime: string) {
return new Promise((resolve, reject) => resolve())
}

function* platformSpecificSaga(): Saga.SagaGenerator<any, any> {
yield Saga.safeTakeEveryPure(FsGen.share, share)
yield Saga.safeTakeEvery(FsGen.save, save)
Expand Down
7 changes: 2 additions & 5 deletions shared/actions/fs/platform-specific.js.flow
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
// @flow
import * as Saga from '../../util/saga'

export function copyToDownloadDir(path: string, mime: string) {
return new Promise((resolve, reject) => resolve())
}

export function* platformSpecificSaga(): Saga.SagaGenerator<any, any> {}
declare export function copyToDownloadDir(path: string, mime: string): Promise<void>
declare export function platformSpecificSaga(): Saga.SagaGenerator<any, any>
2 changes: 2 additions & 0 deletions shared/desktop/webpack.config.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ const config = (_, {mode}) => {
optimization: {
minimizer: [
new UglifyJSPlugin({
cache: true,
parallel: true,
sourceMap: true,
uglifyOptions: {
compress: {
Expand Down

0 comments on commit 94ba3f9

Please sign in to comment.