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

format all code using prettier #2

Open
wants to merge 1 commit 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
23 changes: 11 additions & 12 deletions copyAssets.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
'use strict'
"use strict";

const copydir = require('copy-dir');
const path = require('path');
const fs = require('fs');
const copydir = require("copy-dir");
const path = require("path");
const fs = require("fs");

const filesToCopy = './dist/assets'
const filesToCopy = "./dist/assets";

// User's local directory
const userPath = path.join(process.env.INIT_CWD,'/public/assets')
const userPath = path.join(process.env.INIT_CWD, "/public/assets");

// Creates directory if it doesn't exist
fs.mkdir(userPath, { recursive: true }, (err) => {
if (err) throw err;

// Moving files to user's local directory
copydir(filesToCopy, userPath, {
utimes: true, // keep add time and modify time
mode: true, // keep file mode
cover: true // cover file when exists, default is true
})
utimes: true, // keep add time and modify time
mode: true, // keep file mode
cover: true, // cover file when exists, default is true
});
});

132 changes: 66 additions & 66 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,68 +1,68 @@
{
"name": "@3d-dice/dice-box",
"author": {
"name": "Frank Ali"
},
"description": "A 3D environment for rolling game dice",
"version": "0.6.1",
"keywords": [
"3D",
"dice",
"roll",
"roller",
"javascript",
"rpg",
"dnd",
"d&d",
"tabletop"
],
"license": "MIT",
"homepage": "https://fantasticdice.games/",
"repository": {
"type": "git",
"url": "https://github.com/3d-dice/dice-box"
},
"bugs": {
"url": "https://github.com/3d-dice/dice-box/issues"
},
"files": [
"dist",
"copyAssets.js"
],
"main": "./dist/dice-box.es.js",
"dev-files": [
"src"
],
"dev-main": "./src/index",
"scripts": {
"dev": "vite",
"build": "vite build",
"serve": "vite preview",
"postinstall": "node copyAssets.js"
},
"dependencies": {
"@babylonjs/core": "^5.0.0-rc.3",
"@babylonjs/loaders": "^5.0.0-rc.3",
"@babylonjs/materials": "^5.0.0-rc.3",
"copy-dir": "^1.3.0"
},
"devDependencies": {
"rollup-plugin-copy": "^3.4.0",
"rollup-plugin-visualizer": "^5.6.0",
"vite": "^2.8.6"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all",
"not ie all"
],
"development": [
">0.2%",
"not dead",
"not op_mini all",
"not ie all"
]
}
"name": "@3d-dice/dice-box",
"author": {
"name": "Frank Ali"
},
"description": "A 3D environment for rolling game dice",
"version": "0.6.1",
"keywords": [
"3D",
"dice",
"roll",
"roller",
"javascript",
"rpg",
"dnd",
"d&d",
"tabletop"
],
"license": "MIT",
"homepage": "https://fantasticdice.games/",
"repository": {
"type": "git",
"url": "https://github.com/3d-dice/dice-box"
},
"bugs": {
"url": "https://github.com/3d-dice/dice-box/issues"
},
"files": [
"dist",
"copyAssets.js"
],
"main": "./dist/dice-box.es.js",
"dev-files": [
"src"
],
"dev-main": "./src/index",
"scripts": {
"dev": "vite",
"build": "vite build",
"serve": "vite preview",
"postinstall": "node copyAssets.js"
},
"dependencies": {
"@babylonjs/core": "^5.0.0-rc.3",
"@babylonjs/loaders": "^5.0.0-rc.3",
"@babylonjs/materials": "^5.0.0-rc.3",
"copy-dir": "^1.3.0"
},
"devDependencies": {
"rollup-plugin-copy": "^3.4.0",
"rollup-plugin-visualizer": "^5.6.0",
"vite": "^2.8.6"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all",
"not ie all"
],
"development": [
">0.2%",
"not dead",
"not op_mini all",
"not ie all"
]
}
}
Loading