Skip to content

Feature/migrate to npm #1

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,38 @@ The game uses https://github.com/uniter for transpiling PHP into JavaScript.

Apologies for the terrible JavaScript and HTML. I am not a frontend developer these days, so I'm hoping to eventually get some help refactoring.


## 🚀 Getting Started

### Prerequisites

Ensure you have the following installed:

- [Node.js](https://nodejs.org/) (latest LTS recommended)
- [npm](https://www.npmjs.com/) (comes with Node.js)

### Installation

Clone the repository and install dependencies:

```sh
git clone https://github.com/patrickmaynard/code-plunge.git
cd code-plunge
npm install
```


### Running the Project
Start the development server:
```sh
npm run dev
```
Build the project for production:
```
npm run build
```


## TODO items:

* Switch to using NPM and get a better transpiler working. One possible option: https://github.com/seanmorris/php-wasm
Expand Down
20 changes: 5 additions & 15 deletions game.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,12 @@
<html lang="en">
<head>
<title>Code Plunge</title>
<link rel="stylesheet" href="http://berlin.patrickmaynard.com/css/normalize.css" />
<link rel="stylesheet" href="game.css" />

<script type="module" src="./src/js/game.js"></script>

<script>var exports = {};</script>
<script src="languageProviderPhpUniter.js"></script>
<script src="https://unpkg.com/[email protected]/dist/jquery.js"></script>

<!-- todo: Get this to actually work, along with our local languageProviderPhpWasm, which is in progress -->
<script async type = "text/javascript" src = "https://www.unpkg.com/php-wasm/php-tags.unpkg.mjs"></script>

<!-- this will soon go away in favor of the wasm option above. -->
<script src="https://unpkg.com/[email protected]/dist/uniter.js"></script>
<script src="https://unpkg.com/[email protected]/dist/dexie.js"></script>
<script src="game.js"></script>
</head>
<body>
<link rel="stylesheet" href="./src/styles/game.css">
<!-- Game-specific logic --></head>
<body>
<main>
<div id="options-container">
<div id="options" class="hidden-options">
Expand Down
Loading