Skip to content

Commit

Permalink
Remove base file
Browse files Browse the repository at this point in the history
  • Loading branch information
hoontee committed Nov 29, 2023
1 parent 271612c commit 412905a
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 39 deletions.
2 changes: 1 addition & 1 deletion Lync/RobloxPluginSource/Plugin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA
]]
local VERSION = "Alpha 26"
local VERSION = "Alpha 27"

if not plugin or game:GetService("RunService"):IsRunning() and game:GetService("RunService"):IsClient() then return end

Expand Down
44 changes: 13 additions & 31 deletions Lync/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA
*/
const VERSION = 'Alpha 26'
const VERSION = 'Alpha 27'

const { spawn, spawnSync } = require('child_process')
const fs = require('fs')
Expand Down Expand Up @@ -107,18 +107,18 @@ const DEBUG = CONFIG.Debug
*/
function argHelp(err) {
if (err) console.error(red('Argument error:'), yellow(err) + '\n')
console.log(`┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ LYNC HELP Displays the list of available arguments. ┃
┃ CONFIG Opens the config file. ┃
┃ SERVE ${cyan('project.json', true)}? ${green('REMOTE', true)}? Syncs the project. ┃
┃ OPEN ${cyan('project.json', true)}? ${green('REMOTE', true)}? Syncs the project and opens it in Roblox Studio.
┃ BUILD ${cyan('project.json', true)}? Builds the project to file. ┃
┃ FETCH ${cyan('project.json', true)}? Downloads the list of sources in the project file. ┃
┣╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍┫
${cyan('project.json', true)}? The project file to read from and serve. ┃
${green('REMOTE', true)}? Connect to the project's ${green('remoteAddress')} instead of the localhost. ┃
${red('Warning:')} ${yellow('REMOTE is unimplemented!')}
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
console.log(`┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
┃ LYNC HELP Displays the list of available arguments.
┃ CONFIG Opens the config file.
┃ SERVE ${cyan('project.json', true)}? ${green('REMOTE', true)}? Syncs the project.
┃ OPEN ${cyan('project.json', true)}? ${green('REMOTE', true)}? Builds, syncs, and opens the project in Roblox Studio. ┃
┃ BUILD ${cyan('project.json', true)}? Builds the project to file.
┃ FETCH ${cyan('project.json', true)}? Downloads the list of sources in the project file.
┣╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍
${cyan('project.json', true)}? The project file to read from and serve.
${green('REMOTE', true)}? Connect to the project's ${green('remoteAddress')} instead of the localhost.
${red('Warning:')} ${yellow('REMOTE is unimplemented!')}
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
`)
process.exit(err && -1 || 0)
}
Expand Down Expand Up @@ -784,18 +784,6 @@ async function changedJson() {
globIgnorePathsArr.push(projectJson.globIgnorePaths)
globIgnorePaths = `{${globIgnorePathsArr.join(',')}}`
globIgnorePathsPicoMatch = picomatch(globIgnorePaths)
if (MODE == 'open' || MODE == 'build') {
if (projectJson.base == '') {
console.error(red('Terminated:'), green('base'), yellow('cannot be a blank string with OPEN or BUILD mode'))
process.exit()
} else if (!fs.existsSync(projectJson.base)) {
console.error(red('Terminated:'), yellow('Base'), cyan(projectJson.base), yellow('does not exist'))
process.exit()
} else if (projectJson.build == '') {
console.error(red('Terminated:'), green('build'), yellow('cannot be a blank string with OPEN or BUILD mode'))
process.exit()
}
}
if (DEBUG) console.log('Mapping', green(projectJson.name))
map = {}
const projectJsonStats = fs.statSync(PROJECT_JSON)
Expand Down Expand Up @@ -1069,12 +1057,6 @@ function runJobs(event, localPath) {
// Sync
} else {

// Copy base file
if (MODE == 'open') {
if (DEBUG) console.log('Copying', cyan(projectJson.base), '->', cyan(projectJson.build))
fs.copyFileSync(projectJson.base, projectJson.build)
}

// Copy plugin
const pluginsPath = path.resolve(PLATFORM == 'windows' && CONFIG.Path_RobloxPlugins.replace('%LOCALAPPDATA%', process.env.LOCALAPPDATA) || PLATFORM == 'macos' && CONFIG.Path_RobloxPlugins.replace('$HOME', process.env.HOME) || CONFIG.Path_RobloxPlugins)
if (!fs.existsSync(pluginsPath)) {
Expand Down
8 changes: 2 additions & 6 deletions Lync/validator/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,8 @@ module.exports.validate = function(type, json, localPath) {
failed = true
}

if (!('base' in json)) {
console.error(fileError(localPath), yellow('Missing key'), green('base'))
failed = true
} else if (typeof json.base != 'string') {
console.error(jsonError(localPath, json, json, 'base'), yellow('Must be a string'))
failed = true
if ('base' in json) {
console.error(fileError(localPath), yellow('Deprecated key'), green('base'))
}

if (!('build' in json)) {
Expand Down
Binary file removed Sample Project/default.base.rbxl
Binary file not shown.
1 change: 0 additions & 1 deletion Sample Project/default.project.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "Example Build",
"port": 34873,
"base": "default.base.rbxl",
"build": "BuildScripts/Build/Build.rbxl",
"sourcemapEnabled": {
"RBXM": true,
Expand Down

0 comments on commit 412905a

Please sign in to comment.