add remove-fpt helper function
This commit is contained in:
9
lib/remove-fpt-from-path.js
Normal file
9
lib/remove-fpt-from-path.js
Normal file
@@ -0,0 +1,9 @@
|
||||
const slash = require('slash')
|
||||
const nonEnterpriseDefaultVersion = require('./non-enterprise-default-version')
|
||||
|
||||
// This is a convenience function to remove free-pro-team@latest from all
|
||||
// **user-facing** aspects of the site (particularly URLs) while continuing to support
|
||||
// free-pro-team@latest as a version both in the codebase and in content/data files.
|
||||
module.exports = function removeFPTFromPath (path) {
|
||||
return slash(path.replace(`/${nonEnterpriseDefaultVersion}`, ''))
|
||||
}
|
||||
Reference in New Issue
Block a user