This repository was archived by the owner on Mar 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwp.cfg.test.js
More file actions
53 lines (51 loc) · 1.41 KB
/
wp.cfg.test.js
File metadata and controls
53 lines (51 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
var cfg = {
entry:'./src/entry.js',
output: {
path: './dist',
filename: 'spBsCntrls.js'
},
module: {
loaders: [
{test: /\.css$/, loader: "style!css"},
{test: /\.(woff|svg|ttf|eot)([\?]?.*)$/, loader: "file-loader?name=/_layouts/15/spBs/[name].[ext]"}
]
},
resolve : {
modulesDirectories : ['node_modules', 'bower_components'],
root: ['./bower_components']
},
plugins: [
new BowerWebpackPlugin({
excludes: /.*\.less/,
searchResolveModulesDirectories: true
}),
//new wp.ResolverPlugin(
// new wp.ResolverPlugin.DirectoryDescriptionFilePlugin("bower.json", ["main"])
//),
new wp.ProvidePlugin({
$: "jquery",
jQuery: "jquery"
})]
};
//gulp.task('webpack', function () {
// return gulp.src('./src/entry.js')
// .pipe(webpack(cfg))
// //.pipe(rename(function (path) {
// // if (path.extname === '.js') {
// // path.basename = 'spBsCntrls';
// // }
// //}))
// //.pipe(gulp.dest('./dist'));
//});
gulp.task("wp", function(callback) {
// run webpack
wp(cfg, function(err, stats) {
if(err) console.log(err);
//console.log(stats);
callback();
});
});
gulp.task('default', ['wp', 'moveSp']);
/**
* Created by sp-admin on 4/13/2015.
*/