Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@
"react/jsx-first-prop-new-line": 0
},
"settings": {
"import/resolver": {
"webpack": {
"config": "webpack_configs/devServer.config.js"
}
}
"import/resolver": "webpack"
},
"globals": {
"i18n": false,
Expand Down
4 changes: 4 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
[ignore]
.*/node_modules/fbjs/.*

[options]
module.system.node.resolve_dirname=node_modules
module.system.node.resolve_dirname=app
2 changes: 1 addition & 1 deletion app/commands/commandBindings/tab.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* @flow weak */
import { dispatch as $d } from '../../store'
import store from 'app/mobxStore'
import store from 'mobxStore'
import * as Tab from 'commons/Tab/actions'
import * as PaneActions from 'components/Pane/actions'

Expand Down
2 changes: 1 addition & 1 deletion app/components/Editor/reducer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { extendObservable, createTransformer, action } from 'mobx'
import { handleActions } from 'utils/actions'
import EditorTabState, { Tab, TabGroup } from './state'
import store from 'app/mobxStore'
import store from 'mobxStore'
import {
TAB_CREATE,
TAB_CREATE_IN_GROUP,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"enzyme-to-json": "^1.5.0",
"eslint": "^3.15.0",
"eslint-config-airbnb": "^14.1.0",
"eslint-import-resolver-webpack": "^0.3.0",
"eslint-import-resolver-webpack": "^0.8.1",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^4.0.0",
"eslint-plugin-react": "^6.9.0",
Expand Down
22 changes: 8 additions & 14 deletions webpack_configs/common.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const merge = require('webpack-merge')
const GitRevisionPlugin = require('git-revision-webpack-plugin')
const gitRevisionPlugin = new GitRevisionPlugin()

const rootDir = path.resolve(__dirname, '..')
const PROJECT_ROOT = path.resolve(__dirname, '..')

module.exports = function (options={}) {
const {
Expand All @@ -21,24 +21,18 @@ module.exports = function (options={}) {
`${process.env.QINIU_SERVER}/` : path.join('/', staticDir, '/');
return {
entry: {
main: [path.join(rootDir, 'app')],
workspaces: [path.join(rootDir, 'app/workspaces_standalone')],
main: [path.join(PROJECT_ROOT, 'app')],
workspaces: [path.join(PROJECT_ROOT, 'app/workspaces_standalone')],
vendor: ['babel-polyfill', 'react', 'react-dom', 'redux', 'react-redux'],
},
output: {
publicPath,
path: path.join(rootDir, 'build', staticDir),
path: path.join(PROJECT_ROOT, 'build', staticDir),
filename: '[name].[hash].js'
},
resolve: {
extensions: ['*', '.js', '.jsx'],
alias: {
'app': path.join(rootDir, 'app'),
'utils': path.join(rootDir, 'app/utils'),
'config': path.join(rootDir, 'app/config.js'),
'commons': path.join(rootDir, 'app/commons'),
'components': path.join(rootDir, 'app/components'),
}
modules: ['node_modules', path.join(PROJECT_ROOT, 'app')],
},
resolveLoader: {
modules: [ path.resolve(__dirname, "./loaders/"), "node_modules" ]
Expand All @@ -62,16 +56,16 @@ return {
title: 'Coding WebIDE',
excludeChunks: ['workspaces'],
filename: (staticDir ? '../' : '') + mainEntryHtmlName,
template: path.join(rootDir, 'app/index.html')
template: path.join(PROJECT_ROOT, 'app/index.html')
}),
new HtmlWebpackPlugin({
title: 'Coding WebIDE',
excludeChunks: ['main'],
filename: (staticDir ? '../' : '') + workspacesEntryHtmlName,
template: path.join(rootDir, 'app/workspaces_standalone/index.html')
template: path.join(PROJECT_ROOT, 'app/workspaces_standalone/index.html')
}),
new CopyWebpackPlugin([{
from: path.join(rootDir, 'static/favicon.ico'),
from: path.join(PROJECT_ROOT, 'static/favicon.ico'),
to: (staticDir ? '../' : './'),
}])
],
Expand Down
9 changes: 6 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2276,18 +2276,21 @@ eslint-import-resolver-node@^0.2.0:
object-assign "^4.0.1"
resolve "^1.1.6"

eslint-import-resolver-webpack@^0.3.0:
version "0.3.2"
resolved "http://registry.npm.taobao.org/eslint-import-resolver-webpack/download/eslint-import-resolver-webpack-0.3.2.tgz#8b9b7279c1fe1d4fe10b2e0d2eec4e1780b3acb6"
eslint-import-resolver-webpack@^0.8.1:
version "0.8.1"
resolved "http://registry.npm.taobao.org/eslint-import-resolver-webpack/download/eslint-import-resolver-webpack-0.8.1.tgz#c7f8b4d5bd3c5b489457e5728c5db1c4ffbac9aa"
dependencies:
array-find "^1.0.0"
debug "^2.2.0"
enhanced-resolve "~0.9.0"
find-root "^0.1.1"
has "^1.0.1"
interpret "^1.0.0"
is-absolute "^0.2.3"
lodash.get "^3.7.0"
node-libs-browser "^1.0.0"
resolve "^1.2.0"
semver "^5.3.0"

eslint-module-utils@^2.0.0:
version "2.0.0"
Expand Down