mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Added version info to entrypoint
This commit is contained in:
parent
69cd8c61ec
commit
1205411f22
@ -17,3 +17,5 @@
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
__version__ = "9.3.2"
|
||||
|
@ -17,3 +17,5 @@
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
__version__ = "$md-version$"
|
||||
|
@ -149,7 +149,7 @@ const assets$ = concat(
|
||||
})),
|
||||
|
||||
/* Copy images and configurations */
|
||||
...["**/*.{png,svg,yml}"]
|
||||
...["**/*.{jpg,png,svg,yml}"]
|
||||
.map(pattern => copyAll(pattern, {
|
||||
from: "src",
|
||||
to: base
|
||||
@ -160,7 +160,15 @@ const assets$ = concat(
|
||||
const sources$ = copyAll("**/*.py", {
|
||||
from: "src",
|
||||
to: base,
|
||||
watch: process.argv.includes("--watch")
|
||||
watch: process.argv.includes("--watch"),
|
||||
transform: async (data, name) => {
|
||||
if (path.basename(name) === "__init__.py") {
|
||||
const metadata = require("../../package.json")
|
||||
return data.replace("$md-version$", metadata.version)
|
||||
} else {
|
||||
return data
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
Loading…
Reference in New Issue
Block a user