From 5d7e3c982df035ea07480def2d27b1ab1539c417 Mon Sep 17 00:00:00 2001 From: Stanislav Fifik Date: Mon, 7 Aug 2017 11:11:20 +0200 Subject: [PATCH] activating sourcemaps --- index.js | 11 ++++++++--- package.json | 15 ++++++--------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/index.js b/index.js index 1145ba4..e0e6e9d 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,7 @@ "use strict"; +console.log(require.paths); + + var source = require('vinyl-source-stream'), buffer = require('vinyl-buffer'), eventStream = require('event-stream'), @@ -74,6 +77,7 @@ module.exports = { argv.watch = true; gulp.run('build'); }); + console.log(gulp); }, css: function(name, entryPoints, destination) { @@ -107,18 +111,19 @@ module.exports = { publicPath: config.publicPath || '/css/', }, target: 'web', + devtool: argv.production ? 'eval-cheap-module-source-map' : 'source-map', watch: argv.watch, module: { loaders: [ { test: /\.css$/, - loader: $webpack.ExtractTextPlugin.extract({ fallback: 'style-loader', use: 'css-loader' }) + loader: $webpack.ExtractTextPlugin.extract({ fallback: 'style-loader', use: 'css-loader?sourceMap' }) }, { test: /\.less$/, loader: $webpack.ExtractTextPlugin.extract({ fallback: 'style-loader', - use: 'css-loader!less-loader' + use: 'css-loader?sourceMap!less-loader?sourceMap' }) }, { @@ -174,13 +179,13 @@ module.exports = { filename: '[name].js', publicPath: config.publicPath || '/js', }, + devtool: argv.production ? 'eval-cheap-module-source-map' : 'source-map', target: 'web', watch: argv.watch, module: { rules: [ { test: /\.jsx?$/, - include: module.exports.BABEL_NPM_MODULES.map((lib) => new RegExp(`node_modules/${lib}`)), use: { loader: 'babel-loader', options: module.exports.BABEL_CONFIG diff --git a/package.json b/package.json index 0307c5e..474f3f9 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,9 @@ { "name": "designeo-gulp", "version": "1.0.0", - "description": "", + "description": "Simple drop-in preconfigured gulp for designeo projects", "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", + "author": "Stanislav. Fifik ", "license": "ISC", "dependencies": { "babel-core": "^6.24.1", @@ -41,10 +38,10 @@ "url-loader": "^0.5.8", "vinyl-buffer": "^1.0.0", "vinyl-source-stream": "^1.1.0", - "vue": "^2.0.0", - "vue-loader": "^12.0.4", - "vue-template-compiler": "^2.0.0", - "webpack": "^2.6.0", + "vue": "2.3.3", + "vue-loader": "^12.2.1", + "vue-template-compiler": "2.3.3", + "webpack": "^3.0.0", "yargs": "^8.0.1" } } -- GitLab