Skip to content

Commit

Permalink
updated deps, fixed various issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rybon committed Mar 4, 2018
1 parent 1f57832 commit d5d9780
Show file tree
Hide file tree
Showing 23 changed files with 4,790 additions and 3,668 deletions.
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ module.name_mapper.extension='css' -> 'empty/object'
# module.system.node.resolve_dirname=node_modules
# module.system.node.resolve_dirname=src
module.name_mapper='^\(assets\|components\|domains\|features\|routes\|store\|styles\|utils\)\/\(.*\)$' -> '<PROJECT_ROOT>/src/\1/\2'
module.name_mapper='^\(.DS_Store\|index.html\|index.jsx\|speedrun\|speedrunsLeastNumberOfBoxMoves.json\|speedrunsLeastNumberOfPlayerMoves.json\)$' -> '<PROJECT_ROOT>/src/\1'
module.name_mapper='^\(assets\|components\|domains\|features\|routes\|store\|styles\|utils\)$' -> '<PROJECT_ROOT>/src/\1/index'

[version]
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@ Sokoban implemented in React Redux.

### Running

- `npm install`
- `npm install -g flow-typed`
- `npm start` or
- `npm run build` for a production build
* `npm install`
* `npm start` or
* `npm run build` for a production build

### Playing

- Press the arrow keys for navigating through the menu and moving the player
- Press the space bar to enter a menu option
- Press the B key to go back to a previous screen
- Press the Z key to undo a single move while playing a level
- Press the R key to restart a level
- Press the + or - minus keys to zoom in or out
- Press the M key to return to the main menu
- No mouse support!
* Press the arrow keys for navigating through the menu and moving the player
* Press the space bar to enter a menu option
* Press the B key to go back to a previous screen
* Press the Z key to undo a single move while playing a level
* Press the R key to restart a level
* Press the + or - minus keys to zoom in or out
* Press the M key to return to the main menu
* No mouse support!
File renamed without changes.
17 changes: 9 additions & 8 deletions configs/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ const { name } = require('../package')

const isProduction = process.env.NODE_ENV === 'production'

const src = path.resolve(__dirname, '..', 'src')
const dist = path.resolve(__dirname, '..', 'dist')
const nodeModules = path.resolve(__dirname, '..', 'node_modules')

const title = name
.split('')
.map((character, index) => {
Expand All @@ -29,7 +33,7 @@ module.exports = {
'./src/index'
],
output: {
path: path.resolve(__dirname, '..', 'dist'),
path: dist,
filename: '[name].js',
chunkFilename: '[name].js'
},
Expand All @@ -53,7 +57,7 @@ module.exports = {
test: /\.(js|jsx)$/,
loader: 'babel-loader',
exclude: /node_modules/,
include: path.resolve(__dirname, '..', 'src')
include: src
},
{
test: /\.css$/,
Expand All @@ -80,12 +84,12 @@ module.exports = {
options: {
sourceMap: true,
plugins: () => [
postcssImport({ path: path.resolve(__dirname, '..', 'src') }),
postcssImport({ path: src }),
postcssCssnext(),
postcssUrl({
url: 'inline',
maxSize: 300,
basePath: path.resolve(__dirname, '..', 'src')
basePath: src
}),
postcssFlexbugsFixes()
]
Expand All @@ -96,10 +100,7 @@ module.exports = {
]
},
resolve: {
modules: [
path.resolve(__dirname, '..', 'src'),
path.resolve(__dirname, '..', 'node_modules')
],
modules: [src, nodeModules],
extensions: ['.js', '.jsx', '.json', '.css', '.png', '.gif']
}
}
7 changes: 5 additions & 2 deletions configs/webpack.production.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ const SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin') // eslint-
const WebpackPwaManifest = require('webpack-pwa-manifest') // eslint-disable-line import/no-extraneous-dependencies
const { name, description } = require('../package')

const root = path.resolve(__dirname, '..')
const favicon = path.resolve(__dirname, '..', 'src', 'assets', 'favicon.png')

const title = name
.split('')
.map((character, index) => {
Expand All @@ -36,7 +39,7 @@ webpackConfig.output.chunkFilename = '[name].[chunkhash].js'
webpackConfig.output.publicPath = PUBLIC_PATH
webpackConfig.plugins = [
webpackConfig.plugins[0],
new CleanWebpackPlugin(['dist'], { root: path.resolve(__dirname, '..') }),
new CleanWebpackPlugin(['dist'], { root }),
webpackConfig.plugins[webpackConfig.plugins.length - 1],
new ExtractTextPlugin({
filename: '[name].[contenthash].css',
Expand Down Expand Up @@ -94,7 +97,7 @@ webpackConfig.plugins = [
start_url: '/',
icons: [
{
src: path.resolve(__dirname, '..', 'src', 'assets', 'favicon.png'),
src: favicon,
sizes: [96, 128, 192, 256, 384, 512],
destination: '/'
}
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/connected-react-router_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 6e245267dc2c77f3c65b17a86ac788dc
// flow-typed version: <<STUB>>/connected-react-router_v^4.3.0/flow_v0.63.1
// flow-typed signature: ea63c4628157912d6849df9b1885c9e5
// flow-typed version: <<STUB>>/connected-react-router_v^4.3.0/flow_v0.66.0

/**
* This is an autogenerated libdef stub for:
Expand Down
127 changes: 127 additions & 0 deletions flow-typed/npm/history_v4.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
// flow-typed signature: 984f6785a321187ac15c3434bbd7f25d
// flow-typed version: 568ec63cee/history_v4.x.x/flow_>=v0.25.x

declare module "history/createBrowserHistory" {
declare function Unblock(): void;

declare export type Action = "PUSH" | "REPLACE" | "POP";

declare export type BrowserLocation = {
pathname: string,
search: string,
hash: string,
// Browser and Memory specific
state: string,
key: string,
};

declare export type BrowserHistory = {
length: number,
location: BrowserLocation,
action: Action,
push: (path: string, Array<mixed>) => void,
replace: (path: string, Array<mixed>) => void,
go: (n: number) => void,
goBack: () => void,
goForward: () => void,
listen: Function,
block: (message: string) => Unblock,
block: ((location: BrowserLocation, action: Action) => string) => Unblock,
push: (path: string) => void,
};

declare type HistoryOpts = {
basename?: string,
forceRefresh?: boolean,
getUserConfirmation?: (
message: string,
callback: (willContinue: boolean) => void,
) => void,
};

declare export default (opts?: HistoryOpts) => BrowserHistory;
}

declare module "history/createMemoryHistory" {
declare function Unblock(): void;

declare export type Action = "PUSH" | "REPLACE" | "POP";

declare export type MemoryLocation = {
pathname: string,
search: string,
hash: string,
// Browser and Memory specific
state: string,
key: string,
};

declare export type MemoryHistory = {
length: number,
location: MemoryLocation,
action: Action,
index: number,
entries: Array<string>,
push: (path: string, Array<mixed>) => void,
replace: (path: string, Array<mixed>) => void,
go: (n: number) => void,
goBack: () => void,
goForward: () => void,
// Memory only
canGo: (n: number) => boolean,
listen: Function,
block: (message: string) => Unblock,
block: ((location: MemoryLocation, action: Action) => string) => Unblock,
push: (path: string) => void,
};

declare type HistoryOpts = {
initialEntries?: Array<string>,
initialIndex?: number,
keyLength?: number,
getUserConfirmation?: (
message: string,
callback: (willContinue: boolean) => void,
) => void,
};

declare export default (opts?: HistoryOpts) => MemoryHistory;
}

declare module "history/createHashHistory" {
declare function Unblock(): void;

declare export type Action = "PUSH" | "REPLACE" | "POP";

declare export type HashLocation = {
pathname: string,
search: string,
hash: string,
};

declare export type HashHistory = {
length: number,
location: HashLocation,
action: Action,
push: (path: string, Array<mixed>) => void,
replace: (path: string, Array<mixed>) => void,
go: (n: number) => void,
goBack: () => void,
goForward: () => void,
listen: Function,
block: (message: string) => Unblock,
block: ((location: HashLocation, action: Action) => string) => Unblock,
push: (path: string) => void,
};

declare type HistoryOpts = {
basename?: string,
hashType: "slash" | "noslash" | "hashbang",
getUserConfirmation?: (
message: string,
callback: (willContinue: boolean) => void,
) => void,
};

declare export default (opts?: HistoryOpts) => HashHistory;
}
Loading

0 comments on commit d5d9780

Please sign in to comment.