Comparing version 1.3.0 to 1.4.0
@@ -1,3 +0,18 @@ | ||
# 1.2.0 | ||
# 1.4.0 (October 1, 2019) | ||
- This repo no longer stores a copy of the Remake framework inside of it. When a project is created or updated, the framework code is downloaded from its GitHub repository. This means that, even if this CLI isn't up to date, it will still download the latest framework code. | ||
- `remake create <project-dir>` now downloads the full framework starter project from GitHub | ||
- `remake update-framework` now downloads the the framework code from GitHub and replaces it in the current directory | ||
# 1.3.0 (September 27, 2019) | ||
- the `data-i-click-to-save` attribute doesn't need a value to work | ||
- editable popovers will be automatically suppressed if the user isn't logged in | ||
- if you're on a route with a unique id in it, a warning will pop up if there's no data key with an id that matches it | ||
- attributes are added to the `<body>` element to inform you the status of the app: `data-user-logged-in`, `data-user-not-logged-in`, `data-base-route`, `data-username-route`, `data-item-route` | ||
- the full handlebars helpers library has been added | ||
- the CLI now supports the command `remake update-framework` (however, the latest version of the CLI needs to be installed first) | ||
# 1.2.0 (September 14, 2019) | ||
- `data-i-new` doesn't require as many arguments now. It defaults to adding a new item to the closest `[data-o-type="list"]` element | ||
@@ -12,3 +27,3 @@ - `data-i-editable` doesn't require any arguments now. It defaults to creating an inline edit popover for all data on the current element | ||
# 1.1.0 | ||
# 1.1.0 (August 22, 2019) | ||
@@ -18,5 +33,5 @@ - New option for `data-i` attribute: `data-i="triggerSaveOnChange"`. Makes it so when an `<input>`'s value changes, save its data | ||
# 1.0.0 | ||
# 1.0.0 (August 22, 2019) | ||
- Remake is now a CLI tool for generating a starter project instead of just a starter project | ||
- Moved Remake's front-end code inside the starter project instead of having it be a separate npm package | ||
- Moved Remake's front-end code inside the starter project instead of having it be a separate npm package |
50
index.js
@@ -24,5 +24,2 @@ const fs = require("fs"); | ||
let bundlePath = path.join(__dirname, "bundle"); | ||
let remakeFrameworkPath = path.join(bundlePath, "_remake"); | ||
let projectDir = program.create; | ||
@@ -40,18 +37,24 @@ if (projectDir) { | ||
// STEP 1 | ||
console.log(chalk.bgGreen("(1/3) Creating new project")); | ||
console.log(chalk.bgGreen("(1/4) Creating new project")); | ||
shell.exec(`git clone --depth 1 https://github.com/panphora/remake-framework.git ${projectDir}`); | ||
ncp(bundlePath, newProjectDirPath, ncpOptions, function (err) { | ||
// STEP 2a & 2b | ||
console.log(chalk.bgGreen("(2/4) Tidy up new project directory")); | ||
rimraf(path.join(newProjectDirPath, ".git"), function (rimrafError) { | ||
if (err) { | ||
console.log(chalk.bgRed("Error: Couldn't create new project files")); | ||
if (rimrafError) { | ||
console.log(chalk.bgRed("Error: Couldn't remove old .git directory from new project")); | ||
return; | ||
} | ||
// STEP 2 | ||
console.log(chalk.bgGreen("(2/3) Installing npm dependencies")); | ||
// put project README in the right place | ||
shell.mv(path.join(newProjectDirPath, "README-FOR-BUNDLE.md"), path.join(newProjectDirPath, "README.md")); | ||
// STEP 3 | ||
console.log(chalk.bgGreen("(3/4) Installing npm dependencies")); | ||
shell.cd(newProjectDirPath); | ||
shell.exec("npm install"); | ||
// STEP 3 | ||
console.log(chalk.bgGreen("(3/3) Setting up variables.env")); | ||
// STEP 4 | ||
console.log(chalk.bgGreen("(4/4) Setting up variables.env")); | ||
fs.writeFile(path.join(newProjectDirPath, "variables.env"), getVariablesEnvFileText(), function (err) { | ||
@@ -68,2 +71,3 @@ if (err) { | ||
}); | ||
} | ||
@@ -73,7 +77,6 @@ | ||
let ncpOptions = {clobber: true, dereference: false, stopOnErr: true}; | ||
let cwd = process.cwd(); | ||
let remakeFrameworkPathInApplicationDirectory = path.join(process.cwd(), "_remake"); | ||
console.log(chalk.bgGreen("Important: Make sure you update to the latest version of the npm remake package before updating!")); | ||
// 1. CHECK IF _remake DIRECTORY EXISTS | ||
if (!fs.existsSync(remakeFrameworkPathInApplicationDirectory)) { | ||
@@ -84,2 +87,4 @@ console.log(chalk.bgRed("Error: Cannot find a _remake directory in this project")); | ||
// 2. REMOVE OLD _remake DIRECTORY | ||
console.log(chalk.bgGreen("(1/2) Removing old _remake directory...")); | ||
rimraf(remakeFrameworkPathInApplicationDirectory, function (rimrafError) { | ||
@@ -92,14 +97,21 @@ | ||
console.log(chalk.bgGreen("1. Old _remake directory removed...")); | ||
// 3. GIT CLONE THE ENTIRE FULL STACK STARTER PROJECT INTO THE CURRENT DIRECTORY | ||
console.log(chalk.bgGreen("(2/2) Copying framework into _remake directory...")); | ||
shell.exec("git clone --depth 1 https://github.com/panphora/remake-framework.git"); | ||
ncp(remakeFrameworkPath, remakeFrameworkPathInApplicationDirectory, ncpOptions, function (err) { | ||
// 4. MOVE THE _remake DIRECTORY TO WHERE THE OLD _remake DIRECTORY WAS | ||
let currentRemakeDir = path.join(cwd, "remake-framework/_remake"); | ||
shell.mv(path.join(cwd, "remake-framework/_remake"), remakeFrameworkPathInApplicationDirectory); | ||
if (err) { | ||
console.log(chalk.bgRed("Error: Couldn't create new project files")); | ||
rimraf(path.join(cwd, "remake-framework"), function (rimrafError) { | ||
if (rimrafError) { | ||
console.log(chalk.bgRed("Error cleaning up: Couldn't remove the ./remake-framework directory")); | ||
return; | ||
} | ||
console.log(chalk.bgGreen("2. Updated _remake directory added")); | ||
console.log(chalk.bgGreen("Successfully updated Remake!")); | ||
}); | ||
}); | ||
@@ -106,0 +118,0 @@ |
{ | ||
"name": "remake", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "Generate a full-stack Remake web app", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -13,2 +13,4 @@ --- | ||
<a class="slanted-link" href="https://mailchi.mp/59def7603a0f/remake"><span>→ Sign up for updates</span></a> | ||
### Getting Started | ||
@@ -15,0 +17,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
2
1
447230
37
607