Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

remake

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remake - npm Package Compare versions

Comparing version 0.0.1 to 0.5.0

bin/remake

67

index.js

@@ -1,3 +0,64 @@

module.exports = {
middleware: require('./lib/middleware')
};
const fs = require("fs");
const path = require('path');
const shell = require('shelljs');
const program = require('commander');
const ncp = require('ncp');
const boxen = require('boxen');
const chalk = require('chalk');
const { getSuccessMessage } = require('./utils/get-success-message');
const { getVariablesEnvFileText } = require('./utils/get-variables-env-file-text');
const { version } = require('./package.json');
let ncpOptions = {clobber: false, dereference: false, stopOnErr: true};
let boxenOptions = {padding: 3, margin: 1, borderStyle: 'double', borderColor: 'green'};
program.version("v" + version);
program
.option('create <project-dir>', 'Generate a new Remake project');
module.exports = () => {
program.parse(process.argv);
let projectDir = program.create;
if (projectDir) {
let bundlePath = path.join(__dirname, "bundle");
let newProjectDirPath = path.join(process.cwd(), projectDir);
if (fs.existsSync(newProjectDirPath)) {
console.log(chalk.bgRed("Error: Cannot write to a directory that already exists"));
return;
}
// STEP 1
console.log(chalk.bgGreen("(1/3) Creating new project"));
ncp(bundlePath, newProjectDirPath, ncpOptions, function (err) {
if (err) {
console.log(chalk.bgRed("Error: Couldn't create new project files"));
return;
}
// STEP 2
console.log(chalk.bgGreen("(2/3) Installing npm dependencies"));
shell.cd(newProjectDirPath);
shell.exec("npm install");
// STEP 3
console.log(chalk.bgGreen("(3/3) Setting up variables.env"));
fs.writeFile(path.join(newProjectDirPath, "variables.env"), getVariablesEnvFileText(), function (err) {
if (err) {
console.log(chalk.bgRed("Error: Couldn't create variables.env file"));
return;
}
// SUCCESS!!
console.log(boxen(getSuccessMessage(projectDir), boxenOptions));
});
});
}
}

52

package.json
{
"author": "Manuel Stofer",
"name": "remake",
"description": "Make over http with auto reload",
"version": "0.0.1",
"repository": {
"type": "git"
},
"engines": {
"node": "*"
},
"dependencies": {
"connect": "*",
"underscore": "*",
"socket.io": "*",
"commander": "*"
},
"bin": {
"remake": "bin/remake.js"
},
"devDependencies": {},
"optionalDependencies": {}
"name": "remake",
"version": "0.5.0",
"description": "Generate a full-stack Remake web app",
"license": "MIT",
"homepage": "https://www.remaketheweb.com",
"repository": {
"type": "git",
"url": ""
},
"engines": {
"node": ">=8"
},
"keywords": [
"web app",
"generator",
"framework"
],
"preferGlobal": true,
"bin": {
"remake": "bin/remake"
},
"scripts": {},
"devDependencies": {},
"dependencies": {
"boxen": "^4.1.0",
"chalk": "^2.4.2",
"commander": "^3.0.0",
"nanoid": "^2.0.3",
"ncp": "^2.0.0",
"shelljs": "^0.8.3"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc