From ab75ee645bd5370ad3cb63b8b6ab892f77f6b040 Mon Sep 17 00:00:00 2001 From: Anthony Rey Date: Mon, 25 Jul 2022 16:41:26 +0200 Subject: [PATCH] Use basepath feature from tikui-core 2.x.x to prevent basedir usage (#36) --- LICENSE | 2 +- package-lock.json | 4 ++-- package.json | 6 +++--- src/cli/generate-project/atomic/src/index.pug | 8 ++++---- .../atomic/src/layout-documentation.pug | 10 +++++----- src/cli/generate-project/common/src/layout.pug | 2 +- src/cli/generate-project/templated/package.json | 4 ++-- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/LICENSE b/LICENSE index 4937d4a..2c3cca9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2019 Arnaud Freismuth +Copyright (c) 2022 Anthony Rey Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/package-lock.json b/package-lock.json index 82c8307..af87449 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@tikui/cli", - "version": "1.3.1", + "version": "2.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@tikui/cli", - "version": "1.3.1", + "version": "2.0.0", "license": "MIT", "dependencies": { "@types/fs-extra": "^9.0.9", diff --git a/package.json b/package.json index 2765167..9cbad4a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tikui/cli", - "version": "1.3.1", + "version": "2.0.0", "description": "Command lines tool for Tikui", "main": "index.js", "scripts": { @@ -18,11 +18,11 @@ "CLI" ], "author": { - "name": "Arnaud Freismuth" + "name": "Anthony Rey" }, "contributors": [ { - "name": "Anthony Rey" + "name": "Arnaud Freismuth" }, { "name": "Jérémie Tisserand" diff --git a/src/cli/generate-project/atomic/src/index.pug b/src/cli/generate-project/atomic/src/index.pug index b752c07..b2a9eca 100644 --- a/src/cli/generate-project/atomic/src/index.pug +++ b/src/cli/generate-project/atomic/src/index.pug @@ -38,10 +38,10 @@ block content .tikui-vertical-spacing--line ul.tikui-list li - a.tikui-link(href='/atom/atom.html') Atoms + a.tikui-link(href='[[TIKUI_BASEPATH]]atom/atom.html') Atoms li - a.tikui-link(href='/molecule/molecule.html') Molecules + a.tikui-link(href='[[TIKUI_BASEPATH]]molecule/molecule.html') Molecules li - a.tikui-link(href='/organism/organism.html') Organisms + a.tikui-link(href='[[TIKUI_BASEPATH]]organism/organism.html') Organisms li - a.tikui-link(href='/template/template.html') Templates + a.tikui-link(href='[[TIKUI_BASEPATH]]template/template.html') Templates diff --git a/src/cli/generate-project/atomic/src/layout-documentation.pug b/src/cli/generate-project/atomic/src/layout-documentation.pug index 7f25bac..102bda2 100644 --- a/src/cli/generate-project/atomic/src/layout-documentation.pug +++ b/src/cli/generate-project/atomic/src/layout-documentation.pug @@ -6,8 +6,8 @@ block header block vars -let active=''; -const isActive = current => current === active; - +tikui-navbar('/', 'Tikui') - +tikui-navbar-item('/atom/atom.html', 'Atoms', isActive('atom')) - +tikui-navbar-item('/molecule/molecule.html', 'Molecules', isActive('molecule')) - +tikui-navbar-item('/organism/organism.html', 'Organisms', isActive('organism')) - +tikui-navbar-item('/template/template.html', 'Templates', isActive('template')) + +tikui-navbar('[[TIKUI_BASEPATH]]', 'Tikui') + +tikui-navbar-item('[[TIKUI_BASEPATH]]atom/atom.html', 'Atoms', isActive('atom')) + +tikui-navbar-item('[[TIKUI_BASEPATH]]molecule/molecule.html', 'Molecules', isActive('molecule')) + +tikui-navbar-item('[[TIKUI_BASEPATH]]organism/organism.html', 'Organisms', isActive('organism')) + +tikui-navbar-item('[[TIKUI_BASEPATH]]template/template.html', 'Templates', isActive('template')) diff --git a/src/cli/generate-project/common/src/layout.pug b/src/cli/generate-project/common/src/layout.pug index 848fbdc..ba7cffd 100644 --- a/src/cli/generate-project/common/src/layout.pug +++ b/src/cli/generate-project/common/src/layout.pug @@ -5,7 +5,7 @@ html meta(name='viewport' content='width=device-width, initial-scale=1, shrink-to-fit=no') block title title Tikui - link(href='/tikui.css' rel='stylesheet') + link(href='[[TIKUI_BASEPATH]]tikui.css' rel='stylesheet') body block body p Please include a body here. diff --git a/src/cli/generate-project/templated/package.json b/src/cli/generate-project/templated/package.json index 1b6704b..7deb9db 100644 --- a/src/cli/generate-project/templated/package.json +++ b/src/cli/generate-project/templated/package.json @@ -28,9 +28,9 @@ "prepare": "husky install" }, "dependencies": { - "@tikui/core": "^1.5.2", + "@tikui/core": "^2.0.0", "@types/concurrently": "^7.0.0", - "tikuidoc-tikui": "^3.0.0" + "tikuidoc-tikui": "^4.0.0" }, "devDependencies": { "concurrently": "^7.2.2",