Skip to content

Commit

Permalink
Update required NodeJS version to 10, remove bower dependencies and u…
Browse files Browse the repository at this point in the history
…pdate all npm dependencies, fixes #55
  • Loading branch information
mbohal committed Oct 18, 2019
1 parent 83e78c6 commit 694ebc6
Show file tree
Hide file tree
Showing 66 changed files with 14,184 additions and 14,654 deletions.
3 changes: 1 addition & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"plugins": ["lodash"],
"presets": ["env", "react"]
"presets": ["@babel/env", "@babel/react"]
}
3 changes: 0 additions & 3 deletions .bowerrc

This file was deleted.

19 changes: 2 additions & 17 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
{
"parserOptions": {
"ecmaVersion": 7,
"sourceType": "module",
"ecmaFeatures": { "jsx": true }
},
"extends" : ["airbnb"],
"extends" : ["@visionappscz/eslint-config-visionapps"],
"env": {
"browser": true,
"jest": true
},
"rules": {
"comma-dangle": ["error", {
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "never"
}],
"object-curly-spacing": [2, "always"]
}
}
}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
/application/configs/phinx.local.yml

# External dependencies
/bower_components
/node_modules
/npm-debug.log
/vendor
Expand Down
1 change: 0 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ module.exports = function (grunt) {
admin: 'assets/admin'
},
dist: 'www',
bower: 'bower_components',
npm: 'node_modules',
temp: '.tmp'
},
Expand Down
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ The tool uses the [Robo](http://robo.li) task runner to perform the build. It is
* [Robo](http://robo.li)
* [Composer](https://getcomposer.org)
* [Node.js + npm](http://nodejs.org)
* [Bower](http://bower.io)
* [Grunt](http://gruntjs.com)
* [Webpack](https://webpack.github.io)

Expand Down Expand Up @@ -61,10 +60,6 @@ Once the application has been built, several environment-specific settings have
```
npm install
```
3. Install JS dependencies (legacy)
```
bower install
```
4. Install JS dependencies
```
npm install
Expand Down Expand Up @@ -203,9 +198,7 @@ Open Street Map (OSM) are licensed by [Open Data Commons Open Database License (
This application uses external libraries and third party software. The list of all required software packages is available in special definition files.
* `composer.json`
* `package.json`
* `bower.json`
Licenses of used libraries and other third party software are available usually on the package manager web page or in the package repository.
* For information about Composer package (defined in `composer.json`) visit please [packagist.org](https://packagist.org) and insert the name of the package
* For information about Npm package (defined in `package.json`) visit please [www.npmjs.com](https://www.npmjs.com)
* For information about Bower package (defined in `bower.json`) visit [bower.io/search](https://bower.io/search)
15 changes: 6 additions & 9 deletions RoboFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,16 @@
*/
class RoboFile extends Tasks
{
const UPDATE_WARNING = 'I hope you you have all dependencies up to date. If not, run vendor/bin/robo build to install/update them.';

const CONFIG_FILE = 'application/configs/config.ini';
const CONFIG_LOCAL_FILE = 'application/configs/config.local.ini';
const PHINX_CONFIG_FILE = 'application/configs/phinx.local.yml';
const APP_DIR = 'application';
const LIB_DIR = 'library';
const NODE_MODULES_DIR = 'node_modules';
private const UPDATE_WARNING = 'I hope you you have all dependencies up to date. If not, run vendor/bin/robo build to install/update them.';
private const PHINX_CONFIG_FILE = 'application/configs/phinx.local.yml';
private const APP_DIR = 'application';
private const LIB_DIR = 'library';
private const NODE_MODULES_DIR = 'node_modules';

public function test()
{
$this->stopOnFail(true);
$this->taskExec('npm run test')->run();
$this->lintPhp();
$this->phpcs();
$this->codecept();
Expand Down Expand Up @@ -203,7 +201,6 @@ public function phinxCreate($name)
public function build()
{
$this->stopOnFail(true);
$this->taskExec('bower install')->run();
$this->taskNpmInstall()->run();
$this->taskExec('grunt')->run();
$this->taskExec('npm run build')->run();
Expand Down
35 changes: 0 additions & 35 deletions application/layouts/scripts/src/README.md

This file was deleted.

51 changes: 0 additions & 51 deletions application/layouts/scripts/src/mail.html

This file was deleted.

4 changes: 2 additions & 2 deletions assets/admin/less/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@


// Bootstrap UI
@import 'bootstrap.ui/src/less/bootstrap-ui';
@external-components-path: 'node_modules/';
@import 'bootstrap-ui/src/less/bootstrap-ui';

// Colorpicker
@import 'bootstrap-colorpicker/src/less/colorpicker';
Expand All @@ -20,7 +21,6 @@
@import 'config/fonts';

// Configuration
@external-components-path: '../bower_components/';
@icon-font-path: '../fonts/glyphicons/';
@colorpicker-img-path: '../vendor/bootstrap-colorpicker/dist/img/bootstrap-colorpicker/';

Expand Down
44 changes: 44 additions & 0 deletions assets/front/less/components/common/caret.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
//
// Caret
//
// Draws an arrow using only CSS properties.
//
// Example:
// .dropdown-handle {
// .caret();
// }
//
// .next {
// .caret-right(#fff, 1.2em, 1em);
// }


.caret(@color: #000, @width: 1em, @height: @width) {
content: '';
display: inline-block;
width: 0;
height: 0;
vertical-align: top;
border-style: solid;
border-color: transparent;
border-width: (@height / 2) (@width / 2);
border-top-color: @color
}

.caret-up(@color: #000, @width: 1em, @height: @width) {
.caret(@color, @width, @height);
border-top-color: transparent;
border-bottom-color: @color;
}

.caret-right(@color: #000, @width: 1em, @height: @width) {
.caret(@color, @width, @height);
border-top-color: transparent;
border-left-color: @color;
}

.caret-left(@color: #000, @width: 1em, @height: @width) {
.caret(@color, @width, @height);
border-top-color: transparent;
border-right-color: @color;
}
75 changes: 75 additions & 0 deletions assets/front/less/components/common/grid.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
//
// Grid
//
// Inspired by http://www.barrelny.com/blog/text-align-justify-and-rwd
//
// Creates a justified grid of inline blocks.
// Requires definition of grid cells (and optional spacers).
//
// Example:
// .gallery {
// .grid(20%);
// }
//
// Default column sets can also be applied.
//
// Example:
// .gallery {
// .grid();
// .grid-cols-5();
// }
//
// jQuery filter using this technique:
// http://mixitup.io/


// The grid
.grid(@grid-item-width: 22%, @root-font-size: 16px, @line-height: 1.5) {
display: block;
margin: 0;
padding: 0;
font-size: 0.1px; // avoid unwanted spacing
line-height: 1;
text-align: justify;
list-style: none; // remove list bullets

// Add line break to enable justifying of the last line
&:after {
content: '';
width: 100%;
display: inline-block;
}

// Grid cells
> * {
width: @grid-item-width;
display: inline-block;
vertical-align: top;
font-size: @root-font-size; // fallback
font-size: 1rem;
line-height: @line-height;
text-align: left;
}
}

// Grid columns
.grid-cols-2() {
> * {
width: 48.8%;
margin-bottom: 1em;
}
}

.grid-cols-4() {
> * {
width: 24%;
margin-bottom: 1em;
}
}

.grid-cols-5() {
> * {
width: 19.1%;
margin-bottom: 1em;
}
}
11 changes: 3 additions & 8 deletions assets/front/less/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,7 @@
// Bootstrap UI
// ==============

@import "bootstrap.ui/src/less/components/typography/responsive-alignment";


// LESS Modules
// ==============

@import "less-modules/less/caret";
@import "less-modules/less/grid";
@import "bootstrap-ui/src/less/components/typography/responsive-alignment";

// Bootstrap Toggle
@import (inline) "bootstrap-toggle/css/bootstrap-toggle.css";
Expand Down Expand Up @@ -127,6 +120,7 @@
@import "components/common/button-groups";
@import "components/common/buttons";
@import "components/common/cards";
@import "components/common/caret";
@import "components/common/clip";
@import "components/common/close";
@import "components/common/consultation";
Expand All @@ -136,6 +130,7 @@
@import "components/common/counter";
@import "components/common/dropdowns";
@import "components/common/followup";
@import "components/common/grid";
@import "components/common/icons";
@import "components/common/leaflet";
@import "components/common/lights-out";
Expand Down
Loading

0 comments on commit 694ebc6

Please sign in to comment.