Skip to content

Commit 29de13b

Browse files
authored
Merge pull request #1522 from getredash/reorg
Move package.json/webpack.config to root directory
2 parents 8f1750b + 0954213 commit 29de13b

5 files changed

+10
-11
lines changed

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ BASE_VERSION=$(shell python ./manage.py version | cut -d + -f 1)
66
FILENAME=$(CIRCLE_ARTIFACTS)/$(NAME).$(VERSION).tar.gz
77

88
deps:
9-
if [ -d "./client/app" ]; then cd client && npm install; fi
10-
if [ -d "./client/app" ]; then cd client && npm run build; fi
9+
if [ -d "./client/app" ]; then npm install; fi
10+
if [ -d "./client/app" ]; then npm run build; fi
1111

1212
pack:
1313
sed -ri "s/^__version__ = '([0-9.]*)'/__version__ = '$(FULL_VERSION)'/" redash/__init__.py
14-
tar -zcv -f $(FILENAME) --exclude="optipng*" --exclude=".git*" --exclude="*.pyc" --exclude="*.pyo" --exclude="venv" --exclude="client/node_modules" --exclude="client/app" *
14+
tar -zcv -f $(FILENAME) --exclude="optipng*" --exclude=".git*" --exclude="*.pyc" --exclude="*.pyo" --exclude="venv" --exclude="node_modules" --exclude="client/app" *
1515

1616
upload:
1717
python bin/release_manager.py $(CIRCLE_SHA1) $(BASE_VERSION) $(FILENAME)

circle.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies:
1515
- pip install pymongo==3.2.1
1616
- make deps
1717
cache_directories:
18-
- client/node_modules/
18+
- node_modules/
1919
test:
2020
override:
2121
- nosetests --with-xunit --xunit-file=$CIRCLE_TEST_REPORTS/junit.xml --with-coverage --cover-package=redash tests/
File renamed without changes.

client/package.json package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
{
2-
"name": "redash-frontend",
2+
"name": "redash-client",
33
"version": "1.0.0",
44
"description": "The frontend part of Redash.",
55
"main": "index.js",
66
"scripts": {
7-
"test": "NODE_ENV=test karma start",
87
"start": "webpack-dev-server --content-base app",
9-
"build": "rm -rf dist/ && NODE_ENV=production node node_modules/.bin/webpack",
8+
"build": "rm -rf ./client/dist/ && NODE_ENV=production node node_modules/.bin/webpack",
109
"watch": "webpack --watch --progress --colors -d"
1110
},
1211
"repository": {

client/webpack.config.js webpack.config.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ var path = require('path');
99

1010
var config = {
1111
entry: {
12-
app: './app/index.js'
12+
app: './client/app/index.js'
1313
},
1414
output: {
1515
// path: process.env.NODE_ENV === 'production' ? './dist' : './dev',
16-
path: './dist',
16+
path: './client/dist',
1717
filename: '[name].[chunkhash].js',
1818
},
1919

@@ -44,7 +44,7 @@ var config = {
4444
}),
4545
new HtmlWebpackPlugin({
4646
// template: __dirname + '/app/' + 'index.html'
47-
template: './app/index.html'
47+
template: './client/app/index.html'
4848
}),
4949
new ExtractTextPlugin('styles.[chunkhash].css')
5050
],
@@ -102,7 +102,7 @@ var config = {
102102
};
103103

104104
if (process.env.NODE_ENV === 'production') {
105-
config.output.path = __dirname + '/dist';
105+
config.output.path = __dirname + '/client/dist';
106106
config.plugins.push(new webpack.optimize.UglifyJsPlugin());
107107
config.devtool = 'source-map';
108108
}

0 commit comments

Comments
 (0)