Skip to content

Commit

Permalink
Move all generated assets to the public/dist directory
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgelzpz committed Jan 16, 2017
1 parent 0032d03 commit 5d3dac3
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -16,6 +16,8 @@
*.sqlite *.sqlite


agendav-built* agendav-built*
web/public/dist/css/*.css
web/public/dist/js/*.js


# Configuration file # Configuration file
/web/config/settings* /web/config/settings*
Expand Down
8 changes: 4 additions & 4 deletions assets/css/agendav.css
Expand Up @@ -249,8 +249,8 @@ th {
} }
@font-face { @font-face {
font-family: 'Glyphicons Halflings'; font-family: 'Glyphicons Halflings';
src: url('../font/bootstrap/glyphicons-halflings-regular.eot'); src: url('../../font/bootstrap/glyphicons-halflings-regular.eot');
src: url('../font/bootstrap/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../font/bootstrap/glyphicons-halflings-regular.woff2') format('woff2'), url('../font/bootstrap/glyphicons-halflings-regular.woff') format('woff'), url('../font/bootstrap/glyphicons-halflings-regular.ttf') format('truetype'), url('../font/bootstrap/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); src: url('../../font/bootstrap/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../../font/bootstrap/glyphicons-halflings-regular.woff2') format('woff2'), url('../../font/bootstrap/glyphicons-halflings-regular.woff') format('woff'), url('../../font/bootstrap/glyphicons-halflings-regular.ttf') format('truetype'), url('../../font/bootstrap/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
} }
.glyphicon { .glyphicon {
position: relative; position: relative;
Expand Down Expand Up @@ -6224,8 +6224,8 @@ button.close {
* -------------------------- */ * -------------------------- */
@font-face { @font-face {
font-family: 'FontAwesome'; font-family: 'FontAwesome';
src: url('../font/fa/fontawesome-webfont.eot?v=4.2.0'); src: url('../../font/fa/fontawesome-webfont.eot?v=4.2.0');
src: url('../font/fa/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'), url('../font/fa/fontawesome-webfont.woff?v=4.2.0') format('woff'), url('../font/fa/fontawesome-webfont.ttf?v=4.2.0') format('truetype'), url('../font/fa/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg'); src: url('../../font/fa/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'), url('../../font/fa/fontawesome-webfont.woff?v=4.2.0') format('woff'), url('../../font/fa/fontawesome-webfont.ttf?v=4.2.0') format('truetype'), url('../../font/fa/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
Expand Down
2 changes: 1 addition & 1 deletion assets/less/bootstrap_variables.less
Expand Up @@ -73,7 +73,7 @@
//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower. //## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.


//** Load fonts from this directory. //** Load fonts from this directory.
@icon-font-path: "../font/bootstrap/"; @icon-font-path: "../../font/bootstrap/";
//** File name for all font files. //** File name for all font files.
@icon-font-name: "glyphicons-halflings-regular"; @icon-font-name: "glyphicons-halflings-regular";
//** Element ID within SVG icon file. //** Element ID within SVG icon file.
Expand Down
2 changes: 1 addition & 1 deletion assets/less/fontawesome_variables.less
@@ -1,7 +1,7 @@
// Variables // Variables
// -------------------------- // --------------------------


@fa-font-path: "../font/fa"; @fa-font-path: "../../font/fa";
//@fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.2.0/fonts"; // for referencing Bootstrap CDN font files directly //@fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.2.0/fonts"; // for referencing Bootstrap CDN font files directly
@fa-css-prefix: fa; @fa-css-prefix: fa;
@fa-version: "4.2.0"; @fa-version: "4.2.0";
Expand Down
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -12,9 +12,9 @@
"composer-dev": "cd web && composer install --dev --prefer-source", "composer-dev": "cd web && composer install --dev --prefer-source",
"build:templates": "dustc --pwd assets/templates -o assets/templates/templates.js assets/templates/*.dust", "build:templates": "dustc --pwd assets/templates -o assets/templates/templates.js assets/templates/*.dust",
"prebuild:css": "lessc assets/less/agendav.less assets/css/agendav.css", "prebuild:css": "lessc assets/less/agendav.less assets/css/agendav.css",
"build:css": "cat assets/css/*.css | cleancss -o web/public/css/agendav.css && cat assets/print-css/*.css | cleancss -o web/public/css/agendav.print.css", "build:css": "cat assets/css/*.css | cleancss -o web/public/dist/css/agendav.css && cat assets/print-css/*.css | cleancss -o web/public/dist/css/agendav.print.css",
"build:js": "uglifyjs web/public/js/agendav.js -c -m -o web/public/js/agendav.min.js", "prebuild:js": "uglifyjs assets/js/core/*.js assets/js/other/*.js assets/js/app/*.js assets/templates/templates.js -b -o web/public/dist/js/agendav.js",
"prebuild:js": "uglifyjs assets/js/core/*.js assets/js/other/*.js assets/js/app/*.js assets/templates/templates.js -b -o web/public/js/agendav.js" "build:js": "uglifyjs web/public/dist/js/agendav.js -c -m -o web/public/dist/js/agendav.min.js"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
Expand Down
2 changes: 1 addition & 1 deletion web/config/dev.php
Expand Up @@ -21,5 +21,5 @@
$app['monolog.level'] = 'DEBUG'; $app['monolog.level'] = 'DEBUG';


$app['scripts'] = [ $app['scripts'] = [
'agendav.js', 'dist/js/agendav.js',
]; ];
6 changes: 3 additions & 3 deletions web/config/prod.php
Expand Up @@ -5,15 +5,15 @@


// Assets // Assets
$app['stylesheets'] = [ $app['stylesheets'] = [
'agendav.css', 'dist/css/agendav.css',
]; ];


$app['print.stylesheets'] = [ $app['print.stylesheets'] = [
'agendav.print.css', 'dist/css/agendav.print.css',
]; ];


$app['scripts'] = [ $app['scripts'] = [
'agendav.min.js', 'dist/js/agendav.min.js',
]; ];


// Session parameters // Session parameters
Expand Down
Empty file added web/public/dist/css/.keep
Empty file.
Empty file added web/public/dist/js/.keep
Empty file.
4 changes: 2 additions & 2 deletions web/templates/layout.html
Expand Up @@ -6,13 +6,13 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" />
{% if stylesheets is defined %} {% if stylesheets is defined %}
{% for stylesheet in stylesheets %} {% for stylesheet in stylesheets %}
<link href="{{ app.request.basepath }}{{ assets_root }}/css/{{ stylesheet }}" rel="stylesheet" type="text/css" /> <link href="{{ app.request.basepath }}{{ assets_root }}/{{ stylesheet }}" rel="stylesheet" type="text/css" />
{% endfor %} {% endfor %}
{% endif %} {% endif %}


{% if print_stylesheets is defined %} {% if print_stylesheets is defined %}
{% for stylesheet in print_stylesheets %} {% for stylesheet in print_stylesheets %}
<link href="{{ app.request.basepath }}{{ assets_root }}/css/{{ stylesheet }}" rel="stylesheet" media="print" type="text/css" /> <link href="{{ app.request.basepath }}{{ assets_root }}/{{ stylesheet }}" rel="stylesheet" media="print" type="text/css" />
{% endfor %} {% endfor %}
{% endif %} {% endif %}
<!--[if lt IE 9]> <!--[if lt IE 9]>
Expand Down
2 changes: 1 addition & 1 deletion web/templates/parts/bottom.html
Expand Up @@ -2,5 +2,5 @@
<div id="popup" class="freeow freeow-top-right"></div> <div id="popup" class="freeow freeow-top-right"></div>


{% for script in scripts %} {% for script in scripts %}
<script language="JavaScript" type="text/javascript" src="{{ app.request.basepath}}{{ assets_root }}/js/{{ script }}"></script> <script language="JavaScript" type="text/javascript" src="{{ app.request.basepath}}{{ assets_root }}/{{ script }}"></script>
{% endfor %} {% endfor %}

0 comments on commit 5d3dac3

Please sign in to comment.