mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
Merge pull request #7720 from venyii/use-yarn
Replace NPM with Yarn package manager
This commit is contained in:
commit
781dbf8c7b
9 changed files with 2552 additions and 10 deletions
|
|
@ -10,7 +10,9 @@ matrix:
|
||||||
-
|
-
|
||||||
sudo: required
|
sudo: required
|
||||||
php: 7.1.0 # PHP 7.1.2 breaks our test suite because of https://bugs.php.net/bug.php?id=74157
|
php: 7.1.0 # PHP 7.1.2 breaks our test suite because of https://bugs.php.net/bug.php?id=74157
|
||||||
env: SYLIUS_SUITE="application"
|
env:
|
||||||
|
- SYLIUS_SUITE="application"
|
||||||
|
- TRAVIS_NODE_VERSION="7.5"
|
||||||
services:
|
services:
|
||||||
- memcached
|
- memcached
|
||||||
-
|
-
|
||||||
|
|
@ -24,11 +26,14 @@ matrix:
|
||||||
-
|
-
|
||||||
sudo: required
|
sudo: required
|
||||||
php: 5.6
|
php: 5.6
|
||||||
env: SYLIUS_SUITE="application"
|
env:
|
||||||
|
- SYLIUS_SUITE="application"
|
||||||
|
- TRAVIS_NODE_VERSION="7.5"
|
||||||
services:
|
services:
|
||||||
- memcached
|
- memcached
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
|
yarn: true
|
||||||
directories:
|
directories:
|
||||||
- ~/.composer/cache/files
|
- ~/.composer/cache/files
|
||||||
- ~/.cache/pip
|
- ~/.cache/pip
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,8 @@ $ wget http://getcomposer.org/composer.phar
|
||||||
$ php composer.phar create-project -s beta sylius/sylius-standard project
|
$ php composer.phar create-project -s beta sylius/sylius-standard project
|
||||||
$ cd project
|
$ cd project
|
||||||
$ php bin/console sylius:install
|
$ php bin/console sylius:install
|
||||||
$ npm install
|
$ yarn install
|
||||||
$ npm run gulp
|
$ yarn run gulp
|
||||||
$ php bin/console server:start
|
$ php bin/console server:start
|
||||||
$ open http://localhost:8000/
|
$ open http://localhost:8000/
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -59,13 +59,13 @@ Having Node.js installed go to your project directory and run:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ npm install
|
$ yarn install
|
||||||
|
|
||||||
And now you can use gulp for installing views, by just running a simple command:
|
And now you can use gulp for installing views, by just running a simple command:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ npm run gulp
|
$ yarn run gulp
|
||||||
|
|
||||||
Although if you have Gulp installed globally then run just:
|
Although if you have Gulp installed globally then run just:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,13 +57,13 @@ Having Node.js installed go to your project directory and run:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ npm install
|
$ yarn install
|
||||||
|
|
||||||
And now you can use gulp for installing views, by just running a simple command:
|
And now you can use gulp for installing views, by just running a simple command:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ npm run gulp
|
$ yarn run gulp
|
||||||
|
|
||||||
For the contributing process questions, please refer to the `Contributing Guide <http://docs.sylius.org/en/latest/contributing/index.html>`_ that comes up in the following chapters.
|
For the contributing process questions, please refer to the `Contributing Guide <http://docs.sylius.org/en/latest/contributing/index.html>`_ that comes up in the following chapters.
|
||||||
|
|
||||||
|
|
|
||||||
4
etc/bash/application.sh
Normal file
4
etc/bash/application.sh
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Source nvm.sh to make the node command available
|
||||||
|
run_command "source ~/.nvm/nvm.sh"
|
||||||
|
|
@ -1,6 +1,18 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/common.lib.sh"
|
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/common.lib.sh"
|
||||||
|
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/application.sh"
|
||||||
|
|
||||||
print_header "Activating memcached extension" "Sylius"
|
print_header "Activating memcached extension" "Sylius"
|
||||||
run_command "echo \"extension = memcached.so\" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini" || exit $?
|
run_command "echo \"extension = memcached.so\" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini" || exit $?
|
||||||
|
|
||||||
|
print_header "Installing Yarn" "Sylius"
|
||||||
|
|
||||||
|
# Install Node Version Manager to install newer node version
|
||||||
|
run_command "rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout \`git describe --abbrev=0 --tags\`) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION" || exit $?
|
||||||
|
|
||||||
|
# Install Yarn globally
|
||||||
|
run_command "sudo apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg"
|
||||||
|
run_command "echo \"deb http://dl.yarnpkg.com/debian/ stable main\" | sudo tee /etc/apt/sources.list.d/yarn.list"
|
||||||
|
run_command "sudo apt-get update -qq"
|
||||||
|
run_command "sudo apt-get install -y -qq yarn=0.21.3-1"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/common.lib.sh"
|
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/common.lib.sh"
|
||||||
|
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/application.sh"
|
||||||
|
|
||||||
print_header "Setting the application up" "Sylius"
|
print_header "Setting the application up" "Sylius"
|
||||||
run_command "bin/console doctrine:database:create --env=test_cached -vvv" || exit $? # Have to be run with debug = true, to omit generating proxies before setting up the database
|
run_command "bin/console doctrine:database:create --env=test_cached -vvv" || exit $? # Have to be run with debug = true, to omit generating proxies before setting up the database
|
||||||
|
|
@ -9,4 +10,4 @@ run_command "bin/console doctrine:migrations:migrate --no-interaction --env=test
|
||||||
|
|
||||||
print_header "Setting the web assets up" "sylius"
|
print_header "Setting the web assets up" "sylius"
|
||||||
run_command "bin/console assets:install --env=test_cached --no-debug -vvv" || exit $?
|
run_command "bin/console assets:install --env=test_cached --no-debug -vvv" || exit $?
|
||||||
run_command "npm run gulp" || exit $?
|
run_command "yarn run gulp" || exit $?
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/common.lib.sh"
|
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/common.lib.sh"
|
||||||
|
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/application.sh"
|
||||||
|
|
||||||
print_header "Installing dependencies" "Sylius"
|
print_header "Installing dependencies" "Sylius"
|
||||||
run_command "composer install --no-interaction --no-scripts --prefer-dist" || exit $?
|
run_command "composer install --no-interaction --no-scripts --prefer-dist" || exit $?
|
||||||
run_command "npm install" || exit $?
|
|
||||||
|
|
||||||
print_header "Warming up dependencies" "Sylius"
|
print_header "Warming up dependencies" "Sylius"
|
||||||
run_command "composer run-script travis-build --no-interaction" || exit $?
|
run_command "composer run-script travis-build --no-interaction" || exit $?
|
||||||
|
run_command "yarn install" || exit $?
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue