Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [18:45:39] Starting 'sass'...
- [18:45:40] Starting 'js'...
- [18:45:58] Version: webpack 1.15.0
- Asset Size Chunks Chunk Names
- main.js 1.8 kB 0 [emitted] main
- main.js.map 1.84 kB 0 [emitted] main
- [18:45:58] Finished 'sass' after 19 s
- [18:45:58] Finished 'js' after 19 s
- [18:45:58] Starting 'build'...
- [18:45:58] Finished 'build' after 80 μs
- [18:45:58] Starting 'default'...
- [18:45:58] Finished 'default' after 33 μs
- Start time: (2017-07-20 16:45:36 UTC) [treshold=1%]
- # module time %
- 1 ./lib/src (node_modules/vinyl-fs/lib/src/index.js) 249ms ▇▇ 1%
- 2 vinyl-fs (node_modules/vinyl-fs/index.js) 370ms ▇▇ 2%
- 3 gulp (node_modules/gulp/index.js) 405ms ▇▇ 2%
- 4 svgo (node_modules/svgo/lib/svgo.js) 287ms ▇▇ 1%
- 5 postcss-svgo (node_modules/postcss-svgo/dist/index.js) 298ms ▇▇ 1%
- 6 ../data/prefixes (node_modules/autoprefixer/data/prefixes.js) 324ms ▇▇ 1%
- 7 autoprefixer (node_modules/autoprefixer/lib/autoprefixer.js) 701ms ▇▇▇ 3%
- 8 cssnano (node_modules/cssnano/dist/index.js) 1.7s ▇▇▇▇▇▇▇ 7%
- 9 gulp-cssnano (node_modules/gulp-cssnano/index.js) 1.7s ▇▇▇▇▇▇▇ 7%
- 10 gulp-sourcemaps (node_modules/gulp-sourcemaps/index.js) 290ms ▇▇ 1%
- 11 ./Compiler (node_modules/webpack/lib/Compiler.js) 243ms ▇ 1%
- 12 ./WebpackOptionsApply (node_modules/webpack/lib/WebpackOptionsApply.js) 339ms ▇▇ 1%
- 13 ./validateSchema (node_modules/webpack/lib/validateSchema.js) 351ms ▇▇ 2%
- 14 webpack (node_modules/webpack/lib/webpack.js) 999ms ▇▇▇▇▇ 4%
- 15 ./Compiler (node_modules/webpack-stream/node_modules/webpack/lib/Compiler.js) 297ms ▇▇ 1%
- 16 webpack (node_modules/webpack-stream/node_modules/webpack/lib/webpack.js) 517ms ▇▇▇ 2%
- 17 ./path (node_modules/babel-traverse/lib/path/index.js) 528ms ▇▇▇ 2%
- 18 babel-traverse (node_modules/babel-traverse/lib/index.js) 585ms ▇▇▇ 3%
- 19 babel-template (node_modules/babel-template/lib/index.js) 771ms ▇▇▇▇ 3%
- 20 ./helpers (node_modules/babel-helpers/lib/helpers.js) 801ms ▇▇▇▇ 4%
- 21 babel-helpers (node_modules/babel-helpers/lib/index.js) 814ms ▇▇▇▇ 4%
- 22 ../transformation/file (node_modules/babel-core/lib/transformation/file/index.js) 1.2s ▇▇▇▇▇ 5%
- 23 ./lib/api/node.js (node_modules/babel-core/lib/api/node.js) 1.2s ▇▇▇▇▇ 5%
- 24 babel-core (node_modules/babel-core/index.js) 1.2s ▇▇▇▇▇ 5%
- 25 /home/u2487/trunk/node_modules/babel-lo....js (node_modules/babel-loader/lib/index.js) 1.3s ▇▇▇▇▇▇ 6%
- 26 /home/u2487/trunk/node_modules/babel-pr...de_modules/babel-preset-es2015/lib/index.js) 262ms ▇▇ 1%
- Total require(): 3750
- Total time: 22.8s
- 'use strict'
- require("time-require")
- var gulp = require('gulp')
- var gutil = require('gulp-util')
- var nano = require('gulp-cssnano')
- var sass = require('gulp-sass')
- var sourcemaps = require('gulp-sourcemaps')
- var webpack = require('webpack-stream')
- var wpOpt = require('webpack').optimize
- var named = require('vinyl-named')
- var sassTypes = require('node-sass').types
- var Svgo = require('svgo')
- var paths = require('./package.json').buildPaths
- gulp.task('sass', function () {
- var _svgo = new Svgo()
- var svgOptimize = _svgo.optimize.bind(_svgo)
- var sassOpts = {
- functions: {
- 'uri-encode($val)': function uriEncode(val) {
- return new sassTypes.String(encodeURIComponent(val.getValue()))
- },
- 'svgo($val)': function svgo(val, done) {
- svgOptimize(val.getValue(), function(result) {
- done(new sassTypes.String(result.data))
- })
- },
- },
- }
- if (process.env.NODE_ENV === 'production') {
- return gulp.src(paths.sass.i)
- .pipe(
- sass(sassOpts).on('error', sass.logError)
- )
- .pipe(nano())
- .pipe(gulp.dest(paths.sass.o))
- } else {
- return gulp.src(paths.sass.i)
- .pipe(sourcemaps.init())
- .pipe(
- sass(sassOpts).on('error', sass.logError)
- )
- .pipe(nano())
- .pipe(sourcemaps.write())
- .pipe(gulp.dest(paths.sass.o))
- }
- })
- gulp.task('sass:watch', function () {
- gulp.watch('sass/**/*.s{c,a}ss', ['sass'])
- })
- gulp.task('js', function () {
- var conf = require('./webpack.config.js')
- if (process.env.NODE_ENV === 'production') {
- delete conf.devtool
- conf.plugins.push(new wpOpt.UglifyJsPlugin({
- compress: {
- warnings: false,
- },
- mangle: {
- except: ['$', '$super', 'exports', 'require'],
- },
- }))
- }
- return gulp.src(paths.js.i)
- .pipe(named())
- .pipe(webpack(conf))
- .pipe(gulp.dest(paths.js.o))
- })
- gulp.task('js:watch', function () {
- var conf = require('./webpack.config.js')
- conf.watch = true
- // Webpack logs its own errors. Just swallow error to not break watch
- var wp = webpack(conf).on('error', function handleWebpackError() {this.emit('end')})
- return gulp.src(paths.js.i)
- .pipe(named())
- .pipe(wp)
- .pipe(gulp.dest(paths.js.o))
- })
- gulp.task('watch', ['sass'], function () {
- gulp.start('sass:watch')
- gulp.start('js:watch')
- })
- gulp.task('build', ['sass', 'js'])
- gulp.task('default', ['build'])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement