Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Comments on How to test CoDesign?

Parent

How to test CoDesign? Question

+3
−0

If I make any changes to CoDesign. Then, I have to test what changes I made. Is there possible way to build local server (http://localhost/)? To test while making changes.. I have run npm install, npm run build and npm run js_build. I don't know what I should do next.

History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

Post
+4
−0

I have a test page on my local dev environment so that I can test things. If you look at .gitignore, you'll find there's an ignore in there for scratch/* already.

Create a directory called scratch, add an index.html in there something like this:

<!-- index.html -->
<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>Test Page</title>
    <link href="../dist/codidact.css" rel="stylesheet" type="text/css" />
    <script src="../js/co-design.js" type="application/javascript" defer></script>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js" type="application/javascript"></script>
    <script src="scratch.js" type="application/javascript"></script>
</head>
<body>
    <header class="header is-dark h-bg-green-700">
        <div class="container header--container">
            <div class="header--brand">
                <a class="header--instance-name" href="#">Codidact</a>
                <a class="header--site-name" href="#">Gibberish</a>
            </div>
            <div class="header--menu">
                <a class="header--item is-visible-on-mobile is-complex" href="#">
                    <img src="https://placekitten.com/100/100" class="header--item-image" alt="..." />
                    <span class="header--alert">1</span>
                    <span class="header--trust-level">5</span>
                </a>
            </div>
        </div>
    </header>
    <main class="container">
        <!-- add whatever you want to test in here -->
    </main>
</body>
</html>

I also have a scratch.js file in the same directory so that I can test any JS functionality, but if you're just making CSS changes that HTML is all you'll need.

History
Why does this post require moderator attention?
You might want to add some details to your flag.

1 comment thread

scratch.js ? :thinking: (5 comments)
scratch.js ? :thinking:
deleted user wrote over 2 years ago

I found co-design.js but, where scratch.js is? The page says I should add <link rel="stylesheet" href="path/to/dist/codidact.css"> for CSS. It's very hard for me to understand codidact.css All code are written in only one line. I had seen in /src/common, you have separated files for every single component. Is that where I should make changes?

deleted user wrote over 2 years ago · edited over 2 years ago

I have found another repo created by Luap. Design of that page is very different from Codidact's UI/UX. Should I test there (I have updated CoDesign in my system)?

ArtOfCode‭ wrote over 2 years ago · edited over 2 years ago

deleted user like I said in this answer, scratch.js is an extra file I have in the scratch directory so I can test any JS stuff I want to. It's not already in the repo.

deleted user wrote over 2 years ago

ArtOfCode‭ So, what should scratch.js contain? Any specific code?

ArtOfCode‭ wrote over 2 years ago

deleted user doesn't need to contain anything specific, just any code to trigger any Co-Design JS functionality that you want to test.