New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bili-sapp-cli

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bili-sapp-cli - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

page-template/index.vue

42

index.js

@@ -7,2 +7,4 @@ #!/usr/bin/env node

var info = require('./package.json');
var fs = require('fs');
var path = require('path');
var projectTpl = 'http://static.hdslb.com/public/template.zip';

@@ -28,2 +30,21 @@

function copyTemplate(from, to) {
from = path.join(__dirname, 'page-template', from);
fs.writeFileSync(to, fs.readFileSync(from, 'utf-8'), 'utf-8');
}
function copyImage(from, to) {
from = path.join(__dirname, 'page-template', from);
fs.writeFileSync(to, fs.readFileSync(from, 'binary'), 'binary');
}
function mkdir(path, fn) {
fs.mkdir(path, function () {
fn && fn();
});
}
var PATH = '.';
program

@@ -34,4 +55,25 @@ .command('page <page-name>')

console.log('exec "%s"', pageName);
var pageDir = path.join(PATH, pageName);
fs.exists(pageDir, function (exists) {
if (!exists) {
mkdir(pageDir, function () {
copyTemplate('index.vue', path.join(pageDir, 'index.vue'));
mkdir(path.join(pageDir, 'vue'), function () {
copyTemplate(path.join('vue', 'MyComponent.vue'), path.join(pageDir, 'vue', 'MyComponent.vue'));
});
mkdir(path.join(pageDir, 'style'), function () {
copyTemplate(path.join('style', 'index.less'), path.join(pageDir, 'style', 'index.less'));
});
mkdir(path.join(pageDir, 'js'), function () {
copyTemplate(path.join('js', 'index.js'), path.join(pageDir, 'js', 'index.js'));
});
mkdir(path.join(pageDir, 'img'), function () {
});
});
} else {
console.log(pageDir + '文件夹已存在!');
}
});
});
program.parse(process.argv);

2

package.json
{
"name": "bili-sapp-cli",
"version": "0.0.6",
"version": "0.0.7",
"description": "Bilibili Small App Cli",

@@ -5,0 +5,0 @@ "main": "index.js",

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