Skip to content

Commit

Permalink
Merge pull request #1522 from getredash/reorg
Browse files Browse the repository at this point in the history
Move package.json/webpack.config to root directory
  • Loading branch information
arikfr authored Jan 15, 2017
2 parents 8f1750b + 0954213 commit 29de13b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ BASE_VERSION=$(shell python ./manage.py version | cut -d + -f 1)
FILENAME=$(CIRCLE_ARTIFACTS)/$(NAME).$(VERSION).tar.gz

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

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

upload:
python bin/release_manager.py $(CIRCLE_SHA1) $(BASE_VERSION) $(FILENAME)
Expand Down
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies:
- pip install pymongo==3.2.1
- make deps
cache_directories:
- client/node_modules/
- node_modules/
test:
override:
- nosetests --with-xunit --xunit-file=$CIRCLE_TEST_REPORTS/junit.xml --with-coverage --cover-package=redash tests/
Expand Down
File renamed without changes.
5 changes: 2 additions & 3 deletions client/package.json → package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"name": "redash-frontend",
"name": "redash-client",
"version": "1.0.0",
"description": "The frontend part of Redash.",
"main": "index.js",
"scripts": {
"test": "NODE_ENV=test karma start",
"start": "webpack-dev-server --content-base app",
"build": "rm -rf dist/ && NODE_ENV=production node node_modules/.bin/webpack",
"build": "rm -rf ./client/dist/ && NODE_ENV=production node node_modules/.bin/webpack",
"watch": "webpack --watch --progress --colors -d"
},
"repository": {
Expand Down
8 changes: 4 additions & 4 deletions client/webpack.config.js → webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ var path = require('path');

var config = {
entry: {
app: './app/index.js'
app: './client/app/index.js'
},
output: {
// path: process.env.NODE_ENV === 'production' ? './dist' : './dev',
path: './dist',
path: './client/dist',
filename: '[name].[chunkhash].js',
},

Expand Down Expand Up @@ -44,7 +44,7 @@ var config = {
}),
new HtmlWebpackPlugin({
// template: __dirname + '/app/' + 'index.html'
template: './app/index.html'
template: './client/app/index.html'
}),
new ExtractTextPlugin('styles.[chunkhash].css')
],
Expand Down Expand Up @@ -102,7 +102,7 @@ var config = {
};

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

0 comments on commit 29de13b

Please sign in to comment.