-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from dubas-pro/1.0.0
1.0.0
- Loading branch information
Showing
56 changed files
with
7,109 additions
and
23,224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
NGROK_REGION=eu | ||
NGROK_AUTH= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
const extensionParams = require('./extension.json'); | ||
const releaseYear = (new Date(extensionParams.releaseDate)).getFullYear(); | ||
const currentYear = (new Date()).getFullYear(); | ||
const copyrightHeader = [ | ||
'***********************************************************************', | ||
`This file is part of the ${extensionParams.name} - EspoCRM extension.`, | ||
'', | ||
`${extensionParams.author}`, | ||
`Copyright (C) ${releaseYear}-${currentYear} ${extensionParams.authors.join(', ')}`, | ||
'', | ||
'This program is free software: you can redistribute it and/or modify', | ||
'it under the terms of the GNU General Public License as published by', | ||
'the Free Software Foundation, either version 3 of the License, or', | ||
'(at your option) any later version.', | ||
'', | ||
'This program is distributed in the hope that it will be useful,', | ||
'but WITHOUT ANY WARRANTY; without even the implied warranty of', | ||
'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the', | ||
'GNU General Public License for more details.', | ||
'', | ||
'You should have received a copy of the GNU General Public License', | ||
'along with this program. If not, see <https://www.gnu.org/licenses/>.', | ||
'***********************************************************************' | ||
]; | ||
|
||
module.exports = { | ||
extends: 'eslint:recommended', | ||
env: { | ||
'browser': true, | ||
'node': true, | ||
'es2021': true, | ||
'jquery': true, | ||
}, | ||
globals: { | ||
'Espo': 'readonly', | ||
'define': 'readonly', | ||
'_': 'readonly', | ||
'moment': 'readonly', | ||
'Backbone': 'readonly', | ||
'Html5QrcodeScanner': 'readonly', | ||
}, | ||
parserOptions: { | ||
'ecmaVersion': 12, | ||
'sourceType': 'module' | ||
|
||
}, | ||
plugins: [ | ||
'header' | ||
], | ||
ignorePatterns: [ | ||
'/site/**', | ||
'src/**/lib/**', | ||
'build.js', | ||
'copy-custom.js', | ||
'helpers.js' | ||
], | ||
rules: { | ||
'no-var': 'error', | ||
'prefer-arrow-callback': ['error', { 'allowUnboundThis': false }], | ||
'no-console': 'error', | ||
'block-spacing': ['error', 'always'], | ||
'indent': ['error', 4, { 'SwitchCase': 1 }], | ||
'no-unused-vars': 'warn', | ||
'comma-spacing': ['error', { 'before': false, 'after': true }], | ||
'quotes': ['error', 'single', { 'avoidEscape': true }], | ||
'padding-line-between-statements': [ | ||
'error', | ||
{ | ||
'blankLine': 'always', | ||
'prev': '*', | ||
'next': [ | ||
'return' | ||
] | ||
} | ||
], | ||
'padded-blocks': [ | ||
'error', | ||
{ | ||
'classes': 'always' | ||
} | ||
], | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['src/**/*.js'], | ||
extends: 'eslint:recommended', | ||
rules: { | ||
'header/header': ['error', 'block', copyrightHeader] | ||
} | ||
}, | ||
] | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## 1.0.0 - 2022-05-18 | ||
|
||
- Switched to LESS | ||
- Fixed compatibility issues | ||
- Changed required version to 7+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
const fs = require('fs'); | ||
|
||
module.exports = grunt => { | ||
|
||
let themeList = []; | ||
|
||
fs.readdirSync('src/files/custom/Espo/Modules/DubasLightTheme/Resources/metadata/themes').forEach(file => { | ||
themeList.push(file.substr(0, file.length - 5)); | ||
}); | ||
|
||
let cssminFilesData = {}; | ||
|
||
let lessData = {}; | ||
|
||
themeList.forEach(theme => { | ||
let name = camelCaseToHyphen(theme); | ||
|
||
let files = {}; | ||
|
||
files['src/files/client/custom/modules/dubas-light-theme/css/espo/'+name+'.css'] = 'frontend/less/'+name+'/main.less'; | ||
files['src/files/client/custom/modules/dubas-light-theme/css/espo/'+name+'-iframe.css'] = 'frontend/less/'+name+'/iframe/main.less'; | ||
|
||
cssminFilesData['src/files/client/custom/modules/dubas-light-theme/css/espo/'+name+'.css'] = 'src/files/client/custom/modules/dubas-light-theme/css/espo/'+name+'.css'; | ||
cssminFilesData['src/files/client/custom/modules/dubas-light-theme/css/espo/'+name+'-iframe.css'] = 'src/files/client/custom/modules/dubas-light-theme/css/espo/'+name+'-iframe.css'; | ||
|
||
let o = { | ||
options: { | ||
yuicompress: true, | ||
}, | ||
files: files, | ||
}; | ||
|
||
lessData[theme] = o; | ||
}); | ||
|
||
grunt.initConfig({ | ||
less: lessData, | ||
|
||
cssmin: { | ||
themes: { | ||
files: cssminFilesData, | ||
}, | ||
}, | ||
}); | ||
|
||
grunt.loadNpmTasks('grunt-contrib-less'); | ||
grunt.loadNpmTasks('grunt-contrib-cssmin'); | ||
|
||
grunt.registerTask('css', [ | ||
'less', | ||
'cssmin', | ||
]); | ||
|
||
grunt.registerTask('default', [ | ||
'css', | ||
]); | ||
}; | ||
|
||
function camelCaseToHyphen(string){ | ||
if (string === null) { | ||
return string; | ||
} | ||
|
||
return string.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.