Skip to content

Commit

Permalink
Update dependencies. Update node version.
Browse files Browse the repository at this point in the history
Remove webpack alias.
  • Loading branch information
Thomas Hourlier committed Apr 16, 2016
1 parent c81f357 commit d8c4dc0
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.7
5.8
1 change: 0 additions & 1 deletion config/mocha/mocha.opts.coverage
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
--require node_modules/builder-react-fullstack/config/mocha/null-compiler
--require babel-polyfill
--timeout 20000
--colors
--recursive
9 changes: 2 additions & 7 deletions config/webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { readdirSync } from 'fs';
import webpack from 'webpack';
import IsomorphicToolsPlugin from 'webpack-isomorphic-tools/plugin';
import SplitByPathPlugin from 'webpack-split-by-path';
import makeIsomorphicConfig, { alias } from './webpack.isomorphic.config';
import makeIsomorphicConfig from './webpack.isomorphic.config';

const REGULAR_EXPRESSION = 'regular_expression';
const ROOT = process.cwd();
Expand Down Expand Up @@ -34,10 +34,6 @@ const JS_LOADER = {
};

const context = join(resolve(ROOT), './src');
const webpackAlias = Object.keys(alias).reduce((cur, k) => ({
...cur,
[k]: join(context, alias[k]),
}), {});

const isomorphicToolsPlugin = new IsomorphicToolsPlugin(
makeIsomorphicConfig(context)
Expand All @@ -55,8 +51,7 @@ const commonConfig = {
},

resolve: {
root: resolve(ROOT),
alias: webpackAlias,
root: context,
fallback: join(ROOT, 'node_modules'),
},

Expand Down
25 changes: 0 additions & 25 deletions config/webpack/webpack.isomorphic.config.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,9 @@
import { join } from 'path';

export const alias = {
actions: 'actions',
api: 'api',
client: 'client',
components: 'components',
config: 'config',
constants: 'constants',
containers: 'containers',
decorators: 'decorators',
helpers: 'helpers',
images: 'images',
reducers: 'reducers',
routes: 'routes',
selectors: 'selectors',
server: 'server',
store: 'store',
themes: 'themes',
};

export default function makeConfig(context) {
const isomorphicAlias = Object.keys(alias).reduce((cur, k) => ({
...cur,
[k]: join(context, alias[k]),
}), {});

return {
webpackAssetsFilePath: join(context, '../build/webpack-assets.json'),
webpackStatsFilePath: join(context, '../build/webpack-stats.json'),
alias: isomorphicAlias,
assets: {
images: {
extensions: ['png', 'jpg', 'gif', 'ico', 'svg'],
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default as runner } from './scripts';
export makeIsomorphicConfig from './config/webpack/webpack.isomorphic.config';
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Builder Archetype - React Fullstack",
"main": "lib/index.js",
"scripts": {
"builder:compile": "rm -rf lib && babel index.js --out-dir lib/ && babel scripts --out-dir lib/scripts && babel config --out-dir lib/config",
"builder:compile": "rm -rf lib && babel index.js runner.js --out-dir lib/ && babel scripts --out-dir lib/scripts && babel config --out-dir lib/config",
"builder:gen-dev": "builder-support gen-dev",
"prepublish": "npm run builder:compile",
"eslint": "eslint --color src/**/*.js",
Expand All @@ -13,10 +13,10 @@
"test:all": "NODE_PATH=./src:$NODE_PATH mocha --opts node_modules/builder-react-fullstack/config/mocha/mocha.opts src/**/*-test.js",
"test:all:watch": "NODE_PATH=./src:$NODE_PATH mocha --opts node_modules/builder-react-fullstack/config/mocha/mocha.opts.watch src/**/*-test.js",
"test:all:coverage": "NODE_PATH=./src:$NODE_PATH babel-node node_modules/.bin/istanbul cover --config node_modules/builder-react-fullstack/config/istanbul/.istanbul.yml _mocha -- --opts node_modules/builder-react-fullstack/config/mocha/mocha.opts.coverage src/**/*-test.js",
"bundle": "node node_modules/builder-react-fullstack/lib/index bundle",
"build": "node node_modules/builder-react-fullstack/lib/index build",
"serve": "node node_modules/builder-react-fullstack/lib/index serve",
"release": "node node_modules/builder-react-fullstack/lib/index release"
"bundle": "node node_modules/builder-react-fullstack/lib/runner bundle",
"build": "node node_modules/builder-react-fullstack/lib/runner build",
"serve": "node node_modules/builder-react-fullstack/lib/runner serve",
"release": "node node_modules/builder-react-fullstack/lib/runner release"
},
"repository": {
"type": "git",
Expand Down
1 change: 1 addition & 0 deletions runner.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './scripts';

0 comments on commit d8c4dc0

Please sign in to comment.