Added external libraries to minifying process
This commit is contained in:
parent
81a5f2c1d4
commit
cc57d56023
2 changed files with 31 additions and 11 deletions
18
gruntfile.js
18
gruntfile.js
|
@ -7,6 +7,7 @@ require('shelljs/global');
|
||||||
var phpCheckStyleConfigPath = path.join(path.resolve(), 'phpcheckstyle.cfg');
|
var phpCheckStyleConfigPath = path.join(path.resolve(), 'phpcheckstyle.cfg');
|
||||||
var phpSourcesDir = path.join(path.resolve(), 'src');
|
var phpSourcesDir = path.join(path.resolve(), 'src');
|
||||||
var publicHtmlDir = path.join(path.resolve(), 'public_html');
|
var publicHtmlDir = path.join(path.resolve(), 'public_html');
|
||||||
|
var libSourcesDir = path.join(publicHtmlDir, 'lib');
|
||||||
var jsSourcesDir = path.join(publicHtmlDir, 'js');
|
var jsSourcesDir = path.join(publicHtmlDir, 'js');
|
||||||
var cssSourcesDir = path.join(publicHtmlDir, 'css');
|
var cssSourcesDir = path.join(publicHtmlDir, 'css');
|
||||||
var templatesDir = path.join(publicHtmlDir, 'templates');
|
var templatesDir = path.join(publicHtmlDir, 'templates');
|
||||||
|
@ -47,6 +48,7 @@ module.exports = function(grunt) {
|
||||||
|
|
||||||
phpCheckStyleConfigPath: phpCheckStyleConfigPath,
|
phpCheckStyleConfigPath: phpCheckStyleConfigPath,
|
||||||
phpSourcesDir: phpSourcesDir,
|
phpSourcesDir: phpSourcesDir,
|
||||||
|
libSourcesDir: libSourcesDir,
|
||||||
jsSourcesDir: jsSourcesDir,
|
jsSourcesDir: jsSourcesDir,
|
||||||
cssSourcesDir: cssSourcesDir,
|
cssSourcesDir: cssSourcesDir,
|
||||||
|
|
||||||
|
@ -92,7 +94,9 @@ module.exports = function(grunt) {
|
||||||
cssmin: {
|
cssmin: {
|
||||||
combine: {
|
combine: {
|
||||||
files: {
|
files: {
|
||||||
'public_html/app.min.css': [cssSourcesDir + '/**/*.css'],
|
'public_html/app.min.css': [
|
||||||
|
libSourcesDir + '/nprogress.css',
|
||||||
|
cssSourcesDir + '/**/*.css'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -103,13 +107,21 @@ module.exports = function(grunt) {
|
||||||
sourceMap: true,
|
sourceMap: true,
|
||||||
},
|
},
|
||||||
files: {
|
files: {
|
||||||
'public_html/app.min.js': [].concat(
|
'public_html/app.min.js': [].concat([
|
||||||
[jsSourcesDir + '/DI.js'],
|
libSourcesDir + '/jquery.min.js',
|
||||||
|
libSourcesDir + '/jquery.cookie.js',
|
||||||
|
libSourcesDir + '/underscore.min.js',
|
||||||
|
libSourcesDir + '/mousetrap.min.js',
|
||||||
|
libSourcesDir + '/marked.js',
|
||||||
|
libSourcesDir + '/nprogress.js',
|
||||||
|
jsSourcesDir + '/DI.js'],
|
||||||
|
|
||||||
grunt.file.expand({
|
grunt.file.expand({
|
||||||
filter: function(src) {
|
filter: function(src) {
|
||||||
return !src.match(/(DI|Bootstrap)\.js/);
|
return !src.match(/(DI|Bootstrap)\.js/);
|
||||||
}
|
}
|
||||||
}, jsSourcesDir + '/**/*.js'),
|
}, jsSourcesDir + '/**/*.js'),
|
||||||
|
|
||||||
[jsSourcesDir + '/Bootstrap.js']),
|
[jsSourcesDir + '/Bootstrap.js']),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -24,10 +24,15 @@
|
||||||
<!-- build:template
|
<!-- build:template
|
||||||
<link rel="stylesheet" type="text/css" href="app.min.css?<%= timestamp %>"/>
|
<link rel="stylesheet" type="text/css" href="app.min.css?<%= timestamp %>"/>
|
||||||
/build -->
|
/build -->
|
||||||
<link rel="stylesheet" type="text/css" href="/lib/nprogress.css"/>
|
|
||||||
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css"/>
|
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css"/>
|
||||||
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Droid+Sans:400,700"/>
|
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Droid+Sans:400,700"/>
|
||||||
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Inconsolata">
|
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Inconsolata">
|
||||||
|
|
||||||
|
<!-- build:remove -->
|
||||||
|
<link rel="stylesheet" type="text/css" href="/lib/nprogress.css"/>
|
||||||
|
<!-- /build -->
|
||||||
|
|
||||||
<!-- build:remove -->
|
<!-- build:remove -->
|
||||||
<link rel="stylesheet" type="text/css" href="/css/core.css"/>
|
<link rel="stylesheet" type="text/css" href="/css/core.css"/>
|
||||||
<link rel="stylesheet" type="text/css" href="/css/forms.css"/>
|
<link rel="stylesheet" type="text/css" href="/css/forms.css"/>
|
||||||
|
@ -50,13 +55,6 @@
|
||||||
<link rel="stylesheet" type="text/css" href="/css/http-error.css"/>
|
<link rel="stylesheet" type="text/css" href="/css/http-error.css"/>
|
||||||
<!-- /build -->
|
<!-- /build -->
|
||||||
|
|
||||||
<script type="text/javascript" src="/lib/jquery.min.js"></script>
|
|
||||||
<script type="text/javascript" src="/lib/jquery.cookie.js"></script>
|
|
||||||
<script type="text/javascript" src="/lib/underscore.min.js"></script>
|
|
||||||
<script type="text/javascript" src="/lib/mousetrap.min.js"></script>
|
|
||||||
<script type="text/javascript" src="/lib/marked.js"></script>
|
|
||||||
<script type="text/javascript" src="/lib/nprogress.js"></script>
|
|
||||||
|
|
||||||
<!-- build:remove -->
|
<!-- build:remove -->
|
||||||
<link rel="shortcut icon" type="image/png" href="/favicon.png"/>
|
<link rel="shortcut icon" type="image/png" href="/favicon.png"/>
|
||||||
<!-- /build -->
|
<!-- /build -->
|
||||||
|
@ -84,6 +82,16 @@
|
||||||
<!-- build:template
|
<!-- build:template
|
||||||
<script type="text/javascript" src="app.min.js?<%= timestamp %>"></script>
|
<script type="text/javascript" src="app.min.js?<%= timestamp %>"></script>
|
||||||
/build -->
|
/build -->
|
||||||
|
|
||||||
|
<!-- build:remove -->
|
||||||
|
<script type="text/javascript" src="/lib/jquery.min.js"></script>
|
||||||
|
<script type="text/javascript" src="/lib/jquery.cookie.js"></script>
|
||||||
|
<script type="text/javascript" src="/lib/underscore.min.js"></script>
|
||||||
|
<script type="text/javascript" src="/lib/mousetrap.min.js"></script>
|
||||||
|
<script type="text/javascript" src="/lib/marked.js"></script>
|
||||||
|
<script type="text/javascript" src="/lib/nprogress.js"></script>
|
||||||
|
<!-- /build -->
|
||||||
|
|
||||||
<!-- build:remove -->
|
<!-- build:remove -->
|
||||||
<script type="text/javascript" src="/js/DI.js"></script>
|
<script type="text/javascript" src="/js/DI.js"></script>
|
||||||
<script type="text/javascript" src="/js/Promise.js"></script>
|
<script type="text/javascript" src="/js/Promise.js"></script>
|
||||||
|
|
Loading…
Reference in a new issue