Skip to content
Merged
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
7 changes: 5 additions & 2 deletions lib/services/template/play_content.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ import * as path from "path";
import { replaceAll, toSanitized, toSlug } from "../../../util/string.js";
import { fileURLToPath } from "url";
import { Log } from "../../../log/index.js";
import { dirname } from "path";

const __filename = fileURLToPath(import.meta.url);

const __dirname = dirname(__filename);

const PLAY_LIST_DIRECTORY = "./src/plays";
const TEMPLATE_DIRECTORY = "../../../../_templates";
const TEMPLATE_DIRECTORY = "_templates";

const TEMPLATE_MAP = {
common: ["Readme_md"],
Expand Down Expand Up @@ -83,7 +86,7 @@ const processTemplate = (play, template_type, play_path) => {
toSanitized(play.title_name)
);
}
const file_path = `${__filename}/${TEMPLATE_DIRECTORY}/${file_name}`;
const file_path = path.resolve(__dirname, TEMPLATE_DIRECTORY, file_name);
const target_path = `${play_path}/${getTargetFileName(
target_template_name
)}`;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-react-play",
"version": "0.0.11",
"version": "0.0.13",
"description": "Boiler plate for creating a play within reactplay system",
"main": "index.js",
"bin": {
Expand Down