1
0
mirror of synced 2025-12-22 11:26:57 -05:00

add remove-fpt helper function

This commit is contained in:
Sarah Schneider
2021-01-14 13:34:32 -05:00
parent 927ead1d5f
commit b511758057
12 changed files with 42 additions and 37 deletions

View 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}`, ''))
}