diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 215e58ee6..4eb5b41c6 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -87,6 +87,7 @@ Listed in alphabetical order. Felipe Arruda `@arruda`_ Garry Cairns `@garry-cairns`_ Garry Polley `@garrypolley`_ + Hamish Durkin `@durkode`_ Harry Percival `@hjwp`_ Henrique G. G. Pereira `@ikkebr`_ Ian Lee `@IanLee1521`_ @@ -178,6 +179,7 @@ Listed in alphabetical order. .. _@dhepper: https://github.com/dhepper .. _@dot2dotseurat: https://github.com/dot2dotseurat .. _@dsclementsen: https://github.com/dsclementsen +.. _@durkode: https://github.com/durkode .. _@epileptic-fish: https://gihub.com/epileptic-fish .. _@eraldo: https://github.com/eraldo .. _@eriol: https://github.com/eriol diff --git a/docs/developing-locally-docker.rst b/docs/developing-locally-docker.rst index 8be28c66e..379bc8106 100644 --- a/docs/developing-locally-docker.rst +++ b/docs/developing-locally-docker.rst @@ -6,8 +6,6 @@ Getting Up and Running Locally With Docker The steps below will get you up and running with a local development environment. All of these commands assume you are in the root of your generated project. -.. _devlocdocker-prereq: - Prerequisites ------------- @@ -33,9 +31,6 @@ Currently PostgreSQL (``psycopg2`` python package) is not installed inside Docke Doing this will prevent the project from being installed in an Windows-only environment (thus without usage of Docker). If you want to use this project without Docker, make sure to remove ``psycopg2`` from the requirements again. - -.. _devlocdocker-build-the-stack: - Build the Stack --------------- @@ -46,9 +41,6 @@ on your development system:: If you want to build the production environment you don't have to pass an argument -f, it will automatically use docker-compose.yml. - -.. _devlocdocker-boot-the-system: - Boot the System --------------- diff --git a/docs/gulp-with-docker.rst b/docs/gulp-with-docker.rst deleted file mode 100644 index 1e9b2a184..000000000 --- a/docs/gulp-with-docker.rst +++ /dev/null @@ -1,76 +0,0 @@ -Gulp with Docker -================ - -.. index:: gulp, gulpjs, gulpfile, gulpfilejs, docker, docker-compose - -`Gulp`_ support is provided out-of-the-box, ready for use as-is, or with any kind of customizations suiting the specific needs of the project. - -.. _`Gulp`: http://gulpjs.com/ - -*All paths are relative to the generated project's root.* - - -Prerequisites -------------- - -- These :ref:`nodewithdocker-prereq` are satisfied. - - -Overview --------- - -:ref:`nodewithdocker-overview` Node.js integration details first to get the whole picture. - -Essential aspects of Gulp integration are - -- :code:`./gulpfile.js` with Gulp tasks defined; -- :code:`./{{ cookiecutter.project_slug }}/static/build/` (build directory) with static assets built via Gulp. - -Let us take a closer look at :code:`./gulpfile.js`: - -- paths to static assets are provided by :code:`pathsConfig()`; -- for clarity, related tasks are grouped by :code:`region`: - - :code:`images`: - - :code:`images`: run image-related tasks in parallel, namely: - - :code:`favicons-images`: process favicon images only; - - :code:`nonfavicons-images`: process all images except for favicons. - - :code:`scripts`: - - :code:`scripts`: run script-related tasks in sequence, namely: - - :code:`js-scripts`: process js scripts. - - :code:`styles`: - - :code:`styles`: run script-related tasks in sequence, namely: - - :code:`sass-styles`: process SCSS styles; - - :code:`css-styles`: process CSS styles. - - :code:`build`: - - :code:`build`: run :code:`images`, :code:`scripts`, and :code:`styles` in parallel; - - :code:`clean-build`: clean up build directory: -- the :code:`default` task runs the following ones in sequence: - - :code:`build`; - - :code:`init-browserSync`: initialize `BrowserSync`_; - - :code:`watch`: watch static asset files/directories changes, running BrowserSync on any changes. - -.. _`BrowserSync`: https://www.browsersync.io/ - - -Workflow --------- - -#. [*skip if done*] :ref:`devlocdocker-build-the-stack`; -#. :ref:`devlocdocker-boot-the-system`. - -By default, :code:`gulp` command gets executed immediately after :code:`node` -container startup (see :code:`./dev.yml` for details) which in turn invokes -the :code:`default` task, so generally one would not need to run any -of the aforementioned tasks manually. However, should the need arise, -oftentimes just a few of the tasks listed above will be used to, for instance, -straightforwardly :code:`build` all assets - -.. code-block:: bash - - $ docker-compose -f dev.yml exec node gulp build - -or build :code:`scripts` selectively - -.. code-block:: bash - - $ docker-compose -f dev.yml exec node gulp scripts diff --git a/docs/index.rst b/docs/index.rst index 70b8264c8..3b0a268ca 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -17,8 +17,6 @@ Contents: developing-locally-docker settings linters - nodejs-with-docker - gulp-with-docker live-reloading-and-sass-compilation deployment-on-pythonanywhere deployment-on-heroku diff --git a/docs/nodejs-with-docker.rst b/docs/nodejs-with-docker.rst deleted file mode 100644 index 468c54087..000000000 --- a/docs/nodejs-with-docker.rst +++ /dev/null @@ -1,45 +0,0 @@ -Node.js with Docker -=================== - -.. index:: node, nodejs, docker, docker-compose - -`Node.js`_ support is provided out-of-the-box, ready for use as-is, or with any kind of customizations suiting the specific needs of the project. - -.. _`Node.js`: https://nodejs.org/en/ - -*All paths are relative to the generated project's root.* - - -.. _nodewithdocker-prereq: - -Prerequisites -------------- - -- The project was generated with :code:`use_docker` set to :code:`y`. -- These :ref:`devlocdocker-prereq` are met as well. - - -.. _nodewithdocker-overview: - -Overview --------- - -Essential aspects of Node.js integration are - -- node docker-compose service (:code:`node`) definition in :code:`./dev.yml`; -- :code:`./compose/node/Dockerfile-dev` defining the :code:`node` image; -- :code:`./node_modules/` 'overlayed' with :code:`/app/node_modules/`, its counterpart from the running instance of :code:`node`. - - -Workflow --------- - -#. [*skip if done*] :ref:`devlocdocker-build-the-stack`: - - when building :code:`node` image from scratch, dependencies from :code:`package.json` are installed. -#. :ref:`devlocdocker-boot-the-system`. - -To log the running :code:`node` container's activity, - -.. code-block:: bash - - $ docker-compose -f dev.yml logs node diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index c005d9e7e..5e1eff9bd 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -256,6 +256,7 @@ elif '{{ cookiecutter.js_task_runner}}'.lower() == 'grunt': else: remove_gulp_files() remove_grunt_files() + remove_packageJSON_file() # 7. Removes all certbot/letsencrypt files if it isn't going to be used if '{{ cookiecutter.use_lets_encrypt }}'.lower() != 'y': @@ -263,10 +264,11 @@ if '{{ cookiecutter.use_lets_encrypt }}'.lower() != 'y': # 8. Display a warning if use_docker and use_grunt are selected. Grunt isn't # supported by our docker config atm. -if '{{ cookiecutter.js_task_runner }}'.lower() in ['grunt'] and '{{ cookiecutter.use_docker }}'.lower() == 'y': +if '{{ cookiecutter.js_task_runner }}'.lower() in ['grunt', 'gulp'] and '{{ cookiecutter.use_docker }}'.lower() == 'y': print( - "You selected to use Docker and Grunt task runner. This is NOT supported out of the box for now. You " - "can continue to use the project like you normally would, but you will need to setup Grunt manually." + "You selected to use docker and a JS task runner. This is NOT supported out of the box for now. You " + "can continue to use the project like you normally would, but you will need to add a " + "js task runner service to your docker configuration manually." ) # 9. Removes the certbot/letsencrypt files and display a warning if use_lets_encrypt is selected and use_docker isn't. diff --git a/requirements.txt b/requirements.txt index 6a54b115b..2f0e67524 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ sh==1.12.14 binaryornot==0.4.3 # Testing -pytest==3.1.2 +pytest==3.1.3 pep8==1.7.0 pyflakes==1.5.0 tox==2.7.0 diff --git a/{{cookiecutter.project_slug}}/.gitignore b/{{cookiecutter.project_slug}}/.gitignore index 710ba625d..6a0a3029e 100644 --- a/{{cookiecutter.project_slug}}/.gitignore +++ b/{{cookiecutter.project_slug}}/.gitignore @@ -79,4 +79,3 @@ staticfiles/ .cache/ -{{ cookiecutter.project_slug }}/static/build/ diff --git a/{{cookiecutter.project_slug}}/.idea/runConfigurations/Docker__migrate.xml b/{{cookiecutter.project_slug}}/.idea/runConfigurations/Docker__migrate.xml index 18829b2f2..98fff92e8 100644 --- a/{{cookiecutter.project_slug}}/.idea/runConfigurations/Docker__migrate.xml +++ b/{{cookiecutter.project_slug}}/.idea/runConfigurations/Docker__migrate.xml @@ -6,7 +6,7 @@ -