mirror of
https://github.com/ToxicCrack/PrintABrick.git
synced 2025-05-28 01:30:11 -07:00
Minify assets on production
This commit is contained in:
parent
b97d9fd8b5
commit
011bb177c9
@ -37,7 +37,7 @@ For full requirements see Symfony 3.2 [docs](http://symfony.com/doc/3.2/referenc
|
||||
#### Front-end
|
||||
1. Install dependencies via [npm](https://www.npmjs.com/), `$ npm install`
|
||||
2. Install bower dependencies via [bower](https://bower.io), `$ bower install`
|
||||
3. Compile assets by running [Gulp](http://gulpjs.com/), `$ gulp`
|
||||
3. Compile assets by running [Gulp](http://gulpjs.com/), `$ gulp default [--env production]`
|
||||
|
||||
#### Initialization
|
||||
|
||||
|
12
gulpfile.js
12
gulpfile.js
@ -12,21 +12,22 @@ gulp.task('css', function() {
|
||||
])
|
||||
.pipe(plugins.sass().on('error', plugins.sass.logError))
|
||||
.pipe(plugins.concat('main.css', {newLine: ' '}))
|
||||
.pipe(plugins.environments.production(plugins.cssmin()))
|
||||
.pipe(gulp.dest('web/resources/css'));
|
||||
});
|
||||
|
||||
gulp.task('three', function() {
|
||||
gulp.src([
|
||||
'bower_components/three/build/three.js',
|
||||
'bower_components/three/examples/js/libs/stats.min.js',
|
||||
'bower_components/three/examples/js/loaders/STLLoader.js',
|
||||
'bower_components/three/examples/js/Detector.js',
|
||||
'bower_components/three.js/build/three.js',
|
||||
'bower_components/three.js/examples/js/libs/stats.min.js',
|
||||
'bower_components/three.js/examples/js/loaders/STLLoader.js',
|
||||
'bower_components/three.js/examples/js/Detector.js',
|
||||
])
|
||||
.pipe(plugins.concat('three.js'))
|
||||
.pipe(gulp.dest('web/resources/js'));
|
||||
|
||||
gulp.src([
|
||||
'bower_components/three/examples/js/controls/OrbitControls.js',
|
||||
'bower_components/three.js/examples/js/controls/OrbitControls.js',
|
||||
])
|
||||
.pipe(plugins.concat('OrbitControls.js'))
|
||||
.pipe(gulp.dest('web/resources/js'));
|
||||
@ -44,6 +45,7 @@ gulp.task('js', function() {
|
||||
'app/Resources/assets/js/**.js',
|
||||
])
|
||||
.pipe(plugins.concat('main.js'))
|
||||
.pipe(plugins.environments.production(plugins.uglify()))
|
||||
.pipe(gulp.dest('web/resources/js'));
|
||||
});
|
||||
|
||||
|
@ -6,13 +6,17 @@
|
||||
"dependencies": {
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-concat": "^2.6.1",
|
||||
"gulp-cssmin": "^0.2.0",
|
||||
"gulp-load-plugins": "^1.4.0",
|
||||
"gulp-newer": "^1.3.0",
|
||||
"gulp-sass": "^2.3.2",
|
||||
"gulp-sourcemaps": "^2.6.0",
|
||||
"gulp-uglify": "^3.0.0",
|
||||
"gulp-watch": "^4.3.11",
|
||||
"jquery": "^3.2.1",
|
||||
"lightbox2": "^2.9.0",
|
||||
"semantic-ui": "^2.2.9"
|
||||
"semantic-ui": "^2.2.9",
|
||||
"gulp-environments": "^0.1.2"
|
||||
},
|
||||
"devDependencies": {},
|
||||
"scripts": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user