Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration changes and version update #103

Merged
merged 67 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
724bf4e
v0.2.0
Fermain May 23, 2023
b93c9ff
Removes and ignores content
Fermain May 23, 2023
b48d5aa
Removes molly test endpoint
Fermain May 24, 2023
3e9b984
Merge branch 'cli-init-improvements' into production
Fermain May 24, 2023
7d81295
v0.2.1
Fermain May 24, 2023
791e9d5
Merge branch 'cli-init-improvements' into production
Fermain May 24, 2023
c879fb8
v0.2.2
Fermain May 24, 2023
9ee5a19
Merge branch 'master' into production
Fermain May 24, 2023
f335c4f
v0.2.3
Fermain May 24, 2023
155765b
Merge branch 'master' into production
Fermain May 29, 2023
ad35b0b
v0.2.4
Fermain May 29, 2023
63a96f3
Changes type structure for simplicity
Fermain May 29, 2023
2a6f10d
Moves slug functionality to CLI
Fermain May 29, 2023
8bd76ec
v0.2.5
Fermain May 29, 2023
6a054ec
Updates link route
Fermain May 29, 2023
2233d45
v0.2.6
Fermain May 29, 2023
2be6478
Adds start.js to fs allowlist
Fermain May 29, 2023
6cbd589
v0.2.7
Fermain May 29, 2023
0b68ca8
Updates path for client
Fermain May 29, 2023
a0258d3
v0.2.8
Fermain May 29, 2023
e08b173
Updates client route once again
Fermain May 29, 2023
197b0ec
v0.2.9
Fermain May 29, 2023
228c081
Removes Hackademic content
Fermain May 29, 2023
c619eeb
Adds force command
Fermain May 29, 2023
9bb72ae
Scaffolds demo content
Fermain May 29, 2023
7c94440
Adds test content
Fermain May 30, 2023
2b5a8b4
Fixes minor styling issue
Fermain May 30, 2023
b05fa0d
Fixes minor issue with audio generation
Fermain May 30, 2023
178192f
Improves markdown vocal transformer
Fermain May 30, 2023
0cc5324
Updates with EntityType
Fermain May 30, 2023
017157e
Merge branch 'master' into demo
Fermain May 30, 2023
def1314
Simplifies types
Fermain May 30, 2023
106f853
Removes unwanted layout
Fermain May 30, 2023
32780c5
Cna't fix this bug with imports
Fermain May 30, 2023
2d3e56c
Molly refactor
Fermain May 30, 2023
14f9b0a
Cleanup for demo
Fermain May 30, 2023
f8a8198
Molly improvements
Fermain May 30, 2023
e76db50
Minor style improvements
Fermain May 30, 2023
50e4386
Keeps prose class
Fermain May 30, 2023
c47ee49
Minor visual tweaks
Fermain May 30, 2023
ee34854
Merge remote-tracking branch 'origin/patch-resizer-prose-bug' into demo
Fermain May 30, 2023
d506089
Reader style change
Fermain May 30, 2023
f2e36ee
Content updates
Fermain May 30, 2023
e7a10de
Merge remote-tracking branch 'origin/Patch-sorting-case-mismatching' …
Fermain May 30, 2023
f88119f
Content update
Fermain May 30, 2023
51e5040
Removes old demo content
Fermain Jun 7, 2023
774a89d
Test content
Fermain Jun 7, 2023
1a51329
Content update
Fermain Jun 7, 2023
338450e
Improves TTS heuristics
Fermain Jun 7, 2023
a841f33
v0.2.10
Fermain Jun 7, 2023
c000320
Content updates
Fermain Jun 7, 2023
6fe7209
audio
Fermain Jul 4, 2023
7122c76
Merge branch 'master' into production
Fermain Jul 4, 2023
40df667
Minor bug fix
Fermain Jul 5, 2023
03dcaa5
Correcting enum member names
Fermain Jul 5, 2023
7123d18
Merge branch 'production' into demo
Fermain Jul 5, 2023
2a383d4
Merge pull request #104 from Fermain/demo
Fermain Jul 5, 2023
d7eaea5
Merge branch 'production' of https://github.com/Fermain/-mollify into…
Fermain Jul 5, 2023
ab4d998
Updates to navigation
Fermain Jul 5, 2023
d121e15
Removes audio files
Fermain Jul 5, 2023
7b98cd0
v0.2.11
Fermain Jul 5, 2023
0b54230
Merge branch 'master' into production
Fermain Jul 5, 2023
4b8d1f3
Merge branch 'master' into production
Fermain Jul 5, 2023
0b545ec
Update packages/lms/src/lib/components/navigation/ProgrammeNav.svelte
Fermain Jul 5, 2023
edcfc58
Removes comments
Fermain Jul 6, 2023
aba8c1c
Updates package number
Fermain Jul 6, 2023
2892e94
Update packages/lms/src/lib/components/navigation/IconNav.svelte
Fermain Jul 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"useWorkspaces": true,
"version": "0.0.0"
"version": "0.2.11"
}
4,810 changes: 2,300 additions & 2,510 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mollify/cli",
"version": "0.0.1",
"version": "0.2.11",
"description": "",
"main": "bin/index.js",
"bin": {
Expand Down Expand Up @@ -36,7 +36,7 @@
"ts-node-dev": "^2.0.0"
},
"dependencies": {
"@mollify/types": "^0.0.1",
"@mollify/types": "^0.2.11",
"cli-progress": "^3.12.0",
"commander": "^10.0.0",
"enquirer": "^2.3.6",
Expand Down
5 changes: 3 additions & 2 deletions packages/cli/src/actions/entity/create.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import path from 'path';
import fs from 'fs-extra';
import { copyTemplate, slugger } from '../../utilities';
import { copyTemplate } from '../../utilities';
import { EntityBase } from '@mollify/types';
import { createEntitySlug } from './slug/create';

export async function createEntity(
entityMeta: EntityBase,
location = process.cwd()
) {
const slug = slugger(entityMeta.title);
const slug = createEntitySlug(entityMeta.title);

// Ensure type exists
if (!entityMeta.type) {
Expand Down
4 changes: 3 additions & 1 deletion packages/cli/src/actions/entity/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import { createEntity } from './create';
import { moveEntity } from './move';
import { removeEntity } from './remove';
import { listEntities } from './list';
import slug from './slug';

export default {
create: createEntity,
move: moveEntity,
remove: removeEntity,
list: listEntities
list: listEntities,
slug
};
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import slugify from "slugify"

export function slugger(input: string) {
export function createEntitySlug(input: string) {
return slugify(input, {
replacement: '-', // replace spaces with replacement character, defaults to `-`
remove: undefined, // remove characters that match regex, defaults to `undefined`
Expand Down
17 changes: 17 additions & 0 deletions packages/cli/src/actions/entity/slug/get.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import path from 'path';

export function getEntitySlug(address: string): string {
const fullPath = path.resolve(address);
const pageFileName = '+page.md';

if (!fullPath.endsWith(pageFileName)) {
throw new Error(
`Entity file does not have the expected file name: ${fullPath} [${pageFileName}]`
);
}

const entityFolder = path.dirname(fullPath);
const slug = path.basename(entityFolder);

return slug;
}
7 changes: 7 additions & 0 deletions packages/cli/src/actions/entity/slug/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { createEntitySlug } from "./create";
import { getEntitySlug } from "./get";

export default {
create: createEntitySlug,
get: getEntitySlug
}
4 changes: 2 additions & 2 deletions packages/cli/src/actions/markdown/migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import matter from 'gray-matter';
import { prompt } from 'enquirer';
import { EntityBase, EntityMeta, EntityType } from '@mollify/types';
import { ENTITY_FILE } from '../../constants';
import { slugger } from '../../utilities';
import cliProgress from 'cli-progress';
import { table, log, error } from 'console';
import entity from '../entity';

let cancelMigration = false; // create a flag

Expand Down Expand Up @@ -57,7 +57,7 @@ export async function migrateMarkdownFile(file: string) {
try {
const fileContent = await fs.readFile(file, 'utf8');
const { data: existingFrontmatter, content } = matter(fileContent);
let slug = slugger(path.parse(file).name);
let slug = entity.slug.create(path.parse(file).name);
slug = slug === 'index' ? '' : slug;

const userInput = await getUserInput(existingFrontmatter);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/actions/symlink/ensure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const [LMS] = PACKAGE_INVENTORY;

export async function ensureSymlink(
origin = path.join(process.cwd(), SYMLINK_DIR),
destination = path.join(process.cwd(), 'node_modules', LMS, 'src/routes'),
destination = path.join(process.cwd(), 'node_modules', LMS, 'src/routes/content'),
) {
try {
log(`Ensuring symlink from ${origin} to ${destination}`)
Expand Down
15 changes: 12 additions & 3 deletions packages/cli/src/commands/create/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,20 @@ const createCommand: yargs.CommandModule = {
describe: 'Tags for the entity',
type: 'array',
default: [],
})
.option('force', {
alias: 'f',
describe: 'Force creation of the entity',
type: 'boolean',
default: false,
}),
handler: async (argv) => {
const {
location: locationInput,
type: typeInput,
title: titleInput,
tags: tagsInput,
force: forceInput,
} = argv;

const entitySpec = await prompts.entity.define({
Expand All @@ -51,9 +58,11 @@ const createCommand: yargs.CommandModule = {
tags: entitySpec.tags?.join(', '),
});

if (!(await prompts.consent())) {
console.log('Aborting');
process.exit(0);
if (!forceInput) {
if (!(await prompts.consent())) {
console.log('Aborting');
process.exit(0);
}
}

await entity.create(
Expand Down
1 change: 0 additions & 1 deletion packages/cli/src/utilities/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from "./template";
export * from "./countChildFiles";
export * from "./slugger";
export * from "./checkInstallation"
9 changes: 6 additions & 3 deletions packages/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{
"name": "@mollify/docs",
"version": "1.0.0",
"version": "0.2.11",
"description": "",
"main": "index.js",
"license": "GPL",
"publishConfig": {
"access": "public"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "GPL"
"author": ""
}
4 changes: 2 additions & 2 deletions packages/flow/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mollify/flow",
"version": "0.0.1",
"version": "0.2.11",
"license": "GPL",
"scripts": {
"dev": "vite dev",
Expand Down Expand Up @@ -30,7 +30,7 @@
"svelte": "^3.54.0"
},
"devDependencies": {
"@mollify/types": "^0.0.1",
"@mollify/types": "^0.2.11",
"@playwright/test": "^1.28.1",
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/kit": "^1.5.0",
Expand Down
1 change: 1 addition & 0 deletions packages/lms/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ node_modules
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
/src/routes/content
32 changes: 14 additions & 18 deletions packages/lms/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@mollify/lms",
"version": "0.0.1",
"private": true,
"version": "0.2.11",
"license": "GPL",
"scripts": {
"dev": "vite dev",
Expand All @@ -14,9 +13,13 @@
"lint": "prettier --plugin-search-dir . --check . && eslint .",
"format": "prettier --plugin-search-dir . --write ."
},
"devDependencies": {
"@mollify/tts": "^0.0.1",
"@mollify/types": "^0.0.1",
"type": "module",
"dependencies": {
"@floating-ui/dom": "^1.2.8",
"@mollify/cli": "^0.2.11",
"@mollify/molly": "^0.2.11",
"@mollify/tts": "^0.2.11",
"@mollify/types": "^0.2.11",
"@playwright/test": "^1.28.1",
"@skeletonlabs/skeleton": "^1.5.1",
"@sveltejs/adapter-auto": "^2.0.0",
Expand All @@ -30,34 +33,27 @@
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-svelte3": "^4.0.0",
"fuse.js": "^6.6.2",
"graphql": "^16.6.0",
"gray-matter": "^4.0.3",
"js-yaml": "^4.1.0",
"mdsvex": "^0.10.6",
"postcss": "^8.4.23",
"postcss-load-config": "^4.0.1",
"prettier": "^2.8.0",
"prettier-plugin-svelte": "^2.8.1",
"remark-emoji-callout": "^1.0.0",
"remark-gfm": "^3.0.1",
"sass": "^1.62.0",
"svelte": "^3.54.0",
"svelte-check": "^3.0.1",
"svelte-preprocess": "^5.0.3",
"tailwindcss": "^3.3.1",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"unist-builder": "^3.0.1",
"unist-util-visit": "^4.1.2",
"vite": "^4.2.0",
"vitest": "^0.25.3"
},
"type": "module",
"dependencies": {
"@floating-ui/dom": "^1.2.8",
"@mollify/cli": "^0.0.1",
"@mollify/molly": "^0.0.1",
"@mollify/tts": "^0.0.1",
"fuse.js": "^6.6.2",
"graphql": "^16.6.0",
"js-yaml": "^4.1.0",
"remark-gfm": "^3.0.1",
"unist-builder": "^3.0.1",
"unist-util-visit": "^4.1.2"
}
}
9 changes: 2 additions & 7 deletions packages/lms/src/lib/components/cards/Card.svelte
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
<script lang="ts">
let resultType = {
browserPath: typeof String,
title: typeof String,
type: typeof String,
tags: [] as string[]
};
import type { EntityMeta } from "@mollify/types";

export let result: typeof resultType;
export let result: EntityMeta;
</script>

<a class="card p-4 variant-ghost-surface no-underline dark:text-slate-100" href={result.browserPath}>
Expand Down
4 changes: 2 additions & 2 deletions packages/lms/src/lib/components/content/Main.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import ProgrammeNav from '../navigation/ProgrammeNav.svelte';
</script>

<main class="p-5 w-full">
<div class="prose max-w-none sm:w-3/4" id="prose-container">
<main class="p-5 w-full relative">
<div class="prose max-w-none" id="prose-container">
<ProgrammeNav>
<slot />
</ProgrammeNav>
Expand Down
2 changes: 1 addition & 1 deletion packages/lms/src/lib/components/footer/Footer.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts"></script>

<footer class="flex gap-1">
<footer class="flex gap-1 bg-surface-100-800-token">
<slot />
</footer>
32 changes: 31 additions & 1 deletion packages/lms/src/lib/components/header/Logo.svelte
Original file line number Diff line number Diff line change
@@ -1 +1,31 @@
<a href="/"><h1 class="h1 text-primary-500 hidden sm:block">M</h1></a>
<a href="/"
><svg
width="100%"
height="100%"
viewBox="0 0 52 88"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:space="preserve"
style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"
><g transform="matrix(1,0,0,1,0,-6)"
><path
d="M0,6L0,62L26,94L42.093,75.015L35.17,69.306L26,80L8.858,59L9,21L45,64L52,64L52,6L27,6L27,14L44,14L44,49L8,6L0,6Z"
style="fill:currentColor;fill-rule:nonzero;"
/></g
></svg
></a
>

<style>
a {
padding-right: 1rem;
width: 4rem;
display: flex;
justify-content: center;
}

svg {
max-width: 1.5rem;
}
</style>
17 changes: 12 additions & 5 deletions packages/lms/src/lib/components/header/Reader.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
const userFeedback: ToastSettings = {
message: 'Creating Audio File...',
background: 'variant-filled-warning',
autohide: false
autohide: true,
};
toastStore.trigger(userFeedback);
}
Expand All @@ -91,14 +91,14 @@
const userFeedback: ToastSettings = {
message: data.error,
background: 'variant-filled-error',
autohide: false
autohide: true,
};
toastStore.trigger(userFeedback);
} else {
const userFeedback: ToastSettings = {
message: 'Success! Audio file created.',
background: 'variant-filled-success',
autohide: false
autohide: true,
};
hasAudio = true;
toastStore.trigger(userFeedback);
Expand Down Expand Up @@ -132,7 +132,7 @@
>
{/if}
{#if !hasAudio && isContent}
<button on:click={regenerateAudio}>Create Audio</button>
<button on:click={regenerateAudio} class="my-5 btn hover:bg-primary-hover-token p-1">Create Audio</button>
{/if}
<button on:click={playAudio} class="my-5 btn hover:bg-primary-hover-token p-1">Scream For Help!</button>
<audio bind:this={scream}>
Expand All @@ -148,6 +148,13 @@
</div>
{/if}
{#if audioSrc}
<audio src={audioSrc} controls class="w-full h-full" />
<audio src={audioSrc} controls class="w-full" />
{/if}
</div>

<style>
audio {
height: 1.8rem;
margin-right: 1rem;
}
</style>
Loading