Skip to content

Commit

Permalink
Oh my god what am I doing? I will close this PR
Browse files Browse the repository at this point in the history
  • Loading branch information
Kocal committed Oct 7, 2018
1 parent 8b5159f commit 69d1a89
Show file tree
Hide file tree
Showing 8 changed files with 1,215 additions and 3,606 deletions.
20 changes: 7 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,31 @@ node_js: 8

cache:
yarn: true
directories:
- ./node_modules
- ./test-app/node_modules

before_install:
- npm i -g yarn@^1.12
- export NODE_PATH="$PWD/test-app/node_modules:$NODE_PATH" # will prevent ESLint to fails when requiring plugins

install:
- yarn install --frozen-lockfile
- (cd test-app; yarn install --frozen-lockfile; yarn add file:..)

script:
- cd test-app

# will fix test-app/src/StoreLocatorBundle/Resources/private/js/yprox-store-locator/components/LocatorFilter.js:45
- yarn lint --filter:handler rollup --fix
- yarn lint --filter:handler rollup
- yarn lint-test-app --filter:handler rollup --fix
- yarn lint-test-app --filter:handler rollup

# will fix test-app/themes/_containers/containers.scss
- yarn lint --filter:handler sass --fix
- yarn lint --filter:handler sass
- yarn lint-test-app --filter:handler sass --fix
- yarn lint-test-app --filter:handler sass

- rm -fr public/{css,img,js,plugins}
- yarn build:prod
- yarn build-test-app:prod
- ../ci/test_build_prod.sh

- rm -fr public/{css,img,js,plugins}
- yarn build:dev
- yarn build-test-app:dev
- ../ci/test_build_dev.sh

- rm -fr public/css
- yarn build:dev --filter:handler sass --filter:handler css
- yarn build-test-app:dev --filter:handler sass --filter:handler css
- ../ci/test_build_dev.sh
25 changes: 25 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
"bin": {
"yprox-cli": "bin/yprox-cli.js"
},
"scripts": {
"build-test-app:dev": "bin/yprox-cli.js build --mode development",
"build-test-app:prod": "bin/yprox-cli.js build --mode production",
"watch-test-app:dev": "bin/yprox-cli.js build --mode development --watch",
"watch-test-app:prod": "bin/yprox-cli.js build --mode production --watch",
"lint-test-app": "bin/yprox-cli.js lint"
},
"dependencies": {
"@babel/core": "^7.0.0",
"@kocal/logger": "^1.1.1",
Expand Down Expand Up @@ -51,6 +58,24 @@
"stylelint": "^9.5.0",
"stylelint-formatter-pretty": "^1.0.3"
},
"devDependencies": {
"algoliasearch": "^3.30.0",
"algoliasearch-helper": "^2.26.1",
"bootstrap": "^4.1.3",
"core-js": "^3.0.0-beta.3",
"query-string": "^5.0.0",
"raven-js": "^3.26.4",
"vue": "^2.5.17",
"babel-eslint": "9.0.0",
"eslint-config-airbnb-base": "^13.1.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-vue": "^4.7.1",
"stylelint-config-primer": "^2.2.10",
"stylelint-config-sass-guidelines": "^5.2.0",
"stylelint-order": "^1.0.0",
"stylelint-scss": "^3.3.0",
"vue-template-compiler": "^2.5.17"
},
"installConfig": {
"pnp": true
}
Expand Down
20 changes: 11 additions & 9 deletions test-app/assets/app.js
Original file line number Diff line number Diff line change
@@ -1,57 +1,59 @@
const { resolve } = require('path');

module.exports = (cli, config) => ([
{
handler: 'rollup',
name: 'core-app-front',
src: 'src/CoreBundle/Resources/private/js/app/index.js',
src: resolve(__dirname, '../src/CoreBundle/Resources/private/js/app/index.js'),
concat: 'core-app-front.min.js',
dest: config.path.js,
},
{
handler: 'rollup',
name: 'core-app-admin',
src: 'src/Admin/CoreBundle/Resources/private/js/app/index.js',
src: resolve(__dirname, '../src/Admin/CoreBundle/Resources/private/js/app/index.js'),
concat: 'core-app-admin.min.js',
dest: config.path.js,
},
{
handler: 'css',
src: 'src/CoreBundle/Resources/private/css/legacy.css',
src: resolve(__dirname, '../src/CoreBundle/Resources/private/css/legacy.css'),
concat: 'legacy.css',
dest: config.path.css,
},
{
handler: 'css',
src: 'src/CoreBundle/Resources/private/css/button.css',
src: resolve(__dirname, '../src/CoreBundle/Resources/private/css/button.css'),
concat: 'button.css',
dest: config.path.css,
},
{
handler: 'sass',
src: 'src/CoreBundle/Resources/private/sass/grid.scss',
src: resolve(__dirname, '../src/CoreBundle/Resources/private/sass/grid.scss'),
concat: 'my-grid.css',
dest: config.path.css,
},
{
handler: 'image',
src: 'src/CoreBundle/Resources/private/img/*',
src: resolve(__dirname, '../src/CoreBundle/Resources/private/img/*'),
dest: config.path.img,
},
{
handler: 'file',
src: 'src/CoreBundle/Resources/private/plugins/jQuery-Validation-Engine/**/*',
src: resolve(__dirname, '../src/CoreBundle/Resources/private/plugins/jQuery-Validation-Engine/**/*'),
dest: `${config.path.plugins}/jQuery-Validation-Engine`,
},
{
handler: 'rollup',
name: 'yprox-media-browser',
src: 'src/Admin/MediaManagerBundle/Resources/private/js/yprox-media-browser/index.js',
src: resolve(__dirname, '../src/Admin/MediaManagerBundle/Resources/private/js/yprox-media-browser/index.js'),
concat: 'yprox-media-browser.min.js',
dest: config.path.js,
},
{
handler: 'rollup',
name: 'yprox-store-locator',
src: 'src/StoreLocatorBundle/Resources/private/js/yprox-store-locator/index.js',
src: resolve(__dirname, '../src/StoreLocatorBundle/Resources/private/js/yprox-store-locator/index.js'),
concat: 'yprox-store-locator.min.js',
dest: config.path.js,
},
Expand Down
4 changes: 3 additions & 1 deletion test-app/assets/themes.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
const { resolve } = require('path');

module.exports = (cli, config) => ([
{
handler: 'sass',
src: 'themes/_containers/containers.scss',
src: resolve(__dirname, '../themes/_containers/containers.scss'),
dest: config.path.css,
},
]);
36 changes: 0 additions & 36 deletions test-app/package.json

This file was deleted.

Loading

0 comments on commit 69d1a89

Please sign in to comment.