From 2e15425597332f52b8e7b6fe36ad2da569dc83d6 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 11 Sep 2017 01:49:18 +0200 Subject: [PATCH 01/18] Update wheel from 0.29.0 to 0.30.0 --- requirements_dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_dev.txt b/requirements_dev.txt index c520b11..483a4d4 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,6 +1,6 @@ pip==9.0.1 punch.py==1.4.0 -wheel==0.29.0 +wheel==0.30.0 watchdog==0.8.3 flake8==3.4.1 tox==2.7.0 From cad41f806c73169b2da35d5eaab8bd18b280c696 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sat, 16 Sep 2017 13:01:25 +0200 Subject: [PATCH 02/18] Update punch.py from 1.4.0 to 1.4.1 --- requirements_dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_dev.txt b/requirements_dev.txt index c520b11..3e4adfd 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,5 +1,5 @@ pip==9.0.1 -punch.py==1.4.0 +punch.py==1.4.1 wheel==0.29.0 watchdog==0.8.3 flake8==3.4.1 From 2a35f97177a8bcdd1dd148b907dfd9b97582869b Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 26 Sep 2017 05:01:41 +0200 Subject: [PATCH 03/18] Update sphinx from 1.6.3 to 1.6.4 --- requirements_dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_dev.txt b/requirements_dev.txt index c520b11..7a30c59 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -5,5 +5,5 @@ watchdog==0.8.3 flake8==3.4.1 tox==2.7.0 coverage==4.4.1 -Sphinx==1.6.3 +Sphinx==1.6.4 isort==4.2.15 \ No newline at end of file From b58b8bb511acbbec13f8419090e1bf88e2ee88c6 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Fri, 29 Sep 2017 23:01:39 +0200 Subject: [PATCH 04/18] Update tox from 2.7.0 to 2.9.1 --- requirements_dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_dev.txt b/requirements_dev.txt index c520b11..b9d65ab 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -3,7 +3,7 @@ punch.py==1.4.0 wheel==0.29.0 watchdog==0.8.3 flake8==3.4.1 -tox==2.7.0 +tox==2.9.1 coverage==4.4.1 Sphinx==1.6.3 isort==4.2.15 \ No newline at end of file From 22c20f11a01ab6d6927af5e46c554359a14c0db1 Mon Sep 17 00:00:00 2001 From: Christian Strappazzon Date: Tue, 3 Oct 2017 15:00:49 +0200 Subject: [PATCH 05/18] Added some logging --- python_vuejs/vuejs.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python_vuejs/vuejs.py b/python_vuejs/vuejs.py index 7908410..ff2c0f1 100644 --- a/python_vuejs/vuejs.py +++ b/python_vuejs/vuejs.py @@ -43,19 +43,23 @@ def install_cli(): @staticmethod def project_setup(project): + click.echo(click.style('running `vue init webpack {project}`'.format(project=project), fg='yellow')) run('vue init webpack {project}'.format(project=project).split()) @staticmethod def install_dependencies(project): with cd(project): + click.echo(click.style('running `npm install`', fg='yellow')) run('npm install'.split()) @staticmethod def dev(): + click.echo(click.style('running `npm run dev`', fg='yellow')) run('npm run dev'.split()) @staticmethod def build(): + click.echo(click.style('running `npm run build`', fg='yellow')) run('npm run build'.split()) From af1a6a3a9bd72552e1b0de4551dcde34a37b1bff Mon Sep 17 00:00:00 2001 From: Christian Strappazzon Date: Tue, 3 Oct 2017 15:01:42 +0200 Subject: [PATCH 06/18] Passing context and invoking command --- python_vuejs/django.py | 6 ++++-- tests/test_django_cli.py | 6 ++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/python_vuejs/django.py b/python_vuejs/django.py index ea1b541..aa5b5b0 100644 --- a/python_vuejs/django.py +++ b/python_vuejs/django.py @@ -90,12 +90,14 @@ def djangofy(project): @cli.command() @click.argument('project') -def djstartvueapp(project): +@click.pass_context +def djstartvueapp(ctx, project): """ Run click commands on bash. """ click.echo(click.style('Creating {project}'.format(project=project), fg='green')) if os.path.isfile('manage.py') and VueJsBuilder.startproject(project).status: - djangofy() + ctx.forward(djangofy) + ctx.invoke(djangofy, project=project) else: click.echo(click.style('Invalid django project directory', fg='red')) diff --git a/tests/test_django_cli.py b/tests/test_django_cli.py index 0f52bb2..0f61475 100644 --- a/tests/test_django_cli.py +++ b/tests/test_django_cli.py @@ -119,8 +119,7 @@ def test_djangofy_already_executed(self): # Then self.assertEqual('Making Vue.js myapp into django app\nCommand already executed\n', result.output) - @patch('python_vuejs.django.djangofy') - def test_djstartvueapp_django_ok(self, mock_djangofy): + def test_djstartvueapp_django_ok(self): with self.runner.isolated_filesystem(): # Given open('manage.py', 'a').close() @@ -132,8 +131,7 @@ def test_djstartvueapp_django_ok(self, mock_djangofy): result = self.runner.invoke(cli.cli, ['djstartvueapp', 'myapp']) # Then mock_vuejsbuilder.assert_called_once() - mock_djangofy.assert_called_once() - self.assertEqual('Creating myapp\n', result.output) + self.assertEqual('Creating myapp\nMaking Vue.js myapp into django app\n', result.output) def test_djstartvueapp_django_ko(self): result = self.runner.invoke(cli.cli, ['djstartvueapp', 'myapp']) From 0fb7e3981d4190a96a4aecfc9c29ae1a928cacc2 Mon Sep 17 00:00:00 2001 From: Christian Strappazzon Date: Tue, 3 Oct 2017 15:07:12 +0200 Subject: [PATCH 07/18] Better error message --- python_vuejs/django.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_vuejs/django.py b/python_vuejs/django.py index aa5b5b0..2df9f66 100644 --- a/python_vuejs/django.py +++ b/python_vuejs/django.py @@ -100,4 +100,4 @@ def djstartvueapp(ctx, project): ctx.forward(djangofy) ctx.invoke(djangofy, project=project) else: - click.echo(click.style('Invalid django project directory', fg='red')) + click.echo(click.style('Invalid django project directory. `manage.py` not found.)', fg='red')) From c6f5f52ec0ddcbdd6a21afaa0c7b04726b6cd081 Mon Sep 17 00:00:00 2001 From: Christian Strappazzon Date: Tue, 3 Oct 2017 15:08:53 +0200 Subject: [PATCH 08/18] Test error message --- python_vuejs/django.py | 2 +- tests/test_django_cli.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python_vuejs/django.py b/python_vuejs/django.py index 2df9f66..7c957a3 100644 --- a/python_vuejs/django.py +++ b/python_vuejs/django.py @@ -100,4 +100,4 @@ def djstartvueapp(ctx, project): ctx.forward(djangofy) ctx.invoke(djangofy, project=project) else: - click.echo(click.style('Invalid django project directory. `manage.py` not found.)', fg='red')) + click.echo(click.style('Invalid django project directory. `manage.py` not found.', fg='red')) diff --git a/tests/test_django_cli.py b/tests/test_django_cli.py index 0f61475..6d4a89d 100644 --- a/tests/test_django_cli.py +++ b/tests/test_django_cli.py @@ -135,4 +135,4 @@ def test_djstartvueapp_django_ok(self): def test_djstartvueapp_django_ko(self): result = self.runner.invoke(cli.cli, ['djstartvueapp', 'myapp']) - self.assertEqual('Creating myapp\nInvalid django project directory\n', result.output) + self.assertEqual('Creating myapp\nInvalid django project directory. `manage.py` not found.\n', result.output) From 01ce5ae4963c1ce0f15bf477851b1f5c505662dc Mon Sep 17 00:00:00 2001 From: Christian Strappazzon Date: Tue, 3 Oct 2017 15:13:24 +0200 Subject: [PATCH 09/18] Version updated from 1.0.6 to 1.0.7 --- punch_version.py | 2 +- python_vuejs/__init__.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/punch_version.py b/punch_version.py index 66c9f90..269cd1a 100644 --- a/punch_version.py +++ b/punch_version.py @@ -1,3 +1,3 @@ major = 1 minor = 0 -patch = 6 +patch = 7 diff --git a/python_vuejs/__init__.py b/python_vuejs/__init__.py index 094a3d5..13c315d 100644 --- a/python_vuejs/__init__.py +++ b/python_vuejs/__init__.py @@ -2,4 +2,4 @@ __author__ = """Christian Strappazzon""" __email__ = 'lab@strap.it' -__version__ = '1.0.6' +__version__ = '1.0.7' diff --git a/setup.py b/setup.py index 0496360..285e724 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ setup( name='python_vuejs', - version='1.0.6', + version='1.0.7', description="Gluing Python and Vue.js with a set of scripts in order to automate project and app builds", long_description=codecs.open('README.rst', 'r', 'utf-8').read(), author="Christian Strappazzon", From 0704615222325f1b486f2f6bb614cee669a70ec1 Mon Sep 17 00:00:00 2001 From: Christian Strappazzon Date: Tue, 3 Oct 2017 15:17:02 +0200 Subject: [PATCH 10/18] update history --- HISTORY.rst | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 2dc55e3..c3f7928 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,14 @@ History ======= +1.0.7 (2017-10-03) +------------------ + +* Better error message +* Logging +* Passing context - Click issue on calling function command + + 1.0.6 (2017-05-30) ------------------ @@ -27,7 +35,7 @@ History * Better coverage * Make commands -* Dropped bumpversion in favour of punch.py +* Dropped bumpversion in favour of punch.py 1.0.1 (2017-05-30) ------------------ @@ -44,7 +52,7 @@ Beta release * Added unit tests * Added travisCI configuration * Added coveralls and coverage configuration -* Docs updated +* Docs updated * Better semver 0.0.7 (2017-05-24) From 05c503c4c38081b59ebb89394b574fdbc06bd682 Mon Sep 17 00:00:00 2001 From: Christian Strappazzon Date: Tue, 3 Oct 2017 15:20:50 +0200 Subject: [PATCH 11/18] Version updated from 1.0.7 to 1.0.8 --- punch_version.py | 2 +- python_vuejs/__init__.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/punch_version.py b/punch_version.py index 269cd1a..3f8d125 100644 --- a/punch_version.py +++ b/punch_version.py @@ -1,3 +1,3 @@ major = 1 minor = 0 -patch = 7 +patch = 8 diff --git a/python_vuejs/__init__.py b/python_vuejs/__init__.py index 13c315d..268cea2 100644 --- a/python_vuejs/__init__.py +++ b/python_vuejs/__init__.py @@ -2,4 +2,4 @@ __author__ = """Christian Strappazzon""" __email__ = 'lab@strap.it' -__version__ = '1.0.7' +__version__ = '1.0.8' diff --git a/setup.py b/setup.py index 285e724..1068a91 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ setup( name='python_vuejs', - version='1.0.7', + version='1.0.8', description="Gluing Python and Vue.js with a set of scripts in order to automate project and app builds", long_description=codecs.open('README.rst', 'r', 'utf-8').read(), author="Christian Strappazzon", From 2fc5f49b94df778a86149fa0e78b9a2f8113644f Mon Sep 17 00:00:00 2001 From: Christian Strappazzon Date: Tue, 3 Oct 2017 15:34:34 +0200 Subject: [PATCH 12/18] Fixing slash issue #21 --- python_vuejs/django.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python_vuejs/django.py b/python_vuejs/django.py index 7c957a3..d8bb496 100644 --- a/python_vuejs/django.py +++ b/python_vuejs/django.py @@ -45,9 +45,9 @@ def djbuild(project): f.seek(0) lines.insert(0, "{% load staticfiles %}\n") for line in lines: - f.write(line.replace('href=/', "href=\"{% static '/") + f.write(line.replace('href=/', "href=\"{% static '") .replace('.css', ".css' %}\"") - .replace('src=/', "src=\"{% static '/") + .replace('src=/', "src=\"{% static '") .replace('.js', ".js' %}\"")) From 89100fa9d5c0afe562ce943d7c0e2ac7499fca6c Mon Sep 17 00:00:00 2001 From: Christian Strappazzon Date: Tue, 3 Oct 2017 15:40:10 +0200 Subject: [PATCH 13/18] Test --- tests/test_django_cli.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_django_cli.py b/tests/test_django_cli.py index 6d4a89d..4cb3855 100644 --- a/tests/test_django_cli.py +++ b/tests/test_django_cli.py @@ -47,13 +47,13 @@ def test_djbuild(self): with open(os.path.join('templates/myapp', 'index.html')) as f: sut = f.readlines() self.assertEqual('{% load staticfiles %}\n', sut[0]) - expected = """\n""" # noqa + expected = """\n""" # noqa self.assertEqual(expected, sut[6]) - expected = """\n""" # noqa + expected = """\n""" # noqa self.assertEqual(expected, sut[10]) - expected = """\n""" # noqa + expected = """\n""" # noqa self.assertEqual(expected, sut[11]) - expected = """\n""" # noqa + expected = """\n""" # noqa self.assertEqual(expected, sut[12]) def test_djangofy(self): From 4fe7e761537454a537bbb81cc9afc101eea3a593 Mon Sep 17 00:00:00 2001 From: Christian Strappazzon Date: Tue, 3 Oct 2017 15:44:50 +0200 Subject: [PATCH 14/18] Version updated from 1.0.8 to 1.0.9 --- punch_version.py | 2 +- python_vuejs/__init__.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/punch_version.py b/punch_version.py index 3f8d125..c9fc272 100644 --- a/punch_version.py +++ b/punch_version.py @@ -1,3 +1,3 @@ major = 1 minor = 0 -patch = 8 +patch = 9 diff --git a/python_vuejs/__init__.py b/python_vuejs/__init__.py index 268cea2..a20954b 100644 --- a/python_vuejs/__init__.py +++ b/python_vuejs/__init__.py @@ -2,4 +2,4 @@ __author__ = """Christian Strappazzon""" __email__ = 'lab@strap.it' -__version__ = '1.0.8' +__version__ = '1.0.9' diff --git a/setup.py b/setup.py index 1068a91..678908d 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ setup( name='python_vuejs', - version='1.0.8', + version='1.0.9', description="Gluing Python and Vue.js with a set of scripts in order to automate project and app builds", long_description=codecs.open('README.rst', 'r', 'utf-8').read(), author="Christian Strappazzon", From edc1c88ca10f1b79486b7e4423fce111398a78e3 Mon Sep 17 00:00:00 2001 From: Christian Strappazzon Date: Tue, 3 Oct 2017 15:46:53 +0200 Subject: [PATCH 15/18] docs --- HISTORY.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index c3f7928..a010c40 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,11 @@ History ======= +1.0.9 (2017-10-03) +------------------ + +* Fix slash issue #21 + 1.0.7 (2017-10-03) ------------------ From 419a66c13d79735537da593e8f0f9b84334490bb Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Fri, 6 Oct 2017 01:01:58 +0200 Subject: [PATCH 16/18] Update punch.py from 1.4.1 to 1.4.2 --- requirements_dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_dev.txt b/requirements_dev.txt index e2d28a6..e7f422e 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,5 +1,5 @@ pip==9.0.1 -punch.py==1.4.1 +punch.py==1.4.2 watchdog==0.8.3 flake8==3.4.1 tox==2.9.1 From fc61cee304ec8cf21f247e66a9af372e1a46d21e Mon Sep 17 00:00:00 2001 From: Christian Strappazzon Date: Fri, 23 Feb 2018 09:34:26 +0100 Subject: [PATCH 17/18] least but not (maybe) last update --- README.rst | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index fe44d67..c0df0ce 100644 --- a/README.rst +++ b/README.rst @@ -20,6 +20,11 @@ Python and Vue.js gule :target: http://python-vuejs.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status +**UPDATE**: at the moment project is not supported anymore, due to the rapid evolving of the JavaScript ecosystem. +It was born like a POF to allow me to study a bit of JavaScript and VueJS and try some hacks with `click`. +Maybe in the future, the project could reborn. +Thanks for using it! + Gluing Python and `Vue.js `_ with a set of scripts that automate the dev and build process. Projects aims to be agnostic, just use it in order to automate the boring stuff to setup a Vue.js project. @@ -37,7 +42,8 @@ Requirements ------------ * Python 2.7+ or 3.4+ -* nodejs > 5 and npm > 3 +* nodejs > 5 and npm > 3 (could not work with new versions) +* *nix like SO, Windows not supported ------------------ Commands reference @@ -90,7 +96,7 @@ Before you go on production run::: Django - A quick overview ------------------------- -Run ``pyvue djstartvueapp`` into your django project directory:: +Run ``pyvue djstartvueapp`` **into your django project directory**:: (env) $ pyvue djstartvueapp myapp ... @@ -111,6 +117,7 @@ TODO * Supporting Flask, eg https://github.com/taogeT/flask-vue (without js inside package) * Supporting other frameworks +* Supporting windows Credits ------- From 6392343d74ad432a76b5c4d3a4ba4b22de6b1b15 Mon Sep 17 00:00:00 2001 From: Christian Strappazzon Date: Fri, 23 Feb 2018 09:36:31 +0100 Subject: [PATCH 18/18] least but not (maybe) last update. Maybe. --- README.rst | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index c0df0ce..fee14a1 100644 --- a/README.rst +++ b/README.rst @@ -20,11 +20,19 @@ Python and Vue.js gule :target: http://python-vuejs.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status -**UPDATE**: at the moment project is not supported anymore, due to the rapid evolving of the JavaScript ecosystem. +------ +UPDATE +------ + +At the moment project is not supported anymore, due to the rapid evolving of the JavaScript ecosystem. It was born like a POF to allow me to study a bit of JavaScript and VueJS and try some hacks with `click`. Maybe in the future, the project could reborn. Thanks for using it! +------- +The aim +------- + Gluing Python and `Vue.js `_ with a set of scripts that automate the dev and build process. Projects aims to be agnostic, just use it in order to automate the boring stuff to setup a Vue.js project.