Skip to content

Commit

Permalink
Merge pull request #96 from pamil/beta
Browse files Browse the repository at this point in the history
Update to Sylius v1.2.0-BETA
  • Loading branch information
pamil authored May 28, 2018
2 parents b79b584 + 46357f5 commit 27f2b24
Show file tree
Hide file tree
Showing 8 changed files with 143 additions and 41 deletions.
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,25 @@ env:
global:
- SYLIUS_CACHE_DIR=$HOME/.sylius-cache
- SYLIUS_BUILD_DIR=etc/build
matrix:
- SYMFONY_VERSION="3.4.*"
- SYMFONY_VERSION="4.0.*"

before_install:
- phpenv config-rm xdebug.ini
- echo "memory_limit=4096M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- mkdir -p "${SYLIUS_CACHE_DIR}"

install:
- composer require "symfony/symfony:${SYMFONY_VERSION}" --no-interaction --no-update
- composer install --no-interaction --prefer-dist
- (cd tests/Application && yarn install)

before_script:
- (cd tests/Application && bin/console doctrine:database:create --env=test -vvv)
- (cd tests/Application && bin/console doctrine:schema:create --env=test -vvv)
- (cd tests/Application && bin/console assets:install web --env=test -vvv)
- (cd tests/Application && yarn run gulp)
- (cd tests/Application && yarn build)

# Configure display
- /sbin/start-stop-daemon --start --quiet --pidfile /tmp/xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1680x1050x16
Expand Down
22 changes: 11 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@
"require": {
"php": "^7.1",

"sylius/sylius": "^1.2@dev"
"sylius/sylius": "^1.2@beta",
"symfony/symfony": "^3.4|^4.0"
},
"require-dev": {
"behat/behat": "^3.3",
"behat/mink": "^1.7",
"behat/behat": "^3.4",
"behat/mink": "^1.7@dev",
"behat/mink-browserkit-driver": "^1.3",
"behat/mink-extension": "^2.2",
"behat/mink-selenium2-driver": "^1.3",
"friends-of-behat/context-service-extension": "^1.0",
"friends-of-behat/cross-container-extension": "^1.0",
"friends-of-behat/context-service-extension": "^1.2",
"friends-of-behat/cross-container-extension": "^1.1",
"friends-of-behat/service-container-extension": "^1.0",
"friends-of-behat/symfony-extension": "^1.0",
"friends-of-behat/variadic-extension": "^1.0",
"friends-of-behat/symfony-extension": "^1.2.1",
"friends-of-behat/variadic-extension": "^1.1",
"lakion/mink-debug-extension": "^1.2.3",
"phpspec/phpspec": "^3.2",
"phpspec/phpspec": "^4.0",
"phpstan/phpstan-shim": "^0.9.2",
"phpunit/phpunit": "^6.5",
"se/selenium-server-standalone": "^2.52",
"sylius-labs/coding-standard": "^1.0",
"symplify/easy-coding-standard": "^2.4"
"sylius-labs/coding-standard": "^2.0"
},
"prefer-stable": true,
"autoload": {
Expand All @@ -39,7 +39,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "1.1-dev"
"dev-master": "1.2-dev"
}
},
"config": {
Expand Down
20 changes: 20 additions & 0 deletions tests/Application/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"presets": [
["env", {
"targets": {
"node": "6"
},
"useBuiltIns": true
}]
],
"plugins": [
["transform-object-rest-spread", {
"useBuiltIns": true
}],
["transform-runtime", {
"helpers": true,
"polyfill": true,
"regenerator": true
}]
]
}
13 changes: 13 additions & 0 deletions tests/Application/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
extends: 'airbnb-base',
rules: {
'function-paren-newline': ['error', 'consistent'],
'max-len': ['warn', 120, 2, {
ignoreUrls: true,
ignoreComments: false,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
}],
},
};
24 changes: 0 additions & 24 deletions tests/Application/Gulpfile.js

This file was deleted.

8 changes: 7 additions & 1 deletion tests/Application/app/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ framework:
validation: { enable_annotations: true }
templating: { engines: ["twig"] }
default_locale: "%locale%"
trusted_proxies: ~
session:
storage_id: session.storage.mock_file
test: ~
Expand Down Expand Up @@ -64,3 +63,10 @@ fos_rest:
sylius_theme:
sources:
test: ~

liip_imagine:
resolvers:
default:
web_path:
web_root: "%kernel.project_dir%/web"
cache_prefix: "media/cache"
71 changes: 71 additions & 0 deletions tests/Application/gulpfile.babel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import chug from 'gulp-chug';
import gulp from 'gulp';
import upath from 'path';
import yargs from 'yargs';

const { argv } = yargs
.options({
rootPath: {
description: '<path> path to web assets directory',
type: 'string',
requiresArg: true,
required: false,
},
vendorPath: {
description: '<path> path to vendor directory',
type: 'string',
requiresArg: true,
required: false,
},
nodeModulesPath: {
description: '<path> path to node_modules directory',
type: 'string',
requiresArg: true,
required: false,
},
});

const config = [
'--rootPath',
argv.rootPath || '../../../../../../../tests/Application/web/assets',
...(argv.vendorPath ? [
'--vendorPath',
upath.joinSafe(argv.vendorPath, 'sylius/sylius/src/Sylius/Bundle'),
] : []),
'--nodeModulesPath',
argv.nodeModulesPath || '../../../../../../../tests/Application/node_modules',
];

export const buildAdmin = function buildAdmin() {
return gulp.src('../../vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle/gulpfile.babel.js', { read: false })
.pipe(chug({ args: config }));
};
buildAdmin.description = 'Build admin assets.';

export const watchAdmin = function watchAdmin() {
return gulp.src('../../vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle/gulpfile.babel.js', { read: false })
.pipe(chug({ args: config, tasks: 'watch' }));
};
watchAdmin.description = 'Watch admin asset sources and rebuild on changes.';

export const buildShop = function buildShop() {
return gulp.src('../../vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/gulpfile.babel.js', { read: false })
.pipe(chug({ args: config }));
};
buildShop.description = 'Build shop assets.';

export const watchShop = function watchShop() {
return gulp.src('../../vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/gulpfile.babel.js', { read: false })
.pipe(chug({ args: config, tasks: 'watch' }));
};
watchShop.description = 'Watch shop asset sources and rebuild on changes.';

export const build = gulp.parallel(buildAdmin, buildShop);
build.description = 'Build assets.';

gulp.task('admin', buildAdmin);
gulp.task('admin-watch', watchAdmin);
gulp.task('shop', buildShop);
gulp.task('shop-watch', watchShop);

export default build;
20 changes: 16 additions & 4 deletions tests/Application/package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,39 @@
{
"dependencies": {
"babel-runtime": "^6.26.0",
"jquery": "^3.2.0",
"lightbox2": "^2.9.0",
"npm": "^6.1.0",
"semantic-ui-css": "^2.2.0"
},
"devDependencies": {
"gulp": "^3.9.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.7.0",
"babel-register": "^6.26.0",
"eslint": "^4.19.1",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-plugin-import": "^2.12.0",
"gulp": "^4.0.0",
"gulp-chug": "^0.5",
"gulp-concat": "^2.6.0",
"gulp-debug": "^2.1.2",
"gulp-if": "^2.0.0",
"gulp-livereload": "^3.8.1",
"gulp-order": "^1.1.1",
"gulp-sass": "^2.3.0",
"gulp-sass": "^4.0.1",
"gulp-sourcemaps": "^1.6.0",
"gulp-uglify": "^1.5.1",
"gulp-uglifycss": "^1.0.5",
"merge-stream": "^1.0.0",
"node-sass": "^4.5.3",
"upath": "^1.1.0",
"yargs": "^6.4.0"
},
"scripts": {
"gulp": "gulp"
"build": "gulp",
"gulp": "gulp",
"lint": "yarn lint:js",
"lint:js": "eslint gulpfile.babel.js"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 27f2b24

Please sign in to comment.