mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-22 10:30:34 +03:00
- move gitbook files into their own folder at docs/gitbook
- rebuild homepage at `docs/homepage`
This commit is contained in:
+25
-2
@@ -2,13 +2,23 @@ var path = require('path')
|
||||
var config = require('../config')
|
||||
var ExtractTextPlugin = require('extract-text-webpack-plugin')
|
||||
|
||||
/**
|
||||
* Get the path to the assetsSubDirectory
|
||||
* @param _path
|
||||
* @returns {*|string}
|
||||
*/
|
||||
exports.assetsPath = function (_path) {
|
||||
return path.posix.join(config.build.assetsSubDirectory, _path)
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate loader string to be used with extract text plugin
|
||||
* @param options
|
||||
* @returns {{css: *, postcss: *, less: *, sass: *, scss: *, stylus: *, styl: *}}
|
||||
*/
|
||||
exports.cssLoaders = function (options) {
|
||||
options = options || {}
|
||||
// generate loader string to be used with extract text plugin
|
||||
|
||||
function generateLoaders (loaders) {
|
||||
var sourceLoader = loaders.map(function (loader) {
|
||||
var extraParamChar
|
||||
@@ -41,7 +51,11 @@ exports.cssLoaders = function (options) {
|
||||
}
|
||||
}
|
||||
|
||||
// Generate loaders for standalone style files (outside of .vue)
|
||||
/**
|
||||
* Generate loaders for standalone style files (outside of .vue)
|
||||
* @param options
|
||||
* @returns {Array}
|
||||
*/
|
||||
exports.styleLoaders = function (options) {
|
||||
var output = []
|
||||
var loaders = exports.cssLoaders(options)
|
||||
@@ -54,3 +68,12 @@ exports.styleLoaders = function (options) {
|
||||
}
|
||||
return output
|
||||
}
|
||||
|
||||
/**
|
||||
* Are we serving the docs or
|
||||
* the dev environment?
|
||||
* @returns {boolean}
|
||||
*/
|
||||
exports.shouldServeHomepage = function () {
|
||||
return process.argv.indexOf('--docs') > 0
|
||||
}
|
||||
Reference in New Issue
Block a user