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

bolt-cli

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bolt-cli - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

71

index.js
#! /usr/bin/env node
'use strict'
var shell = require('shelljs')
, asciify = require('asciify')
, chalk = require('chalk')
let shell = require('shelljs')
, asciify = require('asciify')
, chalk = require('chalk')
, bolt = require('./package.json')
// non deps
// non deps
, asciiFont = 'speed'
, userArgs = process.argv.splice(2)
, command = userArgs[0] || 'new'
, dir = userArgs[1] || '.'
, command = userArgs[0]
, dir = userArgs[1] || '.'
, custom_dir = dir !== '.'
;
asciify('Bolt', {
font: 'alligator',
color: 'blue'
}, function(err, res){
console.log(res);
create();
});
// Command Route
switch(command) {
case '-v':
console.log(bolt.version)
break
case 'new':
newProject()
break
default:
run()
}
function create() {
console.log(
chalk.blue('new project')
);
shell.exec('git clone https://github.com/argyleink/Bolt.git ' + dir);
function newProject() {
asciify('Bolt', {
font: asciiFont,
color: 'cyan'
}, (err, res)=> {
console.log(res)
create()
})
console.log('cleaning up');
shell.exec('rm -rf '+ (custom_dir ? dir : '.') +'/.git');
function create() {
// git clone
shell.exec(`git clone https://github.com/argyleink/Bolt.git ${dir}`)
console.log(
chalk.green('done')
);
// delete cruft
console.log('Cleaning up..')
shell.exec(`rm -rf ${(custom_dir ? dir : '.')}/.git`)
console.log('run '+ chalk.red.bold('npm i') +' from the new project root');
// complete
console.log(
chalk.green('done!')
)
// prompt
let command = chalk.cyan(`cd ${dir} && npm i && bower i && grunt`)
console.log(`Next: run ${command} and you're ready to hack optimally`)
}
}
function run() {
shell.exec('grunt')
}
{
"name": "bolt-cli",
"version": "0.1.1",
"version": "0.1.2",
"description": "Command line for creating and managing Bolt projects",

@@ -5,0 +5,0 @@ "author": "Adam Argyle",

This project is for use with [Bolt](https://github.com/argyleink/Bolt).
The CLI does 2 thing:
The CLI does a few things:
- `bolt`
Creates a new Bolt project inside the current directory
- `bolt new #{your_dir}`
Creates a new project in a new directory you name
Runs the default Bolt task, aka `grunt`
- `bolt new ${project_name}`
Creates a new bolt project in a new directory you name
- `bolt -v`
Show Bolt version
![cli preview](http://g.recordit.co/AZ1Qzr5lAk.gif)
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