Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move package.json/webpack.config to root directory #1522

Merged
merged 2 commits into from
Jan 15, 2017
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: 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