Skip to content

Commit aae0ae0

Browse files
LuLeRoemereriksven
authored andcommitted
Add lunr as npm import
This commit integrates lunr as npm import, instead of including the lunr.js file in the repository.
1 parent d20084b commit aae0ae0

File tree

4 files changed

+14
-3477
lines changed

4 files changed

+14
-3477
lines changed

gulpfile.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const { parallel, series, watch } = require('gulp')
44
const createTask = require('./gulp.d/lib/create-task')
55
const exportTasks = require('./gulp.d/lib/export-tasks')
66
const log = require('fancy-log')
7+
const gulp = require('gulp')
78

89
const bundleName = 'ui'
910
const buildDir = 'build'
@@ -21,6 +22,14 @@ const glob = {
2122
js: ['gulpfile.js', 'gulp.d/**/*.js', `${srcDir}/{helpers,js}/**/*.js`],
2223
}
2324

25+
const lunr = createTask({
26+
name: 'lunr',
27+
call: () => {
28+
return gulp.src(['node_modules/lunr/lunr.min.js'])
29+
.pipe(gulp.dest(`${destDir}/js/vendor`))
30+
}
31+
})
32+
2433
const cleanTask = createTask({
2534
name: 'clean',
2635
desc: 'Clean files and folders generated by build',
@@ -57,7 +66,7 @@ const buildTask = createTask({
5766

5867
const bundleBuildTask = createTask({
5968
name: 'bundle:build',
60-
call: series(cleanTask, lintTask, buildTask),
69+
call: series(cleanTask, lintTask, buildTask, lunr),
6170
})
6271

6372
const bundlePackTask = createTask({

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,8 @@
5454
"typeface-roboto-mono": "0.0.75",
5555
"vinyl-buffer": "~1.0",
5656
"vinyl-fs": "~3.0"
57+
},
58+
"dependencies": {
59+
"lunr": "^2.3.9"
5760
}
5861
}

0 commit comments

Comments
 (0)