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

create-preact-app

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-preact-app - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

24

index.js

@@ -44,2 +44,3 @@ #!/usr/bin/env node

var argv = require('minimist')(process.argv.slice(2));
var pathExists = require('path-exists');

@@ -71,10 +72,11 @@ /**

function createApp(name, verbose, version) {
if (fs.existsSync(name)) {
console.log('The directory `' + name + '` already exists. Aborting.');
var root = path.resolve(name);
if (!pathExists.sync(name)) {
fs.mkdirSync(root);
} else if (!isGitHubBoilerplate(root)) {
console.log('The directory `' + name + '` contains file(s) that could conflict. Aborting.');
process.exit(1);
}
var root = path.resolve(name);
var appName = path.basename(root);
console.log(

@@ -85,4 +87,2 @@ 'Creating a new Preact app in ' + root + '.'

fs.mkdirSync(root);
var packageJson = {

@@ -172,1 +172,13 @@ name: appName,

}
// Check if GitHub boilerplate compatible
// https://github.com/facebookincubator/create-react-app/pull/368#issuecomment-237875655
function isGitHubBoilerplate(root) {
var validFiles = [
'.DS_Store', 'Thumbs.db', '.git', '.gitignore', 'README.md', 'LICENSE'
];
return fs.readdirSync(root)
.every(function(file) {
return validFiles.indexOf(file) >= 0;
});
}
{
"name": "create-preact-app",
"version": "0.1.0",
"version": "0.2.0",
"keywords": [

@@ -24,4 +24,5 @@ "react",

"minimist": "^1.2.0",
"path-exists": "^3.0.0",
"semver": "^5.0.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