mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
*.jsx -> *.js
This commit is contained in:
parent
0a2b826f71
commit
e88c193334
98 changed files with 341 additions and 340 deletions
|
|
@ -26,7 +26,7 @@ window.progressJs.onbeforeend(() => {
|
|||
require('json3');
|
||||
require('../vendors/modernizr/modernizr-custom.js');
|
||||
|
||||
require('Common/Booter.jsx');
|
||||
require('Common/Booter');
|
||||
|
||||
if (window.__runBoot)
|
||||
{
|
||||
0
dev/bootstrap.jsx → dev/bootstrap.js
vendored
0
dev/bootstrap.jsx → dev/bootstrap.js
vendored
12
gulpfile.js
12
gulpfile.js
|
|
@ -185,11 +185,8 @@ function signFileTask(callback) {
|
|||
}
|
||||
};
|
||||
|
||||
cfg.paths.globjs = 'dev/**/*.{js,jsx,html,css}';
|
||||
cfg.paths.globjsonly = 'dev/**/*.js';
|
||||
cfg.paths.globjsxonly = 'dev/**/*.jsx';
|
||||
cfg.paths.globjsall = 'dev/**/*.{js,jsx}';
|
||||
cfg.paths.globtsonly = 'dev/**/*.ts';
|
||||
cfg.paths.globall = 'dev/**/*.{js,html,css}';
|
||||
cfg.paths.globjs = 'dev/**/*.{js}';
|
||||
cfg.paths.static = 'rainloop/v/' + cfg.devVersion + '/static/';
|
||||
cfg.paths.staticJS = 'rainloop/v/' + cfg.devVersion + '/static/js/';
|
||||
cfg.paths.staticMinJS = 'rainloop/v/' + cfg.devVersion + '/static/js/min/';
|
||||
|
|
@ -445,6 +442,7 @@ gulp.task('js:min', ['js:app', 'js:admin', 'js:validate'], function() {
|
|||
return gulp.src(cfg.paths.staticJS + '*.js')
|
||||
.pipe(ignore.exclude('*.next.js'))
|
||||
.pipe(replace(/"rainloop\/v\/([^\/]+)\/static\/js\/"/g, '"rainloop/v/$1/static/js/min/"'))
|
||||
.pipe(rename({suffix: '.min'}))
|
||||
.pipe(uglify({
|
||||
mangle: true,
|
||||
compress: true
|
||||
|
|
@ -456,7 +454,7 @@ gulp.task('js:min', ['js:app', 'js:admin', 'js:validate'], function() {
|
|||
|
||||
// lint
|
||||
gulp.task('js:eslint', function() {
|
||||
return gulp.src(cfg.paths.globjsall)
|
||||
return gulp.src(cfg.paths.globjs)
|
||||
.pipe(cache('eslint'))
|
||||
.pipe(eslint())
|
||||
.pipe(gulpif(cfg.watch, plumber({errorHandler: notify.onError("Error: <%= error.message %>")})))
|
||||
|
|
@ -684,7 +682,7 @@ gulp.task('watch', ['fast'], function() {
|
|||
cfg.watch = true;
|
||||
livereload.listen();
|
||||
gulp.watch(cfg.paths.globjs, {interval: cfg.watchInterval}, ['js:app', 'js:admin']);
|
||||
gulp.watch(cfg.paths.globjsall, {interval: cfg.watchInterval}, ['js:validate']);
|
||||
gulp.watch(cfg.paths.globjs, {interval: cfg.watchInterval}, ['js:validate']);
|
||||
gulp.watch(cfg.paths.less.main.watch, {interval: cfg.watchInterval}, ['css:main']);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1945,8 +1945,11 @@ NewThemeLink IncludeCss LoadingDescriptionEsc TemplatesLink LangLink IncludeBack
|
|||
|
||||
$bAppJsDebug = !!$this->Config()->Get('labs', 'use_app_debug_js', false);
|
||||
|
||||
$aResult['StaticLibJsLink'] = $this->StaticPath('js/'.($bAppJsDebug ? '' : 'min/').'libs.js');
|
||||
$aResult['StaticAppJsLink'] = $this->StaticPath('js/'.($bAppJsDebug ? '' : 'min/').($bAdmin ? 'admin' : 'app').'.js');
|
||||
$aResult['StaticLibJsLink'] = $this->StaticPath('js/'.($bAppJsDebug ? '' : 'min/').
|
||||
'libs'.($bAppJsDebug ? '' : '.min').'.js');
|
||||
$aResult['StaticAppJsLink'] = $this->StaticPath('js/'.($bAppJsDebug ? '' : 'min/').
|
||||
($bAdmin ? 'admin' : 'app').($bAppJsDebug ? '' : '.min').'.js');
|
||||
|
||||
$aResult['StaticAppJsNextLink'] = $this->StaticPath('js/'.($bAdmin ? 'admin' : 'app').'.next.js'); // todo min
|
||||
$aResult['StaticEditorJsLink'] = $this->StaticPath('ckeditor/ckeditor.js');
|
||||
|
||||
|
|
|
|||
|
|
@ -291,7 +291,7 @@ class Service
|
|||
'{{BaseAppFaviconTouchLinkTag}}' => $sAppleTouchLink ? '<link type="image/png" rel="apple-touch-icon" href="'.$sAppleTouchLink.'" />' : '',
|
||||
'{{BaseAppMainCssLink}}' => $this->staticPath('css/app'.($bAppCssDebug ? '' : '.min').'.css'),
|
||||
'{{BaseAppThemeCssLink}}' => $this->oActions->ThemeLink($sTheme, $bAdmin),
|
||||
'{{BaseAppBootScriptLink}}' => $this->staticPath('js/'.($bAppJsDebug ? '' : 'min/').'boot.js'),
|
||||
'{{BaseAppBootScriptLink}}' => $this->staticPath('js/'.($bAppJsDebug ? '' : 'min/').'boot'.($bAppJsDebug ? '' : '.min').'.js'),
|
||||
'{{BaseViewport}}' => $bMobile ? 'width=device-width,initial-scale=1,user-scalable=no' : 'width=950,maximum-scale=2',
|
||||
'{{BaseContentSecurityPolicy}}' => $sContentSecurityPolicy ?
|
||||
'<meta http-equiv="Content-Security-Policy" content="'.$sContentSecurityPolicy.'" />' : '',
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@ var
|
|||
module.exports = function(es6) {
|
||||
return {
|
||||
entry: es6 ? {
|
||||
'app.next': __dirname + '/dev/app.jsx',
|
||||
'admin.next': __dirname + '/dev/admin.jsx'
|
||||
'app.next': __dirname + '/dev/app.js',
|
||||
'admin.next': __dirname + '/dev/admin.js'
|
||||
} : {
|
||||
'boot': __dirname + '/dev/boot.jsx',
|
||||
'app': __dirname + '/dev/app.jsx',
|
||||
'admin': __dirname + '/dev/admin.jsx'
|
||||
'boot': __dirname + '/dev/boot.js',
|
||||
'app': __dirname + '/dev/app.js',
|
||||
'admin': __dirname + '/dev/admin.js'
|
||||
},
|
||||
output: {
|
||||
pathinfo: true,
|
||||
|
|
@ -25,7 +25,7 @@ module.exports = function(es6) {
|
|||
],
|
||||
resolve: {
|
||||
modules: [devPath, 'node_modules'],
|
||||
extensions: ['', '.js', '.jsx'],
|
||||
extensions: ['', '.js'],
|
||||
alias: {
|
||||
'Opentip': __dirname + '/dev/External/Opentip.js',
|
||||
'ko': __dirname + '/dev/External/ko.js'
|
||||
|
|
@ -121,5 +121,5 @@ module.exports = function(es6) {
|
|||
'Promise': 'window.Promise',
|
||||
'$': 'window.jQuery'
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue